2021-07-23 18:41:02 +03:00
|
|
|
#include "testhelper.h"
|
2022-10-18 18:15:10 +03:00
|
|
|
#include <QJsonObject>
|
|
|
|
#include <QJsonDocument>
|
2021-07-23 18:41:02 +03:00
|
|
|
|
|
|
|
OCC::FolderDefinition folderDefinition(const QString &path)
|
|
|
|
{
|
|
|
|
OCC::FolderDefinition d;
|
|
|
|
d.localPath = path;
|
|
|
|
d.targetPath = path;
|
|
|
|
d.alias = path;
|
|
|
|
return d;
|
|
|
|
}
|
2022-10-18 18:15:10 +03:00
|
|
|
|
|
|
|
|
|
|
|
const QByteArray jsonValueToOccReply(const QJsonValue &jsonValue)
|
|
|
|
{
|
|
|
|
QJsonObject root;
|
|
|
|
QJsonObject ocs;
|
|
|
|
QJsonObject meta;
|
|
|
|
|
|
|
|
meta.insert("statuscode", 200);
|
|
|
|
|
|
|
|
ocs.insert(QStringLiteral("data"), jsonValue);
|
|
|
|
ocs.insert(QStringLiteral("meta"), meta);
|
|
|
|
root.insert(QStringLiteral("ocs"), ocs);
|
|
|
|
|
|
|
|
return QJsonDocument(root).toJson();
|
|
|
|
}
|