From 3100cae9d486b1613600148c2537754edcf5ee5d Mon Sep 17 00:00:00 2001 From: Dominik Schmidt Date: Sat, 6 Jul 2013 01:18:41 +0200 Subject: [PATCH] Test a commandFactory is not available before the command was registered --- tests/TestDatabase.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/TestDatabase.h b/tests/TestDatabase.h index fcc31fe8a..8ac562769 100644 --- a/tests/TestDatabase.h +++ b/tests/TestDatabase.h @@ -50,7 +50,14 @@ private slots: QVERIFY( lpCmd ); // try to handle a third party database command + + // test no command factory is available until now + QVERIFY( !db->commandFactory() ); + + // register it db->registerCommand(); + + // make sure it's available now command = db->commandFactory()->newInstance(); TestDatabaseCommand* tCmd = qobject_cast< TestDatabaseCommand* >( command ); QVERIFY( tCmd );