removed the state machine. use only http.
[simple-xmbc-rem] / test-json / main.cpp
1 #include <QtCore/QString>
2 #include <QtTest/QtTest>
3
4 #include "../src/json.h"
5
6 class JsonTest : public QObject
7 {
8     Q_OBJECT
9
10 public:
11     JsonTest();
12
13 private Q_SLOTS:
14 //    void initTestCase();
15 //    void cleanupTestCase();
16 //    void testCase1();
17 //    void testCase1_data();
18     void testPlayerGetActivePlayers();
19 };
20
21 JsonTest::JsonTest()
22 {
23 }
24
25 //void JsonTest::initTestCase()
26 //{
27 //}
28
29 //void JsonTest::cleanupTestCase()
30 //{
31 //}
32
33 //void JsonTest::testCase1()
34 //{
35 //    QFETCH(QString, data);
36 //    QVERIFY2(true, "Failure");
37 //}
38
39 //void JsonTest::testCase1_data()
40 //{
41 //    QTest::addColumn<QString>("data");
42 //    QTest::newRow("0") << QString();
43 //}
44
45 QTEST_APPLESS_MAIN(JsonTest);
46
47 void JsonTest::testPlayerGetActivePlayers()
48 {
49     JsonEngine je;
50     QCOMPARE(QString("{\"jsonrpc\" : \"2.0\", \"method\" : \"Player.GetActivePlayers\", \"id\" : 1}"),
51              je.playerGetActivePlayers());
52 }
53
54 #include "main.moc"