use of com.canoo.platform.remoting.client.Param in project dolphin-platform by canoo.
the class ActionControllerTest method callPublicMethodWithSeveralLongParams.
@Test(dataProvider = ENDPOINTS_DATAPROVIDER, description = "Tests if an public action method with several Long param can be called")
public void callPublicMethodWithSeveralLongParams(String containerType, String endpoint) {
final long value1 = 1L;
final long value2 = 2L;
final long value3 = 3L;
final long result = value1 + value2 + value3;
performActionForLong(containerType, endpoint, PUBLIC_WITH_SEVERAL_LONG_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 callPrivateMethodWithSeveralFloatParams.
@Test(dataProvider = ENDPOINTS_DATAPROVIDER, description = "Tests if an private action method with several Float param can be called")
public void callPrivateMethodWithSeveralFloatParams(String containerType, String endpoint) {
final float value1 = 1.0F;
final float value2 = 2.0F;
final float result = value1 + value2;
performActionForFloat(containerType, endpoint, PRIVATE_WITH_SEVERAL_FLOAT_PARAMS_ACTION, result, new Param(PARAM_NAME_1, value1), new Param(PARAM_NAME_2, value2));
}
use of com.canoo.platform.remoting.client.Param in project dolphin-platform by canoo.
the class ActionControllerTest method testCallWithParam.
@Test(dataProvider = ENDPOINTS_DATAPROVIDER, description = "Tests if an private action method with one param can be called")
public void testCallWithParam(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, "Yeah!"));
Assert.assertTrue(controller.getModel().getBooleanValue());
Assert.assertEquals(controller.getModel().getStringValue(), "Yeah!");
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 callPrivateMethodWithSeveralBigIntegerParams.
@Test(dataProvider = ENDPOINTS_DATAPROVIDER, description = "Tests if an private action method with several BigInteger param can be called")
public void callPrivateMethodWithSeveralBigIntegerParams(String containerType, String endpoint) {
final BigInteger value1 = BigInteger.TEN;
final BigInteger value2 = BigInteger.TEN;
final BigInteger result = value1.add(value2);
performActionForBigInteger(containerType, endpoint, PRIVATE_WITH_SEVERAL_BIGINTEGER_PARAMS_ACTION, result, new Param(PARAM_NAME_1, value1), new Param(PARAM_NAME_2, value2));
}
use of com.canoo.platform.remoting.client.Param in project dolphin-platform by canoo.
the class ActionControllerTest method callPrivateMethodWithSeveralDoubleParams.
@Test(dataProvider = ENDPOINTS_DATAPROVIDER, description = "Tests if an private action method with several Double param can be called")
public void callPrivateMethodWithSeveralDoubleParams(String containerType, String endpoint) {
final double value1 = 1.0;
final double value2 = 2.0;
final double result = value1 + value2;
performActionForDouble(containerType, endpoint, PRIVATE_WITH_SEVERAL_DOUBLE_PARAMS_ACTION, result, new Param(PARAM_NAME_1, value1), new Param(PARAM_NAME_2, value2));
}
Aggregations