Files
Igor Malinovskiy 05fa28f1a7 Revive unit and integration tests
- Use fakeit for mocks
- Repair all unit tests
- Create env for QML integration tests
- Add intergration test for MultilineEditor
- Replace ModelTest with QAbstractItemModelTester
2022-02-03 14:59:28 +02:00

46 lines
1.5 KiB
C++

#include <QApplication>
#include <QTest>
// tests
#include <qredisclient/redisclient.h>
#include <iostream>
#include "testcases/app/test_configmanager.h"
#include "testcases/app/test_connectionsmanager.h"
#include "testcases/app/test_keymodels.h"
#include "testcases/app/test_treeoperations.h"
#include "testcases/connections-tree/test_databaseitem.h"
#include "testcases/connections-tree/test_model.h"
#include "testcases/connections-tree/test_serveritem.h"
#include "testcases/console/test_consolemodel.h"
int main(int argc, char *argv[]) {
QApplication app(argc, argv);
initRedisClient();
int allTestsResult = 0
// connections-tree module
#ifndef Q_OS_WIN
+ QTest::qExec(new TestServerItem, argc, argv)
+ QTest::qExec(new TestDatabaseItem, argc, argv)
#endif
+ QTest::qExec(new TestModel, argc, argv)
// console module
+ QTest::qExec(new TestConsoleOperations, argc, argv)
// app
+ QTest::qExec(new TestConnectionsManager, argc, argv)
+ QTest::qExec(new TestConfigManager, argc, argv)
+ QTest::qExec(new TestKeyModels, argc, argv)
+ QTest::qExec(new TestTreeOperations, argc, argv)
;
if (allTestsResult == 0)
qDebug() << "[Tests PASS]";
else
qDebug() << "[Tests FAIL]";
return (allTestsResult != 0) ? 1 : 0;
}