Examples of PropertyTypeBooleanChangeNotificationSwitch


Examples of fr.imag.adele.apam.pax.test.impl.deviceSwitch.PropertyTypeBooleanChangeNotificationSwitch

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

    inst.setProperty("state", propertyValue);

    PropertyTypeBooleanChangeNotificationSwitch switchdevice = (PropertyTypeBooleanChangeNotificationSwitch) inst
        .getServiceObject();

    Assert.assertTrue(String.format(prologTemplate,
        "Although the invocation was not performed."), switchdevice
        .getObjectReceivedInNotification() != null);

    String messageWrongType = String
        .format(prologTemplate,
            "Although the invocation was not performed with the right type. ");
    String messageWrongTypeDetail = String.format(messageWrongType
        + " %s given instead of %s", switchdevice
        .getObjectReceivedInNotification().getClass()
        .getCanonicalName(), Boolean.class.getCanonicalName());

    Assert.assertTrue(
        messageWrongTypeDetail,
        switchdevice.getObjectReceivedInNotification() instanceof Boolean);

    String messageWrongValue = String
        .format(prologTemplate,
            "Although the invocation was not performed with the right value. ");
    String messageWrongValueDetail = String.format(messageWrongValue
        + " %s given instead of %s",
        switchdevice.getObjectReceivedInNotification(), propertyValue);

    Assert.assertTrue(messageWrongValueDetail, switchdevice
        .getObjectReceivedInNotification().equals(propertyValue));

  }
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.