Package fr.imag.adele.apam.pax.test.impl.deviceSwitch

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


    final String message_fail_set = "Property being declared but after using instance.setAttribute the value inside the component did not correspont to the configured value";
    final String message_fail_callback = "The callback for property change notifications(using 'method' attribute) was not called";

    inst.setProperty(PROPERTY_NAME, VALUE_NEW);

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

    Assert.assertTrue(message_fail_set,
        switchdevice.getState().equals(VALUE_NEW));

    Assert.assertTrue(message_fail_callback,
        switchdevice.getStateChangedCounter() > 0);

  }
View Full Code Here


    final String message_fail_set = "Property being declared but after using instance.setAttribute the value inside the component did not correspont to the configured value";
    final String message_fail_callback = "The callback for property change notifications(using 'method' attribute) was called %s times, and should have been called only once";

    inst.setProperty(PROPERTY_NAME, VALUE_NEW);

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

    Assert.assertTrue(message_fail_set,
        switchdevice.getState().equals(VALUE_NEW));

    Assert.assertTrue(
        String.format(message_fail_callback,
            switchdevice.getStateChangedCounter()),
        switchdevice.getStateChangedCounter() == 1);

  }
View Full Code Here

TOP

Related Classes of fr.imag.adele.apam.pax.test.impl.deviceSwitch.PropertyChangeNotificationSwitch

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.