11 #include <QDBusConnection>
23 using namespace swift::misc::simulation;
38 void marshallUnmarshall();
46 void CTestDBus::marshallUnmarshall()
48 QDBusConnection connection = QDBusConnection::sessionBus();
49 if (!CTestService::canRegisterTestService(connection))
51 QSKIP(
"Cannot register DBus service, skip unit test");
54 CTestService *testService = CTestService::registerTestService(connection,
false, QCoreApplication::instance());
55 Q_UNUSED(testService);
58 const int errors = ITestServiceInterface::pingTests(testServiceInterface,
false);
59 QVERIFY2(errors == 0,
"DBus Ping tests fail");
62 void CTestDBus::signatureSize()
64 constexpr
int max = 255;
70 QVERIFY2(s.length() <= max,
"Signature CAircraftModel");
74 QVERIFY2(s.length() <= max,
"Signature CSimulatedAircraft");
78 QVERIFY2(s.length() <= max,
"Signature CSimulatedAircraftList");
85 #include "testdbus.moc"
DBus implementation classes tests.
static QString dBusSignature(const ValueObj &obj)
Signature for swift::misc::CValueObject.
Aircraft model (used by another pilot, my models on disk)
Comprehensive information of an aircraft.
Value object encapsulating a list of aircraft.
Testservice for PQ / CValueObject DBus tests. This part is the callee.
Proxy class for swift::misc::Test::CTestService. This part is the caller.
Generate data for testing purposes.
Free functions in swift::misc.
void registerMetadata()
Register all relevant metadata in Misc.
SWIFTTEST_MAIN(MiscTest::CTestDBus)
main