QRODS Test Suite
testcollectionclient.h
1 #ifndef TESTCOLLECTIONCLIENT_H
2 #define TESTCOLLECTIONCLIENT_H
3 
4 #include <QObject>
5 #include <QtTest/QTest>
6 #include "qrods.h"
7 
8 class TestCollectionClient : public QObject
9 {
10  Q_OBJECT
11 public:
12  explicit TestCollectionClient(QString &newHost, QString &newport, QString &newUser, QString &newPassword, bool isSecureHttps, QString &_testFile);
13 
14 private slots:
15 
16  void initTestCase();
17  void cleanupTestCase();
18  void init();
19  void cleanup();
20  void testAddCollection();
21  void testRemoveCollection();
22  void testAddManyCollections();
23 
24 
25 
26 private:
27  int getCurrentListSize();
28  int getCurrentListSize(QString & pathTestCollection);
29  bool collectionExists(QString &_pathTestCollection);
30  bool createTextFiles(QString baseFileName, int size);
31  bool fileExistsLocal(QString & fileName);
32  bool deleteFiles(QString &fileName);
33  QString getFormatedTime(int milliseconds);
34 
35  QString testFile;
36  QString host;
37  QString hostFull;
38  QString port;
39  QString user;
40  QString password;
41  bool secureHttps;
42  int objectsBefore;
43  int objectsAfter;
44  QString collecUrl;
45  QString fileContUrl;
46  QString dataObjUrl;
47  QString path;
48  QString pathTestCollection;
49  QRODS *model ;
50  QString pathToTheFile;
51  QString testDownloadFile;
52  QString anotherPathToTheFile; // sem duplas barras
53  QString localPath;
54 
55 };
56 
57 #endif // TESTCOLLECTIONCLIENT_H
Definition: testcollectionclient.h:8