/* * Copyright (c) 2010 Isode Limited. * All rights reserved. * See the COPYING file for more information. */ /* * Copyright (c) 2015 Tarun Gupta. * Licensed under the simplified BSD license. * See Documentation/Licenses/BSD-simplified.txt for more information. */ package com.isode.stroke.serializer; import static org.junit.Assert.assertEquals; import org.junit.Test; import com.isode.stroke.serializer.StreamFeaturesSerializer; import com.isode.stroke.elements.StreamFeatures; public class StreamFeaturesSerializerTest { /** * Default Constructor. */ public StreamFeaturesSerializerTest() { } @Test public void testSerialize() { StreamFeaturesSerializer testling = new StreamFeaturesSerializer(); StreamFeatures streamFeatures = new StreamFeatures(); streamFeatures.setHasStartTLS(); streamFeatures.addCompressionMethod("zlib"); streamFeatures.addCompressionMethod("lzw"); streamFeatures.addAuthenticationMechanism("DIGEST-MD5"); streamFeatures.addAuthenticationMechanism("PLAIN"); streamFeatures.setHasResourceBind(); streamFeatures.setHasSession(); streamFeatures.setHasStreamManagement(); streamFeatures.setHasRosterVersioning(); assertEquals( "" + "" + "" + "zlib" + "lzw" + "" + "" + "DIGEST-MD5" + "PLAIN" + "" + "" + "" + "" + "" + "", testling.serialize(streamFeatures)); } }