diff options
author | Remko Tronçon <git@el-tramo.be> | 2009-07-30 19:15:34 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2009-07-30 22:08:39 (GMT) |
commit | c8634883470be42eaa674aab05db61c46b005608 (patch) | |
tree | f0c05e8488c6f7845481d9ef27a56336a8912c55 /Slimber/UnitTest | |
parent | f1938c7096f2ab77fb438d285f1eadb094010b0a (diff) | |
download | swift-c8634883470be42eaa674aab05db61c46b005608.zip swift-c8634883470be42eaa674aab05db61c46b005608.tar.bz2 |
Make Slimber use the new LinkLocal framework.
XMPP Server is temporarily out of order.
Diffstat (limited to 'Slimber/UnitTest')
-rw-r--r-- | Slimber/UnitTest/LinkLocalPresenceManagerTest.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/Slimber/UnitTest/LinkLocalPresenceManagerTest.cpp b/Slimber/UnitTest/LinkLocalPresenceManagerTest.cpp index a1ecdf8..f15daf4 100644 --- a/Slimber/UnitTest/LinkLocalPresenceManagerTest.cpp +++ b/Slimber/UnitTest/LinkLocalPresenceManagerTest.cpp @@ -18,6 +18,7 @@ using namespace Swift; class LinkLocalPresenceManagerTest : public CppUnit::TestFixture { CPPUNIT_TEST_SUITE(LinkLocalPresenceManagerTest); + CPPUNIT_TEST(testConstructor); CPPUNIT_TEST(testServiceAdded); CPPUNIT_TEST(testServiceRemoved); CPPUNIT_TEST(testServiceChanged); @@ -31,8 +32,6 @@ class LinkLocalPresenceManagerTest : public CppUnit::TestFixture { CPPUNIT_TEST_SUITE_END(); public: - LinkLocalPresenceManagerTest() {} - void setUp() { eventLoop = new DummyEventLoop(); querier = boost::shared_ptr<FakeDNSSDQuerier>(new FakeDNSSDQuerier("wonderland.lit")); @@ -46,6 +45,15 @@ class LinkLocalPresenceManagerTest : public CppUnit::TestFixture { delete eventLoop; } + void testConstructor() { + addService("alice@wonderland"); + addService("rabbit@teaparty"); + std::auto_ptr<LinkLocalPresenceManager> testling(createTestling()); + + CPPUNIT_ASSERT_EQUAL(2, static_cast<int>(testling->getRoster()->getItems().size())); + CPPUNIT_ASSERT_EQUAL(2, static_cast<int>(testling->getAllPresence().size())); + } + void testServiceAdded() { std::auto_ptr<LinkLocalPresenceManager> testling(createTestling()); |