Examples of WsdlSubmitContext


Examples of com.eviware.soapui.impl.wsdl.WsdlSubmitContext

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}" ) );
  }
View Full Code Here

Examples of com.eviware.soapui.impl.wsdl.WsdlSubmitContext

    assertEquals( "", PropertyExpander.expandProperties( context, "${testa}" ) );
  }

  public void testRecursiveExpansion() throws Exception
  {
    WsdlSubmitContext context = new WsdlSubmitContext( null );

    context.setProperty( "test", "value" );
    context.setProperty( "testexp", "${test}" );

    assertEquals( "value", PropertyExpander.expandProperties( context, "${testexp}" ) );

    context.setProperty( "exp", "${exp}" );
    assertEquals( "${exp}", PropertyExpander.expandProperties( context, "${exp}" ) );
  }
View Full Code Here

Examples of com.eviware.soapui.impl.wsdl.WsdlSubmitContext

    assertEquals( "${exp}", PropertyExpander.expandProperties( context, "${exp}" ) );
  }

  public void testNestedExpansion() throws Exception
  {
    WsdlSubmitContext context = new WsdlSubmitContext( null );

    context.setProperty( "test", "value" );
    context.setProperty( "testexp", "${test}" );
    context.setProperty( "exp", "exp" );

    assertEquals( "value", PropertyExpander.expandProperties( context, "${test${exp}}" ) );

    context.setProperty( "id", "123" );
    context.setProperty( "testxml", "<test><value id=\"123\">hello</value></test>" );
    assertEquals( "hello", PropertyExpander.expandProperties( context, "${#testxml#//value[@id=${id}]/text()}" ) );

    context.setProperty( "testxpath", "//value[@id=${id}]/text()" );
    assertEquals( "hello", PropertyExpander.expandProperties( context, "${#testxml#${testxpath}}" ) );
  }
View Full Code Here

Examples of com.eviware.soapui.impl.wsdl.WsdlSubmitContext

    assertEquals( "hello", PropertyExpander.expandProperties( context, "${#testxml#${testxpath}}" ) );
  }

  public void testXPathExpansion() throws Exception
  {
    WsdlSubmitContext context = new WsdlSubmitContext( null );

    context.setProperty( "test", "<test><value>hello</value></test>" );
    assertEquals( "hello", PropertyExpander.expandProperties( context, "${#test#//value/text()}" ) );
  }
View Full Code Here

Examples of com.eviware.soapui.impl.wsdl.WsdlSubmitContext

    sourceProperty.setValue( "audi" );
    targetProperty.setValue( "<bil><name>bmw</name></bil>" );

    transfer.setTargetPath( "//name/text()" );

    transfer.transferStringToXml( sourceProperty, targetProperty, new WsdlSubmitContext( null ) );
    assertEquals( "<bil><name>audi</name></bil>", targetProperty.getValue() );

    targetProperty.setValue( "<bil><name test=\"test\">bmw</name></bil>" );
    transfer.transferStringToXml( sourceProperty, targetProperty, new WsdlSubmitContext( null ) );

    assertEquals( "<bil><name test=\"test\">audi</name></bil>", targetProperty.getValue() );

    transfer.setTargetPath( "//name/@test" );

    transfer.transferStringToXml( sourceProperty, targetProperty, new WsdlSubmitContext( null ) );
    assertEquals( "<bil><name test=\"audi\">audi</name></bil>", targetProperty.getValue() );
  }
View Full Code Here

Examples of com.eviware.soapui.impl.wsdl.WsdlSubmitContext

    sourceProperty.setValue( "<bil><name>audi</name></bil>" );
    targetProperty.setValue( "" );

    transfer.setSourcePath( "//name/text()" );

    transfer.transferXPathToString( sourceProperty, targetProperty, new WsdlSubmitContext( null ) );
    assertEquals( "audi", targetProperty.getValue() );
  }
View Full Code Here

Examples of com.eviware.soapui.impl.wsdl.WsdlSubmitContext

    sourceProperty.setValue( "<bil></bil>" );
    targetProperty.setValue( "" );

    transfer.setSourcePath( "//name/text()" );

    transfer.transferXPathToString( sourceProperty, targetProperty, new WsdlSubmitContext( null ) );
    assertEquals( null, targetProperty.getValue() );
  }
View Full Code Here

Examples of com.eviware.soapui.impl.wsdl.WsdlSubmitContext

    targetProperty.setValue( "<bil><name>bmw</name></bil>" );

    transfer.setSourcePath( "//name/text()" );
    transfer.setTargetPath( "//name/text()" );

    transfer.transferXPathToXml( sourceProperty, targetProperty, new WsdlSubmitContext( null ) );
    assertEquals( sourceProperty.getValue(), targetProperty.getValue() );

    targetProperty.setValue( "<bil><name test=\"test\">bmw</name></bil>" );
    transfer.transferXPathToXml( sourceProperty, targetProperty, new WsdlSubmitContext( null ) );

    assertEquals( "<bil><name test=\"test\">audi</name></bil>", targetProperty.getValue() );
  }
View Full Code Here

Examples of com.eviware.soapui.impl.wsdl.WsdlSubmitContext

    transfer.setTransferTextContent( true );
    transfer.setSourcePath( "//name" );
    transfer.setTargetPath( "//name2" );

    transfer.transferXPathToXml( sourceProperty, targetProperty, new WsdlSubmitContext( null ) );

    assertEquals( "<bil><name2>audi</name2></bil>", targetProperty.getValue() );
  }
View Full Code Here

Examples of com.eviware.soapui.impl.wsdl.WsdlSubmitContext

    targetProperty.setValue( "<bil><name>bmw</name></bil>" );

    transfer.setSourcePath( "//name/text()" );
    transfer.setTargetPath( "//name/text()" );

    transfer.transferXPathToXml( sourceProperty, targetProperty, new WsdlSubmitContext( null ) );

    assertEquals( "<bil><name/></bil>", targetProperty.getValue() );
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.