public class PropertyExpansionTestCase extends TestCase
{
public void testExpansion() throws Exception
{
WsdlSubmitContext context = new WsdlSubmitContext( null );
context.setProperty( "test", "value" );
assertEquals( "${test}", PropertyExpander.expandProperties( context, "$${test}" ) );
assertEquals( "value${test}", PropertyExpander.expandProperties( context, "${test}$${test}" ) );
assertEquals( "${value", PropertyExpander.expandProperties( context, "$${${test}" ) );
assertEquals( "value", PropertyExpander.expandProperties( context, "${test}" ) );
assertEquals( "value", PropertyExpander.expandProperties( context, "${#test}" ) );
assertEquals( " value ", PropertyExpander.expandProperties( context, " ${test} " ) );
assertEquals( "", PropertyExpander.expandProperties( context, "${testa}" ) );
assertEquals( "valuevalue", PropertyExpander.expandProperties( context, "${test}${test}" ) );
context.setProperty( "testa", "" );
assertEquals( "", PropertyExpander.expandProperties( context, "${testa}" ) );
}