Package fr.imag.adele.apam

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


  String expression = "(manufacturer=philips)";
  Boolean result = true;

  Assert.assertTrue(String.format(messageTemplate, expression, result,
    manufacturer, currentVoltage, voltage), philipsSwitch
    .match(expression));

  expression = "(voltage=110)";
  result = true;
View Full Code Here


  expression = "(voltage=110)";
  result = true;

  Assert.assertTrue(String.format(messageTemplate, expression, result,
    manufacturer, currentVoltage, voltage), philipsSwitch
    .match(expression));

  expression = "(currentVoltage <= 110)";
  result = true;
View Full Code Here

  expression = "(currentVoltage <= 110)";
  result = true;

  Assert.assertTrue(String.format(messageTemplate, expression, result,
    manufacturer, currentVoltage, voltage), philipsSwitch
    .match(expression));

  expression = "(currentVoltage >= 111)";
  result = false;
View Full Code Here

  expression = "(currentVoltage >= 111)";
  result = false;

  Assert.assertFalse(String.format(messageTemplate, expression, result,
    manufacturer, currentVoltage, voltage), philipsSwitch
    .match(expression));

  expression = "(futfut)";
  result = false;
View Full Code Here

  expression = "(futfut)";
  result = false;

  Assert.assertFalse(String.format(messageTemplate, expression, result,
    manufacturer, currentVoltage, voltage), philipsSwitch
    .match(expression));

  expression = "(&(manufacturer!=philips)(manufacturer=philips))";
  result = false;
View Full Code Here

  expression = "(&(manufacturer!=philips)(manufacturer=philips))";
  result = false;

  Assert.assertFalse(String.format(messageTemplate, expression, result,
    manufacturer, currentVoltage, voltage), philipsSwitch
    .match(expression));

  expression = "(&(manufacturer=philips)(manufacturer=philips))";
  result = true;
View Full Code Here

  expression = "(&(manufacturer=philips)(manufacturer=philips))";
  result = true;

  Assert.assertTrue(String.format(messageTemplate, expression, result,
    manufacturer, currentVoltage, voltage), philipsSwitch
    .match(expression));

    }

    @Test
View Full Code Here

      // Check if all valid instances were injected
      Assert.assertTrue(
        String.format(
          "Instance %s (currentVoltage:%s) was injected even if its does not obey the constraint (currentVoltage<=110)",
          p.getName(), p.getProperty("currentVoltage")), p
          .match("(currentVoltage<=110)"));
      Assert.assertTrue(
        String.format(
          "Instance %s (currentVoltage:%s) was not found in the list of valid instances for the constraint (currentVoltage<=110)",
          p.getName(), p.getProperty("currentVoltage")),
View Full Code Here

      // Check if all valid instances were injected
      Assert.assertTrue(
        String.format(
          "Instance %s (currentVoltage:%s) was injected even if its does not obey the constraint (currentVoltage <= 110)",
          p.getName(), p.getProperty("currentVoltage")), p
          .match("(currentVoltage <= 110)"));
      Assert.assertTrue(
        String.format(
          "Instance %s (currentVoltage:%s) was not found in the list of valid instances for the constraint (currentVoltage <= 110)",
          p.getName(), p.getProperty("currentVoltage")),
View Full Code Here

    message = String
        .format("Calling match method with filter = %s, should result in True since hasDisplay is %b",
            "(hasDisplay=false)",
            samsungInst.getProperty("hasDisplay"));

    Assert.assertTrue(message, samsungInst.match("(hasDisplay=false)"));

    message = String
        .format("Calling match method with filter = %s, should result in False since hasDisplay is %b",
            "(hasDisplay=true)",
            samsungInst.getProperty("hasDisplay"));
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.