Initial commit

This commit is contained in:
torsten committed 2026-08-13 18:33:10 +02:00
commit b7d90b9afe
16245 files changed
+3396666

No files matched your search

@@ -0,0 +1,47 @@
#include "ex_sq_stellungswechsel.h"
#include <QJsonDocument>
#include <QtTest/QTest>
#include <QJsonDocument>
#include <AdlerJson/telegrams.h>
#include "msgcompares.h"
#include <AdlerJson/generatetelegrams.h>
TestExStellungswechsel::TestExStellungswechsel()
{
}
QString TestExStellungswechsel::generateStellungswechsel()
{
AdlerJson::ExStellungswechsel req;
GenerateTelegrams::addHeaderData(req, m_saaId);
GenerateTelegrams::generateStellungswechsel(req);
QJsonObject messageObj =req.toJson();
QString message = QString::fromUtf8(QJsonDocument(messageObj).toJson());
return message;
}
void TestExStellungswechsel::testExStellungswechsel()
{
qDebug() << "---------------------------";
qDebug() << "--- EX-Stellungswechsel ---";
QString stellungswechselMessage = generateStellungswechsel();
qDebug() << "EX-Stellungswechsel=" << stellungswechselMessage;
QJsonDocument jsonDoc = QJsonDocument::fromJson(stellungswechselMessage.toUtf8());
const QJsonObject jsonObj = jsonDoc.object();
QJsonObject dataObj = jsonObj[AdlerJson::JsonKeys::DATA()].toObject();
AdlerJson::Stellungswechseldaten stellungswechseldaten;
bool bOk;
AdlerJson::stellungswechseldatenFromJson(dataObj, stellungswechseldaten, bOk);
MsgCompares::compareStellungswechseldaten(stellungswechseldaten);
}