mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-04-20 07:52:30 +02:00
Test no commandFactory is available before it was registered
This commit is contained in:
parent
4059af26d0
commit
76f73450c6
@ -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<TestDatabaseCommand>() );
|
||||
|
||||
// register it
|
||||
db->registerCommand<TestDatabaseCommand>();
|
||||
|
||||
// make sure it's available now
|
||||
command = db->commandFactory<TestDatabaseCommand>()->newInstance();
|
||||
TestDatabaseCommand* tCmd = qobject_cast< TestDatabaseCommand* >( command );
|
||||
QVERIFY( tCmd );
|
||||
|
Loading…
x
Reference in New Issue
Block a user