Package fr.imag.adele.apam.tests.app

Examples of fr.imag.adele.apam.tests.app.Implems1tct026


  @Test
  public void testPropertyInjectionFloat_tct031() {
    logger.debug("Testing injected properties setting for float, using the API");
    Instance instanceS1 = waitForInstByName(null, "instance-s1-tct026");
    Implems1tct026 objectS1 = (Implems1tct026)instanceS1.getServiceObject();

   
    instanceS1.setProperty("prop-injboth", new Float(10.12));
    testPropertyGetFloat(instanceS1, "prop-injboth", (float) 10.12);
    Assert.assertEquals("Incorrect float value ",
        Float.valueOf((float)10.12),
        objectS1.getInjboth());
   
    instanceS1.setProperty("prop-injexternal", new Float(10.12));
    testPropertyGetFloat(instanceS1, "prop-injexternal", (float) 10.12);
    Assert.assertEquals("Incorrect float value ",
        Float.valueOf((float)10.12),
        objectS1.getInjexternal());
   

    logger.debug("Testing injected properties setting for float, using java");
    objectS1.setInjboth((float)77.88);
    testPropertyGetFloat(instanceS1, "prop-injboth", (float) 77.88);
    Assert.assertEquals("Incorrect float value ",
        Float.valueOf((float)77.88),
        objectS1.getInjboth())

    objectS1.setInjinternal((float)88.99);
    testPropertyGetFloat(instanceS1, "prop-injinternal", (float) 88.99);
    Assert.assertEquals("Incorrect float value ",
        Float.valueOf((float)88.99),
        objectS1.getInjinternal());   
  }
View Full Code Here


    Instance instanceDefault = implemS1.createInstance(null, null); //prop valued default = 0.1
    Instance instanceNegative = implemS1.createInstance(null, null);
    instanceNegative.setProperty("prop-valued", "-12.43"); //setted using descriptor
   
    Instance instancePositive = implemS1.createInstance(null, null);//setted using java
    Implems1tct026 obj = (Implems1tct026)instancePositive.getServiceObject();
    obj.setPropValued((float)43);
   
    Implementation implemR = waitForImplByName(null, "relationToImplem-s1-tct026");
    Instance instR = implemR.createInstance(null, null);

    Assert.assertEquals("Should have only two instance lower than 0.4",2, instR.getLinkDests("lessImplems").size());
View Full Code Here

TOP

Related Classes of fr.imag.adele.apam.tests.app.Implems1tct026

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.