1   /*
2    *  soapui, copyright (C) 2005 Ole Matzura / eviware.com 
3    *
4    *  soapUI is free software; you can redistribute it and/or modify it under the 
5    *  terms of the GNU Lesser General Public License as published by the Free Software Foundation; 
6    *  either version 2.1 of the License, or (at your option) any later version.
7    *
8    *  soapUI is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without 
9    *  even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
10   *  See the GNU Lesser General Public License for more details at gnu.org.
11   */
12  
13  package com.eviware.soapui.support;
14  
15  import com.eviware.soapui.support.xml.XmlObjectConfigurationBuilder;
16  import com.eviware.soapui.support.xml.XmlObjectConfigurationReader;
17  
18  import junit.framework.TestCase;
19  
20  public class XmlObjectConfigurationTestCase extends TestCase
21  {
22  	public void testConfiguration() throws Exception
23  	{
24  		XmlObjectConfigurationBuilder builder = new XmlObjectConfigurationBuilder();
25  		builder.add( "testFloat", (float)0.123 );
26  		builder.add( "testInt", 123 );
27  		builder.add( "testString", "1234" );
28  		
29  		XmlObjectConfigurationReader reader = new XmlObjectConfigurationReader( builder.finish() );
30  		assertEquals( (float)0.123, reader.readFloat( "testFloat", 0));
31  		assertEquals( 123, reader.readInt( "testInt", 0 ));
32  		assertEquals( "1234", reader.readString( "testString", null ));
33  	}
34  }