1 4 5 package org.apache.activemq.util; 6 7 import java.io.IOException ; 8 import java.util.Properties ; 9 import junit.framework.TestCase; 10 11 15 public class MarshallingSupportTest extends TestCase{ 16 17 21 protected void setUp() throws Exception { 22 super.setUp(); 23 } 24 25 29 protected void tearDown() throws Exception { 30 super.tearDown(); 31 } 32 33 38 public void testPropertiesToString() throws Exception { 39 Properties props=new Properties (); 40 for(int i=0;i<10;i++){ 41 String key="key"+i; 42 String value="value"+i; 43 props.put(key,value); 44 } 45 String str=MarshallingSupport.propertiesToString(props); 46 Properties props2=MarshallingSupport.stringToProperties(str); 47 assertEquals(props,props2); 48 } 49 } 50 | Popular Tags |