use of com.canoo.platform.remoting.client.Param in project dolphin-platform by canoo.
the class ActionControllerTest method testCallPublicMethodWithIntegerParams.
/**
* Start Integer Type Related Integration Test
*/
@Test(dataProvider = ENDPOINTS_DATAPROVIDER, description = "Tests if an public action method with Integer param can be called")
public void testCallPublicMethodWithIntegerParams(String containerType, String endpoint) {
final int value = 10;
performActionForInteger(containerType, endpoint, PUBLIC_WITH_INTEGER_PARAM_ACTION, value, new Param(PARAM_NAME, value));
}
use of com.canoo.platform.remoting.client.Param in project dolphin-platform by canoo.
the class ActionControllerTest method callPublicMethodWithSeveralIntegerParams.
@Test(dataProvider = ENDPOINTS_DATAPROVIDER, description = "Tests if an public action method with several Integer param can be called")
public void callPublicMethodWithSeveralIntegerParams(String containerType, String endpoint) {
final int value1 = 1;
final int value2 = 2;
final int value3 = 3;
final int result = value1 + value2 + value3;
performActionForInteger(containerType, endpoint, PUBLIC_WITH_SEVERAL_INTEGER_PARAMS_ACTION, result, new Param(PARAM_NAME_1, value1), new Param(PARAM_NAME_2, value2), new Param(PARAM_NAME_3, value3));
}
use of com.canoo.platform.remoting.client.Param 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.platform.remoting.client.Param in project dolphin-platform by canoo.
the class ActionControllerTest method testCallPrivateMethodWithByteParams.
@Test(dataProvider = ENDPOINTS_DATAPROVIDER, description = "Tests if an private action method with Byte param can be called")
public void testCallPrivateMethodWithByteParams(String containerType, String endpoint) {
final byte value = 10;
performActionForByte(containerType, endpoint, PRIVATE_WITH_BYTE_PARAM_ACTION, value, new Param(PARAM_NAME, value));
}
use of com.canoo.platform.remoting.client.Param in project dolphin-platform by canoo.
the class ActionControllerTest method testCallPublicMethodWithUUIDParams.
/**
* End Short Type Related Integration Test
*/
/**
* Start UUID Type Related Integration Test
*/
@Test(dataProvider = ENDPOINTS_DATAPROVIDER, description = "Tests if an public action method with UUID param can be called")
public void testCallPublicMethodWithUUIDParams(String containerType, String endpoint) {
final UUID value = UUID.randomUUID();
performActionForUUID(containerType, endpoint, PUBLIC_WITH_UUID_PARAM_ACTION, value, new Param(PARAM_NAME, value));
}
Aggregations