File: MQTTUnitTest.h

package info (click to toggle)
labplot 2.9.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 70,348 kB
  • sloc: cpp: 145,806; ansic: 4,534; python: 881; yacc: 540; xml: 357; sh: 185; awk: 35; makefile: 7
file content (46 lines) | stat: -rw-r--r-- 926 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
/*
	File                 : MQTTUnitTest.h
	Project              : LabPlot
	Description          : Tests for MQTT related features
	--------------------------------------------------------------------
    SPDX-FileCopyrightText: 2018 Kovacs Ferencz <kferike98@gmail.com>

    SPDX-License-Identifier: GPL-2.0-or-later
*/
#ifndef MQTTUNITTEST_H
#define MQTTUNITTEST_H

#include <QtTest>

class MQTTUnitTest : public QObject {
#ifdef HAVE_MQTT
	Q_OBJECT	

private Q_SLOTS:
	void initTestCase();

	//check superior and inferior relations
	void testContainFalse();
	void testContainTrue();

	//check common topics
	void testCommonTrue();
	void testCommonFalse();

	//test for different tipes of messages
	void testIntegerMessage();
	void testNumericMessage();
	void testTextMessage();

	//test subscribing and unsubscribing
	// TODO: hangs
//	void testSubscriptions();



private:
	QString m_dataDir;
#endif //HAVE_MQTT
};

#endif