File indexing completed on 2024-10-13 03:35:35
0001 /* 0002 * SPDX-FileCopyrightText: 2014-2015 David Rosca <nowrep@gmail.com> 0003 * 0004 * SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL 0005 */ 0006 0007 #ifndef AUTOTESTS_H 0008 #define AUTOTESTS_H 0009 0010 #include <QDBusConnection> 0011 #include <QDBusMessage> 0012 #include <QProcess> 0013 #include <QSignalSpy> 0014 #include <QTest> 0015 0016 class FakeBluez 0017 { 0018 public: 0019 static void start(); 0020 static void stop(); 0021 0022 static bool isRunning(); 0023 static void runTest(const QString &testName); 0024 static void runAction(const QString &object, const QString &actionName, const QVariantMap &properties = QVariantMap()); 0025 0026 static QProcess *s_process; 0027 }; 0028 0029 namespace Autotests 0030 { 0031 void registerMetatypes(); 0032 void verifyPropertiesChangedSignal(const QSignalSpy &spy, const QString &propertyName, const QVariant &propertyValue); 0033 0034 } 0035 0036 #endif // AUTOTESTS_H