void testSerialize_NoMessage() { AuthResponseSerializer testling; boost::shared_ptr<AuthResponse> authResponse(new AuthResponse()); CPPUNIT_ASSERT_EQUAL(createSafeByteArray( "<response xmlns=\"urn:ietf:params:xml:ns:xmpp-sasl\">" "</response>"), testling.serialize(authResponse)); }
void testSerialize() { AuthResponseSerializer testling; std::shared_ptr<AuthResponse> authResponse(new AuthResponse()); authResponse->setValue(createSafeByteArray("foo")); CPPUNIT_ASSERT_EQUAL(createSafeByteArray( "<response xmlns=\"urn:ietf:params:xml:ns:xmpp-sasl\">" "Zm9v" "</response>"), testling.serialize(authResponse)); }