File indexing completed on 2024-10-06 06:35:12
0001 /* 0002 File : MQTTUnitTest.h 0003 Project : LabPlot 0004 Description : Tests for MQTT related features 0005 -------------------------------------------------------------------- 0006 SPDX-FileCopyrightText: 2018 Kovacs Ferencz <kferike98@gmail.com> 0007 0008 SPDX-License-Identifier: GPL-2.0-or-later 0009 */ 0010 #ifndef MQTTUNITTEST_H 0011 #define MQTTUNITTEST_H 0012 0013 #include <QtTest> 0014 0015 class MQTTUnitTest : public QObject { 0016 #ifdef HAVE_MQTT 0017 Q_OBJECT 0018 0019 private Q_SLOTS: 0020 void initTestCase(); 0021 0022 // check superior and inferior relations 0023 void testContainFalse(); 0024 void testContainTrue(); 0025 0026 // check common topics 0027 void testCommonTrue(); 0028 void testCommonFalse(); 0029 0030 // test for different tipes of messages 0031 void testIntegerMessage(); 0032 void testNumericMessage(); 0033 void testTextMessage(); 0034 0035 // test subscribing and unsubscribing 0036 // TODO: hangs 0037 // void testSubscriptions(); 0038 0039 private: 0040 QString m_dataDir; 0041 #endif // HAVE_MQTT 0042 }; 0043 0044 #endif