diff options
author | Remko Tronçon <git@el-tramo.be> | 2009-06-10 17:23:57 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2009-06-10 17:38:05 (GMT) |
commit | e2f5588d089e4d2148762ea092e032976254a467 (patch) | |
tree | 851946c7a36ffa96e0f3ab54bc72f233f8b2c746 /Swiften/Controllers/UnitTest/NickResolverTest.cpp | |
parent | 7214d768dca85a6d43892169d5008898249dce73 (diff) | |
download | swift-contrib-e2f5588d089e4d2148762ea092e032976254a467.zip swift-contrib-e2f5588d089e4d2148762ea092e032976254a467.tar.bz2 |
Moved Swiften/Controllers to Swift/Controllers.
Diffstat (limited to 'Swiften/Controllers/UnitTest/NickResolverTest.cpp')
-rw-r--r-- | Swiften/Controllers/UnitTest/NickResolverTest.cpp | 62 |
1 files changed, 0 insertions, 62 deletions
diff --git a/Swiften/Controllers/UnitTest/NickResolverTest.cpp b/Swiften/Controllers/UnitTest/NickResolverTest.cpp deleted file mode 100644 index 9c89d4d..0000000 --- a/Swiften/Controllers/UnitTest/NickResolverTest.cpp +++ /dev/null @@ -1,62 +0,0 @@ -#include <cppunit/extensions/HelperMacros.h> -#include <cppunit/extensions/TestFactoryRegistry.h> - -#include "Swiften/Controllers/NickResolver.h" -#include "Swiften/Roster/XMPPRoster.h" - -using namespace Swift; - -class NickResolverTest : public CppUnit::TestFixture -{ - CPPUNIT_TEST_SUITE(NickResolverTest); - CPPUNIT_TEST(testNoMatch); - CPPUNIT_TEST(testMatch); - CPPUNIT_TEST(testOverwrittenMatch); - CPPUNIT_TEST(testRemovedMatch); - CPPUNIT_TEST_SUITE_END(); - - std::vector<String> groups_; - - public: - NickResolverTest() {} - - void testNoMatch() { - boost::shared_ptr<XMPPRoster> xmppRoster(new XMPPRoster()); - NickResolver resolver(xmppRoster); - JID testling("foo@bar/baz"); - - CPPUNIT_ASSERT_EQUAL(String("foo@bar"), resolver.jidToNick(testling)); - } - - void testMatch() { - boost::shared_ptr<XMPPRoster> xmppRoster(new XMPPRoster()); - NickResolver resolver(xmppRoster); - JID testling("foo@bar/baz"); - xmppRoster->addContact(testling, "Test", groups_); - - CPPUNIT_ASSERT_EQUAL(String("Test"), resolver.jidToNick(testling)); - } - - void testOverwrittenMatch() { - boost::shared_ptr<XMPPRoster> xmppRoster(new XMPPRoster()); - NickResolver resolver(xmppRoster); - JID testling("foo@bar/baz"); - xmppRoster->addContact(testling, "FailTest", groups_); - xmppRoster->addContact(testling, "Test", groups_); - - CPPUNIT_ASSERT_EQUAL(String("Test"), resolver.jidToNick(testling)); - } - - void testRemovedMatch() { - boost::shared_ptr<XMPPRoster> xmppRoster(new XMPPRoster()); - NickResolver resolver(xmppRoster); - JID testling("foo@bar/baz"); - xmppRoster->addContact(testling, "FailTest", groups_); - xmppRoster->removeContact(testling); - CPPUNIT_ASSERT_EQUAL(String("foo@bar"), resolver.jidToNick(testling)); - } - -}; - -CPPUNIT_TEST_SUITE_REGISTRATION(NickResolverTest); - |