Package org.apache.etch.interoptester

Examples of org.apache.etch.interoptester.Run.run()


  @Test( expected=RuntimeException.class )
  public void run1() throws Exception
  {
    // test bad not found
    Run r = Run.parse( itest, parseXml( "<run test=\"bad\"/>" ) );
    r.run( new HashMap<String, String>() );
  }
 
  /** @throws Exception */
  @Test
  public void run2() throws Exception
View Full Code Here


  @Test
  public void run2() throws Exception
  {
    Run r = Run.parse( itest, parseXml( "<run test=\"foo\"/>" ) );
    assertNull( test );
    r.run( new HashMap<String, String>() );
    assertEquals( "foo", test.name() );
    assertEquals( 0, test.args.size() );
  }
 
  /** @throws Exception */
 
View Full Code Here

  @Test
  public void run4() throws Exception
  {
    Run r = Run.parse( itest, parseXml( "<run test=\"foo\"><arg name=\"abc\" value=\"234\"/></run>" ) );
    assertNull( test );
    r.run( new HashMap<String, String>() );
    assertEquals( "foo", test.name() );
    assertEquals( 1, test.args.size() );
    assertEquals( "234", test.args.get( "abc" ) );
  }
 
View Full Code Here

  @Test
  public void run5() throws Exception
  {
    Run r = Run.parse( itest, parseXml( "<run test=\"foo\"><arg name=\"abc\">345</arg></run>" ) );
    assertNull( test );
    r.run( new HashMap<String, String>() );
    assertEquals( "foo", test.name() );
    assertEquals( 1, test.args.size() );
    assertEquals( "345", test.args.get( "abc" ) );
  }
 
View Full Code Here

  {
    Run r = Run.parse( itest, parseXml( "<run test=\"bar\"/>" ) );
    assertNull( test );
    Map<String, String> args = new HashMap<String, String>();
    args.put( "abc", "123" );
    r.run( args );
    assertEquals( "bar", test.name() );
    assertEquals( 0, test.args.size() );
  }
 
  /** @throws Exception */
 
View Full Code Here

  {
    Run r = Run.parse( itest, parseXml( "<run test=\"bar\"><arg name=\"abc\" value=\"xy\"/></run>" ) );
    assertNull( test );
    Map<String, String> args = new HashMap<String, String>();
    args.put( "p1", "123" );
    r.run( args );
    assertEquals( "bar", test.name() );
    assertEquals( 1, test.args.size() );
    assertEquals( "xy", test.args.get( "abc" ) );
  }
 
View Full Code Here

  {
    Run r = Run.parse( itest, parseXml( "<run test=\"bar\"><arg name=\"abc\" value=\"x{p2}y\"/></run>" ) );
    assertNull( test );
    Map<String, String> args = new HashMap<String, String>();
    args.put( "p1", "123" );
    r.run( args );
    assertEquals( "bar", test.name() );
    assertEquals( 1, test.args.size() );
    assertEquals( "x{p2}y", test.args.get( "abc" ) );
  }
 
View Full Code Here

  {
    Run r = Run.parse( itest, parseXml( "<run test=\"bar\"><arg name=\"abc\" value=\"x{p1}y\"/></run>" ) );
    assertNull( test );
    Map<String, String> args = new HashMap<String, String>();
    args.put( "p1", "123" );
    r.run( args );
    assertEquals( "bar", test.name() );
    assertEquals( 1, test.args.size() );
    assertEquals( "x123y", test.args.get( "abc" ) );
  }
 
View Full Code Here

  {
    Run r = Run.parse( itest, parseXml( "<run test=\"bar\"><arg name=\"abc\" value=\"x\\{p1}y\"/></run>" ) );
    assertNull( test );
    Map<String, String> args = new HashMap<String, String>();
    args.put( "p1", "123" );
    r.run( args );
    assertEquals( "bar", test.name() );
    assertEquals( 1, test.args.size() );
    assertEquals( "x{p1}y", test.args.get( "abc" ) );
  }
 
View Full Code Here

  {
    Run r = Run.parse( itest, parseXml( "<run test=\"bar\"><arg name=\"abc\" value=\"x\\\\y\"/></run>" ) );
    assertNull( test );
    Map<String, String> args = new HashMap<String, String>();
    args.put( "p1", "123" );
    r.run( args );
    assertEquals( "bar", test.name() );
    assertEquals( 1, test.args.size() );
    assertEquals( "x\\y", test.args.get( "abc" ) );
  }
 
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.