"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));
}