Debian Codegraph @

autotests/autotests.h

raw
1 /*
2 * SPDX-FileCopyrightText: 2014-2015 David Rosca <[email protected]>
3 *
4 * SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
5 */
6
7 #ifndef AUTOTESTS_H
8 #define AUTOTESTS_H
9
10 #include <QDBusConnection>
11 #include <QDBusMessage>
12 #include <QProcess>
13 #include <QSignalSpy>
14 #include <QTest>
15
16 class FakeBluez
17 {
18 public:
19 static void start();
20 static void stop();
21
22 static bool isRunning();
23 static void runTest(const QString &testName);
24 static void runAction(const QString &object, const QString &actionName, const QVariantMap &properties = QVariantMap());
25
26 static QProcess *s_process;
27 };
28
29 namespace Autotests
30 {
31 void registerMetatypes();
32 void verifyPropertiesChangedSignal(const QSignalSpy &spy, const QString &propertyName, const QVariant &propertyValue);
33
34 }
35
36 #endif // AUTOTESTS_H