Package fr.imag.adele.apam.app1.s1.spec

Examples of fr.imag.adele.apam.app1.s1.spec.S1


        Implementation implS1 = CST.apamResolver.findImplByName(null,"S1ImplEmpty");
        Instance s1 = implS1.createInstance(null, null);
        Instance s2 = implS1.createInstance(null, null);


        S1 testReaction = perfWire.getFieldTestReaction();
        Assert.assertNotNull("S1 field testReaction not resoved", testReaction);

        Instance test = CST.componentBroker.getInstService(testReaction) ;
        System.out.println("connected to " + test.getName());
        if (test == s1)
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

 
  /** */
  @org.junit.Test
  public void test_S1_export()
  {
    StructValue sv = vf.exportCustomValue( new S1( 19, 23, 29 ) );
    sv.checkType( ValueFactoryTest1._mt_org_apache_etch_tests_Test1_S1 );
    assertEquals( 3, sv.size() );
    assertEquals( 19, sv.get( ValueFactoryTest1._mf_x ) );
    assertEquals( 23, sv.get( ValueFactoryTest1._mf_y ) );
    assertEquals( 29, sv.get( ValueFactoryTest1._mf_z ) );
View Full Code Here

  {
    StructValue sv = new StructValue( ValueFactoryTest1._mt_org_apache_etch_tests_Test1_S1, vf );
    sv.put( ValueFactoryTest1._mf_x, 101 );
    sv.put( ValueFactoryTest1._mf_y, 103 );
    sv.put( ValueFactoryTest1._mf_z, 107 );
    S1 s = (S1) vf.importCustomValue( sv );
    assertEquals( 101, s.x );
    assertEquals( 103, s.y );
    assertEquals( 107, s.z );
  }
View Full Code Here

 
  /** */
  @org.junit.Test
  public void test_S2_export()
  {
    S1 a = new S1( 21, 22, 23 );
    S1 b = new S1( 31, 32, 33 );
    E1 c = E1.A;
   
    StructValue sv = vf.exportCustomValue( new S2( a, b, c ) );
    sv.checkType( ValueFactoryTest1._mt_org_apache_etch_tests_Test1_S2 );
    assertEquals( 3, sv.size() );
View Full Code Here

  /** @throws Exception */
  @org.junit.Test
  public void method_dist1() throws Exception
  {
    svc.xresult = Math.sqrt( 3 );
    S1 arg1 =  new S1( 1, 1, 1 );
    S1 arg2 = new S1( 0, 0, 0 );
    assertEquals( Math.sqrt( 3 ), test.dist( arg1, arg2 ) );
    check( What.CALL,
      ValueFactoryTest1._mt_org_apache_etch_tests_Test1_dist,
      new Field[] { ValueFactoryTest1._mf_a, ValueFactoryTest1._mf_b },
      new Object[] { arg1, arg2 },
View Full Code Here

  /** @throws Exception */
  @org.junit.Test
  public void method_dist2() throws Exception
  {
    svc.xresult = Math.sqrt( 35 );
    S1 arg1 = new S1( 1, 2, 3 );
    S1 arg2 = new S1( 6, 5, 4 );
    assertEquals( Math.sqrt( 35 ), test.dist( arg1, arg2 ) );
    check( What.CALL,
      ValueFactoryTest1._mt_org_apache_etch_tests_Test1_dist,
      new Field[] { ValueFactoryTest1._mf_a, ValueFactoryTest1._mf_b },
      new Object[] { arg1, arg2 },
View Full Code Here

  /** @throws Exception */
  @org.junit.Test
  public void method_dist3() throws Exception
  {
    svc.xresult = Math.sqrt( 56 );
    S1 arg1 = new S1( 1, 2, 3 );
    S1 arg2 = new S1( -1, -2, -3 );
    assertEquals( Math.sqrt( 56 ), test.dist( arg1, arg2 ) );
    check( What.CALL,
      ValueFactoryTest1._mt_org_apache_etch_tests_Test1_dist,
      new Field[] { ValueFactoryTest1._mf_a, ValueFactoryTest1._mf_b },
      new Object[] { arg1, arg2 },
View Full Code Here

 
  /** @throws Exception */
  @org.junit.Test
  public void method_p_S1_null() throws Exception
  {
    S1 a = null;
    svc.xresult = a;
    S1 r = test.p_S1( a );
    assertObjectEquals( a, r );
    check( What.CALL,
      ValueFactoryTest1._mt_org_apache_etch_tests_Test1_p_S1,
      new Field[] {},
      new Object[] {},
View Full Code Here

 
  /** @throws Exception */
  @org.junit.Test
  public void method_p_S1() throws Exception
  {
    S1 a = new S1( 1, 2, 3 );
    svc.xresult = a;
    S1 r = test.p_S1( a );
    assertObjectEquals( a, r );
    check( What.CALL,
      ValueFactoryTest1._mt_org_apache_etch_tests_Test1_p_S1,
      new Field[] { ValueFactoryTest1._mf_a },
      new Object[] { a },
View Full Code Here

TOP

Related Classes of fr.imag.adele.apam.app1.s1.spec.S1

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.