Package fr.imag.adele.apam

Examples of fr.imag.adele.apam.Instance.match()


    inst.setProperty("OS", "Android,") ; // ok
    System.out.println("\nOS value is : " + inst.getProperty("OS"));
    ok = inst.match("(OS=Android)";
    System.out.println("Matching: (OS=Android): " + ok);   
    ok = inst.match("(OS >=Android)";
    System.out.println("Matching: (OS >=Android): " + ok);   
    System.out.println("\n");


    inst.setProperty("OS", "vxxx") ; //
View Full Code Here


    Instance inst = implementation.createInstance(null, null);

    String propertyName = "barEnumValuedSimple";
    String propertyValue = inst.getProperty(propertyName);
    String expression = "(barEnumValuedSimple=Linux)";
    boolean result = inst.match(expression);
    boolean expected = true;

    String message = String
        .format("The result of the expression %s was %s, but was expected %s, because the property %s had the value %s",
            expression, result, expected, propertyName,
View Full Code Here

    Instance inst = implementation.createInstance(null, null);

    String propertyName = "barEnumValuedSimple";
    String propertyValue = inst.getProperty(propertyName);
    String expression = "(barEnumValuedSimple=Linux )";
    boolean result = inst.match(expression);
    boolean expected = true;

    String message = String
        .format("The result of the expression %s was %s, but was expected %s, because the property %s had the value %s",
            expression, result, expected, propertyName,
View Full Code Here

    Instance inst = implementation.createInstance(null, null);

    String propertyName = "barEnumValuedSimple";
    String propertyValue = inst.getProperty(propertyName);
    String expression = "(barEnumValuedSimple= Linux)";
    boolean result = inst.match(expression);
    boolean expected = true;

    String message = String
        .format("The result of the expression %s was %s, but was expected %s, because the property %s had the value %s",
            expression, result, expected, propertyName,
View Full Code Here

    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,
        inst.getProperty("OS"), "<*", inst.getProperty("OS"), true);
    Assert.assertTrue(message, inst.match(expression));

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

    expression = "(OS <* {IOS, Windows, Linux,Android})";
    message = String.format(messageTemplate, expression,
        inst.getProperty("OS"), "<*", inst.getProperty("OSUnordered"),
        true);
    Assert.assertTrue(message, inst.match(expression));

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

    expression = "(OS <* {Linux, Windows, IOS})";
    message = String.format(messageTemplate, expression,
        inst.getProperty("OS"), "<*",
        inst.getProperty("OSLessElements"), false);
    Assert.assertTrue(message, !inst.match(expression));

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

    expression = "(OS <* {Linux, Windows, Android,IOS,AmigaOS})";
    message = String.format(messageTemplate, expression,
        inst.getProperty("OS"), "<*",
        inst.getProperty("OSMoreElements"), true);
    Assert.assertTrue(message, inst.match(expression));

  }

  @Test
  public void PropertyFilterOSGiImplementationSubSet_Integer_tc060() {
View Full Code Here

    String expression = "(setInt <* {12,15,254, 0})";
    String message = String.format(messageTemplate, expression,
        inst.getProperty("setInt"), "<*", inst.getProperty("setInt"),
        true);
    Assert.assertTrue(message, inst.match(expression));

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

    expression = "(setInt <* {254,15,12,0})";
    message = String.format(messageTemplate, expression,
        inst.getProperty("setInt"), "<*",
        inst.getProperty("setIntUnordered"), true);
    Assert.assertTrue(message, inst.match(expression));

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

TOP
Copyright © 2018 www.massapi.com. 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.