diff options
Diffstat (limited to 'Swiften/Serializer/PayloadSerializers/UnitTest/ResourceBindSerializerTest.cpp')
m--------- | Swiften | 0 | ||||
-rw-r--r-- | Swiften/Serializer/PayloadSerializers/UnitTest/ResourceBindSerializerTest.cpp | 49 |
2 files changed, 0 insertions, 49 deletions
diff --git a/Swiften b/Swiften new file mode 160000 +Subproject 8213ba16d0043d2461f4b031c881d61dda5a38c diff --git a/Swiften/Serializer/PayloadSerializers/UnitTest/ResourceBindSerializerTest.cpp b/Swiften/Serializer/PayloadSerializers/UnitTest/ResourceBindSerializerTest.cpp deleted file mode 100644 index ff09966..0000000 --- a/Swiften/Serializer/PayloadSerializers/UnitTest/ResourceBindSerializerTest.cpp +++ /dev/null @@ -1,49 +0,0 @@ -#include <cppunit/extensions/HelperMacros.h> -#include <cppunit/extensions/TestFactoryRegistry.h> - -#include "Swiften/Serializer/PayloadSerializers/ResourceBindSerializer.h" - -using namespace Swift; - -class ResourceBindSerializerTest : public CppUnit::TestFixture -{ - CPPUNIT_TEST_SUITE(ResourceBindSerializerTest); - CPPUNIT_TEST(testSerialize_JID); - CPPUNIT_TEST(testSerialize_Resource); - CPPUNIT_TEST(testSerialize_Empty); - CPPUNIT_TEST_SUITE_END(); - - public: - ResourceBindSerializerTest() {} - - void testSerialize_JID() { - ResourceBindSerializer testling; - boost::shared_ptr<ResourceBind> resourceBind(new ResourceBind()); - resourceBind->setJID(JID("somenode@example.com/someresource")); - - CPPUNIT_ASSERT_EQUAL(String( - "<bind xmlns=\"urn:ietf:params:xml:ns:xmpp-bind\">" - "<jid>somenode@example.com/someresource</jid>" - "</bind>"), testling.serialize(resourceBind)); - } - - void testSerialize_Resource() { - ResourceBindSerializer testling; - boost::shared_ptr<ResourceBind> resourceBind(new ResourceBind()); - resourceBind->setResource("someresource"); - - CPPUNIT_ASSERT_EQUAL(String( - "<bind xmlns=\"urn:ietf:params:xml:ns:xmpp-bind\">" - "<resource>someresource</resource>" - "</bind>"), testling.serialize(resourceBind)); - } - - void testSerialize_Empty() { - ResourceBindSerializer testling; - boost::shared_ptr<ResourceBind> resourceBind(new ResourceBind()); - - CPPUNIT_ASSERT_EQUAL(String("<bind xmlns=\"urn:ietf:params:xml:ns:xmpp-bind\"/>"), testling.serialize(resourceBind)); - } -}; - -CPPUNIT_TEST_SUITE_REGISTRATION(ResourceBindSerializerTest); |