Package fr.imag.adele.apam

Examples of fr.imag.adele.apam.Implementation


    @Override
  public void testReaction () {
    System.out.println("=========== start testReaction test");

    System.out.println("creating 2 instances");
    Implementation implS1 = CST.apamResolver.findImplByName(null,"S1ImplEmpty");
    Instance s1 = implS1.createInstance(null, null);
    Instance s2 = implS1.createInstance(null, null);

    Instance test = CST.componentBroker.getInstService(testReaction) ;
    System.out.println("connected to " + test.getName());
    if (test == s1)
      s2.setProperty("debit", 100) ;
View Full Code Here


  }

  @Test
  public void PropertyEnumTypeSimpleValueSpaceAfter_tc073() {

    Implementation implementation = waitForImplByName(null,
        "SpecEnumVersusSetTestSwitch");
    Instance inst = implementation.createInstance(null, null);

    String propertyName = "barEnumValuedSimple";
    String propertyValue = inst.getProperty(propertyName);
    String expression = "(barEnumValuedSimple=Linux )";
    boolean result = inst.match(expression);
View Full Code Here

  }

    @Override
  public void testPerfLink () {
    System.out.println("=========== start testPerfLink test");
    Implementation impl= CST.apamResolver.findImplByName(null,"S2Impl");

    long overHead = 0 ;
    long fin ;
    long duree ;
    long deb ;
    int nb = 1000;
    int nbInst = 0 ;

    System.out.println("creating 2 instances");
    Implementation implS1 = CST.apamResolver.findImplByName(null,"S1ImplEmpty");
    implS1.createInstance(null, null);
    nbInst++ ;
    implS1.createInstance(null, null);
    nbInst++ ;

    Instance test = null ;

    String s ;
    Link l ;
    for (int k = 0; k < 10; k++) {
      System.out.println("creating 1000 instances");
      for (int i = 0; i < 100; i++) {
        test = implS1.createInstance(null, null);
        nbInst++ ;
      }
      test.setProperty("debit"2000) ;
      for (int j = 0; j < 10; j++) {
View Full Code Here

  }

  @Test
  public void PropertyEnumTypeSimpleValueSpaceBefore_tc074() {

    Implementation implementation = waitForImplByName(null,
        "SpecEnumVersusSetTestSwitch");
    Instance inst = implementation.createInstance(null, null);

    String propertyName = "barEnumValuedSimple";
    String propertyValue = inst.getProperty(propertyName);
    String expression = "(barEnumValuedSimple= Linux)";
    boolean result = inst.match(expression);
View Full Code Here

  }

  @Test
  public void PropertyFilterOSGiImplementationSubSet_Enum_tc061() {

    Implementation implementation = waitForImplByName(null,
        "SpecFilterSwitch");
    Instance inst = implementation.createInstance(null, null);

    String messageTemplate = "%s [expanded expression: %s %s %s] should be %b. By definition the A subset('<*') B means that all A elements must be in B.";

    String expression = "(OS <* {Linux, Windows, Android, IOS})";
    String message = String.format(messageTemplate, expression,
View Full Code Here

  }

  @Test
  public void PropertyFilterOSGiImplementationSubSet_Integer_tc060() {

    Implementation implementation = waitForImplByName(null,
        "SpecFilterSwitch");
    Instance inst = implementation.createInstance(null, null);

    String messageTemplate = "%s [expanded expression: %s %s %s] should be %b. By definition the A subset('<*') B means that all A elements must be in B.";

    String expression = "(setInt <* {12,15,254, 0})";
    String message = String.format(messageTemplate, expression,
View Full Code Here

  }

  @Test
  public void PropertyFilterOSGiImplementationSubSet_String_tc062() {

    Implementation implementation = waitForImplByName(null,
        "SpecFilterSwitch");
    Instance inst = implementation.createInstance(null, null);

    String messageTemplate = "%s [expanded expression: %s %s %s] should be %b. By definition the A subset('<*') B means that all A elements must be in B.";

    String expression = "(setString <* {doubt,grows,with,knowledge})";
    String message = String.format(messageTemplate, expression,
View Full Code Here

  }

  @Test
  public void PropertyFilterOSGiImplementationSuperSet_Enum_tc058() {

    Implementation implementation = waitForImplByName(null,
        "SpecFilterSwitch");
    Instance inst = implementation.createInstance(null, null);

    String messageTemplate = "%s [expanded expression: %s %s %s] should be %b. By definition the A superset('*>') B operator means that A must contain all B elements, although it may contain more.";

    String expression = "(OS *> {Linux, Windows, Android, IOS})";
    String message = String.format(messageTemplate, expression,
View Full Code Here

  }

  @Test
  public void PropertyFilterOSGiImplementationSuperSet_Integer_tc057() {

    Implementation implementation = waitForImplByName(null,
        "SpecFilterSwitch");
    Instance inst = implementation.createInstance(null, null);

    String messageTemplate = "%s [expanded expression: %s %s %s] should be %b. By definition the A superset('*>') B operator means that A must contain all B elements, although it may contain more.";

    String expression = "(setInt *> {12,15,254, 0})";
    String message = String.format(messageTemplate, expression,
View Full Code Here

  }

  @Test
  public void PropertyFilterOSGiImplementationSuperSet_String_tc059() {

    Implementation implementation = waitForImplByName(null,
        "SpecFilterSwitch");
    Instance inst = implementation.createInstance(null, null);

    String messageTemplate = "%s [expanded expression: %s %s %s] should be %b. By definition the A superset('*>') B operator means that A must contain all B elements, although it may contain more.";

    String expression = "(setString *> {doubt,grows,with,knowledge})";
    String message = String.format(messageTemplate, expression,
View Full Code Here

TOP

Related Classes of fr.imag.adele.apam.Implementation

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.