diff options
Diffstat (limited to 'Swiften/Serializer/PayloadSerializers/UnitTest/DiscoInfoSerializerTest.cpp')
m--------- | Swiften | 0 | ||||
-rw-r--r-- | Swiften/Serializer/PayloadSerializers/UnitTest/DiscoInfoSerializerTest.cpp | 38 |
2 files changed, 0 insertions, 38 deletions
diff --git a/Swiften b/Swiften new file mode 160000 +Subproject 8213ba16d0043d2461f4b031c881d61dda5a38c diff --git a/Swiften/Serializer/PayloadSerializers/UnitTest/DiscoInfoSerializerTest.cpp b/Swiften/Serializer/PayloadSerializers/UnitTest/DiscoInfoSerializerTest.cpp deleted file mode 100644 index d3e247f..0000000 --- a/Swiften/Serializer/PayloadSerializers/UnitTest/DiscoInfoSerializerTest.cpp +++ /dev/null @@ -1,38 +0,0 @@ -#include <cppunit/extensions/HelperMacros.h> -#include <cppunit/extensions/TestFactoryRegistry.h> - -#include "Swiften/Serializer/PayloadSerializers/DiscoInfoSerializer.h" - -using namespace Swift; - -class DiscoInfoSerializerTest : public CppUnit::TestFixture -{ - CPPUNIT_TEST_SUITE(DiscoInfoSerializerTest); - CPPUNIT_TEST(testSerialize); - CPPUNIT_TEST_SUITE_END(); - - public: - DiscoInfoSerializerTest() {} - - void testSerialize() { - DiscoInfoSerializer testling; - boost::shared_ptr<DiscoInfo> discoInfo(new DiscoInfo()); - discoInfo->addIdentity(DiscoInfo::Identity("Swift", "client", "pc")); - discoInfo->addIdentity(DiscoInfo::Identity("Vlug", "client", "pc", "nl")); - discoInfo->addFeature("http://jabber.org/protocol/caps"); - discoInfo->addFeature("http://jabber.org/protocol/disco#info"); - discoInfo->setNode("http://swift.im#bla"); - - String expectedResult = - "<query node=\"http://swift.im#bla\" xmlns=\"http://jabber.org/protocol/disco#info\">" - "<identity category=\"client\" name=\"Swift\" type=\"pc\"/>" - "<identity category=\"client\" name=\"Vlug\" type=\"pc\" xml:lang=\"nl\"/>" - "<feature var=\"http://jabber.org/protocol/caps\"/>" - "<feature var=\"http://jabber.org/protocol/disco#info\"/>" - "</query>"; - - CPPUNIT_ASSERT_EQUAL(expectedResult, testling.serialize(discoInfo)); - } -}; - -CPPUNIT_TEST_SUITE_REGISTRATION(DiscoInfoSerializerTest); |