Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 79e33d0c

Von Christian Ehringfeld vor fast 9 Jahren hinzugefügt

  • ID 79e33d0ca228304dd21ba10c9282eccdd68a2cd1
  • Vorgänger 64dc4a24
  • Nachfolger f13a6e62

...

Unterschiede anzeigen:

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