use of com.canoo.dolphin.integration.action.ActionTestBean in project dolphin-platform by canoo.
the class ActionControllerTest method performActionForUUID.
private void performActionForUUID(final String containerType, final String endpoint, final String action, final UUID result, final Param... params) {
try {
final ClientContext context = connect(endpoint);
final ControllerProxy<ActionTestBean> controller = createController(context, ACTION_CONTROLLER_NAME);
invoke(controller, action, containerType, params);
Assert.assertEquals(controller.getModel().getUuidValue(), result);
destroy(controller, endpoint);
disconnect(context, endpoint);
} catch (Exception e) {
Assert.fail("Can not create controller for " + containerType, e);
}
}
use of com.canoo.dolphin.integration.action.ActionTestBean in project dolphin-platform by canoo.
the class ActionControllerTest method performActionForByte.
private void performActionForByte(final String containerType, final String endpoint, final String action, final byte result, final Param... params) {
try {
final ClientContext context = connect(endpoint);
final ControllerProxy<ActionTestBean> controller = createController(context, ACTION_CONTROLLER_NAME);
invoke(controller, action, containerType, params);
Assert.assertEquals(controller.getModel().getByteValue().byteValue(), result);
destroy(controller, endpoint);
disconnect(context, endpoint);
} catch (Exception e) {
Assert.fail("Can not create controller for " + containerType, e);
}
}
use of com.canoo.dolphin.integration.action.ActionTestBean in project dolphin-platform by canoo.
the class ActionControllerTest method testCallPublicMethodWithNullParam.
@Test(dataProvider = ENDPOINTS_DATAPROVIDER, description = "Tests if an public action with null value for param method can be called")
public void testCallPublicMethodWithNullParam(String containerType, String endpoint) {
try {
final ClientContext context = connect(endpoint);
final ControllerProxy<ActionTestBean> controller = createController(context, ACTION_CONTROLLER_NAME);
invoke(controller, PUBLIC_WITH_BOOLEAN_PARAM_ACTION, containerType, new Param(PARAM_NAME, null));
Assert.assertNull(controller.getModel().getBooleanValue());
destroy(controller, endpoint);
disconnect(context, endpoint);
} catch (Exception e) {
Assert.fail("Can not create controller for " + containerType, e);
}
}
use of com.canoo.dolphin.integration.action.ActionTestBean in project dolphin-platform by canoo.
the class ActionControllerTest method performActionForDate.
private void performActionForDate(final String containerType, final String endpoint, final String action, final Date result, final Param... params) {
try {
final ClientContext context = connect(endpoint);
final ControllerProxy<ActionTestBean> controller = createController(context, ACTION_CONTROLLER_NAME);
invoke(controller, action, containerType, params);
Assert.assertEquals(controller.getModel().getDateValue(), result);
destroy(controller, endpoint);
disconnect(context, endpoint);
} catch (Exception e) {
Assert.fail("Can not create controller for " + containerType, e);
}
}
use of com.canoo.dolphin.integration.action.ActionTestBean in project dolphin-platform by canoo.
the class ActionControllerTest method performActionForFloat.
private void performActionForFloat(final String containerType, final String endpoint, final String action, final float result, final Param... params) {
try {
final ClientContext context = connect(endpoint);
final ControllerProxy<ActionTestBean> controller = createController(context, ACTION_CONTROLLER_NAME);
invoke(controller, action, containerType, params);
Assert.assertEquals(controller.getModel().getFloatValue().floatValue(), result);
destroy(controller, endpoint);
disconnect(context, endpoint);
} catch (Exception e) {
Assert.fail("Can not create controller for " + containerType, e);
}
}
Aggregations