use of com.canoo.dolphin.integration.property.PropertyTestBean in project dolphin-platform by canoo.
the class PropertyControllerTest method testPropertyChange.
@Test(dataProvider = ENDPOINTS_DATAPROVIDER, description = "Test if all property changed are fired")
public void testPropertyChange(String containerType, String endpoint) {
try {
ClientContext context = connect(endpoint);
ControllerProxy<PropertyTestBean> controller = createController(context, PROPERTY_CONTROLLER_NAME);
invoke(controller, SET_TO_DEFAULTS_ACTION, containerType);
invoke(controller, ADD_CHANGE_LISTENER, containerType);
controller.getModel().setBigDecimalValue(null);
controller.getModel().setBigIntegerValue(null);
controller.getModel().setBooleanValue(null);
controller.getModel().setByteValue(null);
controller.getModel().setCalendarValue(null);
controller.getModel().setDateValue(null);
controller.getModel().setDoubleValue(null);
controller.getModel().setEnumValue(null);
controller.getModel().setFloatValue(null);
controller.getModel().setIntegerValue(null);
controller.getModel().setLongValue(null);
controller.getModel().setShortValue(null);
controller.getModel().setStringValue(null);
controller.getModel().setUuidValue(null);
invoke(controller, PING, containerType);
Assert.assertTrue(controller.getModel().getBigDecimalValueChanged());
Assert.assertTrue(controller.getModel().getBigIntegerValueChanged());
Assert.assertTrue(controller.getModel().getBooleanValueChanged());
Assert.assertTrue(controller.getModel().getByteValueChanged());
Assert.assertTrue(controller.getModel().getCalenderValueChanged());
Assert.assertTrue(controller.getModel().getDateValueChanged());
Assert.assertTrue(controller.getModel().getDoubleValueChanged());
Assert.assertTrue(controller.getModel().getEnumValueChanged());
Assert.assertTrue(controller.getModel().getFloatValueChanged());
Assert.assertTrue(controller.getModel().getIntegerValueChanged());
Assert.assertTrue(controller.getModel().getLongValueChanged());
Assert.assertTrue(controller.getModel().getShortValueChanged());
Assert.assertTrue(controller.getModel().getStringValueChanged());
Assert.assertTrue(controller.getModel().getUuidValueChanged());
destroy(controller, endpoint);
disconnect(context, endpoint);
} catch (Exception e) {
Assert.fail("Can not create controller for " + containerType, e);
}
}
use of com.canoo.dolphin.integration.property.PropertyTestBean in project dolphin-platform by canoo.
the class PropertyControllerTest method testNoPropertyChangeOnSameSide.
@Test(dataProvider = ENDPOINTS_DATAPROVIDER, description = "Test if all no property changed are fired at same side")
public void testNoPropertyChangeOnSameSide(String containerType, String endpoint) {
try {
ClientContext context = connect(endpoint);
ControllerProxy<PropertyTestBean> controller = createController(context, PROPERTY_CONTROLLER_NAME);
invoke(controller, SET_TO_DEFAULTS_ACTION, containerType);
invoke(controller, ADD_CHANGE_LISTENER, containerType);
invoke(controller, SET_TO_DEFAULTS_ACTION, containerType);
Assert.assertFalse(controller.getModel().getBigDecimalValueChanged());
Assert.assertFalse(controller.getModel().getBigIntegerValueChanged());
Assert.assertFalse(controller.getModel().getBooleanValueChanged());
Assert.assertFalse(controller.getModel().getByteValueChanged());
Assert.assertFalse(controller.getModel().getCalenderValueChanged());
Assert.assertFalse(controller.getModel().getDateValueChanged());
Assert.assertFalse(controller.getModel().getDoubleValueChanged());
Assert.assertFalse(controller.getModel().getEnumValueChanged());
Assert.assertFalse(controller.getModel().getFloatValueChanged());
Assert.assertFalse(controller.getModel().getIntegerValueChanged());
Assert.assertFalse(controller.getModel().getLongValueChanged());
Assert.assertFalse(controller.getModel().getShortValueChanged());
Assert.assertFalse(controller.getModel().getStringValueChanged());
Assert.assertFalse(controller.getModel().getUuidValueChanged());
destroy(controller, endpoint);
disconnect(context, endpoint);
} catch (Exception e) {
Assert.fail("Can not create controller for " + containerType, e);
}
}
use of com.canoo.dolphin.integration.property.PropertyTestBean in project dolphin-platform by canoo.
the class PropertyControllerTest method testPropertyChangeUnsubscribe.
@Test(dataProvider = ENDPOINTS_DATAPROVIDER, description = "Test if all unsubscribe for changes is working")
public void testPropertyChangeUnsubscribe(String containerType, String endpoint) {
try {
ClientContext context = connect(endpoint);
ControllerProxy<PropertyTestBean> controller = createController(context, PROPERTY_CONTROLLER_NAME);
invoke(controller, ADD_CHANGE_LISTENER, containerType);
invoke(controller, SET_TO_DEFAULTS_ACTION, containerType);
invoke(controller, REMOVE_CHANGE_LISTENER, containerType);
controller.getModel().setBigDecimalValue(null);
controller.getModel().setBigIntegerValue(null);
controller.getModel().setBooleanValue(null);
controller.getModel().setByteValue(null);
controller.getModel().setCalendarValue(null);
controller.getModel().setDateValue(null);
controller.getModel().setDoubleValue(null);
controller.getModel().setEnumValue(null);
controller.getModel().setFloatValue(null);
controller.getModel().setIntegerValue(null);
controller.getModel().setLongValue(null);
controller.getModel().setShortValue(null);
controller.getModel().setStringValue(null);
controller.getModel().setUuidValue(null);
invoke(controller, PING, containerType);
Assert.assertFalse(controller.getModel().getBigDecimalValueChanged());
Assert.assertFalse(controller.getModel().getBigIntegerValueChanged());
Assert.assertFalse(controller.getModel().getBooleanValueChanged());
Assert.assertFalse(controller.getModel().getByteValueChanged());
Assert.assertFalse(controller.getModel().getCalenderValueChanged());
Assert.assertFalse(controller.getModel().getDateValueChanged());
Assert.assertFalse(controller.getModel().getDoubleValueChanged());
Assert.assertFalse(controller.getModel().getEnumValueChanged());
Assert.assertFalse(controller.getModel().getFloatValueChanged());
Assert.assertFalse(controller.getModel().getIntegerValueChanged());
Assert.assertFalse(controller.getModel().getLongValueChanged());
Assert.assertFalse(controller.getModel().getShortValueChanged());
Assert.assertFalse(controller.getModel().getStringValueChanged());
Assert.assertFalse(controller.getModel().getUuidValueChanged());
destroy(controller, endpoint);
disconnect(context, endpoint);
} catch (Exception e) {
Assert.fail("Can not create controller for " + containerType, e);
}
}
Aggregations