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