436e074877af106a4b0c26acc953695edf8b7e9b
[irwi] / ut / ut_remotedbmgr / ut_remotedbmgr.h
1 #ifndef _UT_REMOTEDBMGR_H_
2 #define _UT_REMOTEDBMGR_H_
3
4 #include "qnetworkreply.h"
5 #include <QObject>
6 #include <QWaitCondition>
7 #include <QMutex>
8 #include <QDomDocument>
9
10 #include "remotedb.h"
11 #include "remotedbmgr.h"
12
13 class Ut_RemoteDBMgr : public QObject
14 {
15     Q_OBJECT
16
17 private slots:
18     void initTestCase();
19     void cleanupTestCase();
20     void testGetDBAsync();
21
22 public slots: // public slots are not called by Qt Test framework
23     void verifyDB(RemoteDB *db);
24
25 private:
26     void createTestData();
27     void createTestDocument();
28     void createMfgElements(QChar &letter, QDomElement &parent);
29     void createModelElements(const QString &mfg, QDomElement &parent);
30     void verifyRemotes(RemoteDB *db);
31
32 private:
33     QWaitCondition dbVerified;
34     QMutex dbMutex;
35     RemoteDBMgr subject;
36     RemoteDB validDB;
37     bool dbOk;
38     QDomDocument document;
39
40 };
41
42 #endif // _UT_REMOTEDBMGR_H_
43
44