Revision 79e33d0c
Von Christian Ehringfeld vor fast 9 Jahren hinzugefügt
tests/em/tst_em.cpp | ||
---|---|---|
CuteEntityManager::EntityInstanceFactory::registerClass<Article>();
|
||
CuteEntityManager::EntityInstanceFactory::registerClass<Employee>();
|
||
CuteEntityManager::EntityInstanceFactory::registerClass<WorkerGroup>();
|
||
// this->e = new
|
||
// CuteEntityManager::EntityManager("QSQLITE",
|
||
// QDir::currentPath() + "/db.sqlite", "", "", "", 0, true);
|
||
this->e = new CuteEntityManager::EntityManager("QSQLITE",
|
||
":memory:", "", "", "", "", true, "foreign_keys = ON", false);
|
||
"db.sqlite","","","","",true,"foreign_keys = ON",false);
|
||
// this->e = new CuteEntityManager::EntityManager("QSQLITE",
|
||
// ":memory:", "", "", "", "", true, "foreign_keys = ON", false);
|
||
}
|
||
|
||
void EmTest::cleanupTestCase() {
|
||
... | ... | |
QVERIFY(this->e->executeQuery(qb->dropTable("group")));
|
||
QVERIFY(this->e->executeQuery(qb->dropTable("person")));
|
||
QVERIFY(this->e->executeQuery(qb->dropTable("article")));
|
||
// QVERIFY(this->e->executeQuery(qb->dropTable("workergroup_workers")));
|
||
// QVERIFY(this->e->executeQuery(qb->dropTable("workergroup")));
|
||
// QVERIFY(this->e->executeQuery(qb->dropTable("employee")));
|
||
QVERIFY(this->e->executeQuery(qb->dropTable("workergroup_workers")));
|
||
QVERIFY(this->e->executeQuery(qb->dropTable("workergroup")));
|
||
QVERIFY(this->e->executeQuery(qb->dropTable("employee")));
|
||
auto tableNames = this->e->getSchema()->getTableNames();
|
||
QVERIFY(!tableNames.contains("person"));
|
||
QVERIFY(!tableNames.contains("group"));
|
Auch abrufbar als: Unified diff
...