Package org.apache.etch.interoptester

Examples of org.apache.etch.interoptester.Run


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


 
  /** @throws Exception */
  @Test
  public void parse5() throws Exception
  {
    Run r = Run.parse( itest, parseXml( "<run test=\"bar\"></run>" ) );
    assertSame( itest, r.itest() );
    assertEquals( "bar", r.test() );
    assertEquals( 0, r.args().size() );
  }
View Full Code Here

  /** @throws Exception */
  @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>() );
  }
View Full Code Here

 
  /** @throws Exception */
  @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() );
  }
View Full Code Here

 
  /** @throws Exception */
  @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

 
  /** @throws Exception */
  @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

 
  /** @throws Exception */
  @Test
  public void run6() throws Exception
  {
    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() );
  }
View Full Code Here

 
  /** @throws Exception */
  @Test
  public void run7() throws Exception
  {
    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

 
  /** @throws Exception */
  @Test
  public void run8() throws Exception
  {
    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

 
  /** @throws Exception */
  @Test
  public void run9() throws Exception
  {
    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

TOP

Related Classes of org.apache.etch.interoptester.Run

Copyright © 2018 www.massapicom. 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.