use of com.canoo.dolphin.integration.action.ActionTestBean in project dolphin-platform by canoo.
the class ActionControllerTest method performActionForBigInteger.
private void performActionForBigInteger(final String containerType, final String endpoint, final String action, final BigInteger 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().getBigIntegerValue(), 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 performActionForInteger.
private void performActionForInteger(final String containerType, final String endpoint, final String action, final int 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().getIntegerValue().intValue(), 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 performActionForShort.
private void performActionForShort(final String containerType, final String endpoint, final String action, final short 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().getShortValue().shortValue(), 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 testCallWithNullParam.
@Test(dataProvider = ENDPOINTS_DATAPROVIDER, description = "Tests if an private action method with null value for param can be called")
public void testCallWithNullParam(String containerType, String endpoint) {
try {
final ClientContext context = connect(endpoint);
final ControllerProxy<ActionTestBean> controller = createController(context, ACTION_CONTROLLER_NAME);
invoke(controller, PRIVATE_WITH_STRING_PARAM_ACTION, containerType, new Param(PARAM_NAME, null));
Assert.assertTrue(controller.getModel().getBooleanValue());
Assert.assertEquals(controller.getModel().getStringValue(), null);
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 performActionForLong.
private void performActionForLong(final String containerType, final String endpoint, final String action, final long 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().getLongValue().longValue(), result);
destroy(controller, endpoint);
disconnect(context, endpoint);
} catch (Exception e) {
Assert.fail("Can not create controller for " + containerType, e);
}
}
Aggregations