コード例 #1
0
		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));
		}
コード例 #2
0
        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));
        }