Package org.apache.etch.tests.Test1

Examples of org.apache.etch.tests.Test1.Excp1


    Excp2 e2 = (Excp2) vf.importCustomValue( sv );
    assertNotNull( e2 );
    e2 = null;
   
    sv = new StructValue( ValueFactoryTest1._mt_org_apache_etch_tests_Test1_Excp3, vf );
    Excp3 e3 = (Excp3) vf.importCustomValue( sv );
    assertNotNull( e3 );
    e3 = null;
   
    sv = new StructValue( ValueFactoryTest1._mt_org_apache_etch_tests_Test1_Excp4, vf );
    Excp4 e4 = (Excp4) vf.importCustomValue( sv );
View Full Code Here


  @org.junit.Test
  public void method_beets2() throws Exception
  {
    try
    {
      svc.xresult = new Excp3();
      test.beets( E1.B );
      fail( "beets did not throw" );
    }
    catch ( Excp3 e )
    {
View Full Code Here

   
    sv = vf.exportCustomValue( new Excp3() );
    sv.checkType( ValueFactoryTest1._mt_org_apache_etch_tests_Test1_Excp3 );
    assertEquals( 0, sv.size() );
   
    sv = vf.exportCustomValue( new Excp4() );
    sv.checkType( ValueFactoryTest1._mt_org_apache_etch_tests_Test1_Excp4 );
    assertEquals( 0, sv.size() );
   
    // Import exception with object as param
    testExcp5Export(msg, code, Test1.BOOL2);
View Full Code Here

    Excp3 e3 = (Excp3) vf.importCustomValue( sv );
    assertNotNull( e3 );
    e3 = null;
   
    sv = new StructValue( ValueFactoryTest1._mt_org_apache_etch_tests_Test1_Excp4, vf );
    Excp4 e4 = (Excp4) vf.importCustomValue( sv );
    assertNotNull( e4 );
    e4 = null;
   
    // Import exception with object as param
    testExcp5Import(msg, code, Test1.BOOL2);
View Full Code Here

  @org.junit.Test
  public void method_beets3() throws Exception
  {
    try
    {
      svc.xresult = new Excp4();
      test.beets( E1.C );
      fail( "beets did not throw" );
    }
    catch ( Excp4 e )
    {
View Full Code Here

    assertArrayEquals( value, myS4.x );
  }
 
  private void testExcp5Export(String msg, int code, Object value)
  {
    StructValue sv = vf.exportCustomValue( new Excp5( msg, code, value ) );
    sv.checkType( ValueFactoryTest1._mt_org_apache_etch_tests_Test1_Excp5 );
    assertEquals( 3, sv.size() );
    assertEquals( msg, sv.get( ValueFactoryTest1._mf_msg ) );
    assertEquals( code, sv.get( ValueFactoryTest1._mf_code ) );
    assertEquals( value, sv.get( ValueFactoryTest1._mf_x ) );   
View Full Code Here

  {
    StructValue sv = new StructValue( ValueFactoryTest1._mt_org_apache_etch_tests_Test1_Excp5, vf );
    sv.put( ValueFactoryTest1._mf_msg, msg );
    sv.put( ValueFactoryTest1._mf_code, code );
    sv.put( ValueFactoryTest1._mf_x, value );   
    Excp5 e = (Excp5) vf.importCustomValue( sv );
    assertEquals( msg, e.msg );
    assertEquals( code, e.code );
    assertEquals( value, e.x );   
 
View Full Code Here

    assertEquals( value, e.x );   
 
 
  private void testExcp6Export(String msg, int code, Object[] value)
  {
    StructValue sv = vf.exportCustomValue( new Excp6( msg, code, value ) );
    sv.checkType( ValueFactoryTest1._mt_org_apache_etch_tests_Test1_Excp6 );
    assertEquals( 3, sv.size() );
    assertEquals( msg, sv.get( ValueFactoryTest1._mf_msg ) );
    assertEquals( code, sv.get( ValueFactoryTest1._mf_code ) );
    assertEquals( value, sv.get( ValueFactoryTest1._mf_x ) );   
View Full Code Here

  {
    StructValue sv = new StructValue( ValueFactoryTest1._mt_org_apache_etch_tests_Test1_Excp6, vf );
    sv.put( ValueFactoryTest1._mf_msg, msg );
    sv.put( ValueFactoryTest1._mf_code, code );
    sv.put( ValueFactoryTest1._mf_x, value );   
    Excp6 e = (Excp6) vf.importCustomValue( sv );
    assertEquals( msg, e.msg );
    assertEquals( code, e.code );
    assertArrayEquals( value, e.x );   
  }
View Full Code Here

  @org.junit.Test
  public void test_S2_import()
  {
    StructValue sv = new StructValue( ValueFactoryTest1._mt_org_apache_etch_tests_Test1_S2, vf );
   
    sv.put( ValueFactoryTest1._mf_a, new S1( 21, 22, 23 ) );
    sv.put( ValueFactoryTest1._mf_b, new S1( 31, 32, 33 ) );
    sv.put( ValueFactoryTest1._mf_c, E1.A );
   
    S2 s = (S2) vf.importCustomValue( sv );
    assertEquals( 21, s.a.x );
    assertEquals( 22, s.a.y );
View Full Code Here

TOP

Related Classes of org.apache.etch.tests.Test1.Excp1

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.