diff options
author | Andre Moreira Magalhaes (andrunko) <andre.magalhaes@collabora.co.uk> | 2011-09-28 16:55:03 -0300 |
---|---|---|
committer | Andre Moreira Magalhaes (andrunko) <andre.magalhaes@collabora.co.uk> | 2011-09-30 10:48:49 -0300 |
commit | e83ae564b728f9921e875946a9f910c53e4c7616 (patch) | |
tree | 6ef1ddb8d1b10e61db0b6da50e5ff7eb81c490aa /qt4/tests | |
parent | a479a1a6e900a08b4f8fd17a8fbf68412c91ff96 (diff) |
client-factories test: Check that ChannelFactory::featuresFor* accessors return sensible defaults.
Diffstat (limited to 'qt4/tests')
-rw-r--r-- | qt4/tests/dbus/client-factories.cpp | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/qt4/tests/dbus/client-factories.cpp b/qt4/tests/dbus/client-factories.cpp index 87b84b6b0..de8b96ee2 100644 --- a/qt4/tests/dbus/client-factories.cpp +++ b/qt4/tests/dbus/client-factories.cpp @@ -374,6 +374,7 @@ private Q_SLOTS: void testAddDispatchOperation(); void testRequests(); void testHandleChannels(); + void testChannelFactoryAccessors(); void cleanup(); void cleanupTestCase(); @@ -950,6 +951,46 @@ void TestClientFactories::testHandleChannels() QVERIFY(handledChannels.isEmpty()); } +void TestClientFactories::testChannelFactoryAccessors() +{ + QDBusConnection bus = QDBusConnection::sessionBus(); + + ChannelFactoryPtr chanFact = ChannelFactory::create(bus); + + QCOMPARE(chanFact->featuresForTextChats(), Features()); + QCOMPARE(chanFact->featuresFor(ChannelClassSpec::textChat()), Features()); + QCOMPARE(chanFact->featuresFor(ChannelClassSpec::unnamedTextChat()), Features()); + + QCOMPARE(chanFact->featuresForTextChatrooms(), Features()); + QCOMPARE(chanFact->featuresFor(ChannelClassSpec::textChatroom()), Features()); + + QCOMPARE(chanFact->featuresForStreamedMediaCalls(), Features()); + QCOMPARE(chanFact->featuresFor(ChannelClassSpec::streamedMediaCall()), Features()); + QCOMPARE(chanFact->featuresFor(ChannelClassSpec::streamedMediaAudioCall()), Features()); + QCOMPARE(chanFact->featuresFor(ChannelClassSpec::streamedMediaVideoCall()), Features()); + QCOMPARE(chanFact->featuresFor(ChannelClassSpec::streamedMediaVideoCallWithAudio()), Features()); + QCOMPARE(chanFact->featuresFor(ChannelClassSpec::unnamedStreamedMediaCall()), Features()); + QCOMPARE(chanFact->featuresFor(ChannelClassSpec::unnamedStreamedMediaAudioCall()), Features()); + QCOMPARE(chanFact->featuresFor(ChannelClassSpec::unnamedStreamedMediaVideoCall()), Features()); + QCOMPARE(chanFact->featuresFor(ChannelClassSpec::unnamedStreamedMediaVideoCallWithAudio()), Features()); + + QCOMPARE(chanFact->featuresForRoomLists(), Features()); + QCOMPARE(chanFact->featuresFor(ChannelClassSpec::roomList()), Features()); + + QCOMPARE(chanFact->featuresForOutgoingFileTransfers(), Features()); + QCOMPARE(chanFact->featuresForIncomingFileTransfers(), Features()); + QCOMPARE(chanFact->featuresFor(ChannelClassSpec::outgoingFileTransfer()), Features()); + QCOMPARE(chanFact->featuresFor(ChannelClassSpec::incomingFileTransfer()), Features()); + + QCOMPARE(chanFact->featuresForOutgoingStreamTubes(), Features()); + QCOMPARE(chanFact->featuresForIncomingStreamTubes(), Features()); + QCOMPARE(chanFact->featuresFor(ChannelClassSpec::outgoingStreamTube()), Features()); + QCOMPARE(chanFact->featuresFor(ChannelClassSpec::incomingStreamTube()), Features()); + + QCOMPARE(chanFact->featuresFor(ChannelClassSpec::contactSearch()), Features()); + QCOMPARE(chanFact->featuresForContactSearches(), Features()); +} + void TestClientFactories::cleanup() { cleanupImpl(); |