forked from ondra/colnod-connector
29 lines
633 B
C++
29 lines
633 B
C++
#include <QtTest>
|
|
|
|
#include "databaseapi.h"
|
|
// add necessary includes here
|
|
|
|
class DatabaseTest : public QObject
|
|
{
|
|
Q_OBJECT
|
|
private slots:
|
|
void open_database_test();
|
|
|
|
};
|
|
|
|
void DatabaseTest::open_database_test()
|
|
{
|
|
serversdk::DatabaseManager dbManager;
|
|
DatabaseAPI db(&dbManager, false);
|
|
|
|
// TODO: fix -> databaseAPI must be able to add credentials to check for wrong one or test wrong IP
|
|
//db.open(user, password, url, etc );
|
|
// then test with wrong credentials
|
|
// QVERIFY(!db.open(worng usernae));
|
|
// QVERIFY(!db.open(worng ip));
|
|
}
|
|
|
|
QTEST_APPLESS_MAIN(DatabaseTest)
|
|
|
|
#include "tst_databaseapi.moc"
|