use of com.canoo.platform.remoting.client.Param in project dolphin-platform by canoo.
the class ActionTestControllerTest method callPrivateMethodWithSeveralFloatParams.
@Test
public void callPrivateMethodWithSeveralFloatParams() {
Assert.assertNull(controller.getModel().getFloatValue());
final float value1 = 1F;
final float value2 = 2F;
controller.invoke(PRIVATE_WITH_SEVERAL_FLOAT_PARAMS_ACTION, new Param(PARAM_NAME_1, value1), new Param(PARAM_NAME_2, value2));
Assert.assertEquals(controller.getModel().getFloatValue().floatValue(), value1 + value2);
}
use of com.canoo.platform.remoting.client.Param in project dolphin-platform by canoo.
the class ActionTestControllerTest method callPrivateMethodWithBigDecimalParam.
@Test
public void callPrivateMethodWithBigDecimalParam() {
Assert.assertNull(controller.getModel().getBigDecimalValue());
final BigDecimal value = new BigDecimal(10);
controller.invoke(PUBLIC_WITH_BIGDECIMAL_PARAM_ACTION, new Param(PARAM_NAME, value));
Assert.assertEquals(controller.getModel().getBigDecimalValue(), value);
}
use of com.canoo.platform.remoting.client.Param in project dolphin-platform by canoo.
the class ActionTestControllerTest method callPublicMethodWithSeveralShortParams.
@Test
public void callPublicMethodWithSeveralShortParams() {
Assert.assertNull(controller.getModel().getShortValue());
final short value1 = 10;
final short value2 = 10;
final short value3 = 10;
controller.invoke(PUBLIC_WITH_SEVERAL_SHORT_PARAMS_ACTION, new Param(PARAM_NAME_1, value1), new Param(PARAM_NAME_2, value2), new Param(PARAM_NAME_3, value3));
Assert.assertEquals(controller.getModel().getShortValue().shortValue(), (short) (value1 + value2 + value3));
}
use of com.canoo.platform.remoting.client.Param in project dolphin-platform by canoo.
the class ActionTestControllerTest method callPrivateMethodWithBigIntegerParam.
@Test
public void callPrivateMethodWithBigIntegerParam() {
Assert.assertNull(controller.getModel().getBigIntegerValue());
final BigInteger value = BigInteger.TEN;
controller.invoke(PUBLIC_WITH_BIGINTEGER_PARAM_ACTION, new Param(PARAM_NAME, value));
Assert.assertEquals(controller.getModel().getBigIntegerValue(), value);
}
use of com.canoo.platform.remoting.client.Param in project dolphin-platform by canoo.
the class ActionTestControllerTest method callPrivateMethodWithSeveralDoubleParams.
@Test
public void callPrivateMethodWithSeveralDoubleParams() {
Assert.assertNull(controller.getModel().getDoubleValue());
final double value1 = 1.0;
final double value2 = 2.0;
controller.invoke(PRIVATE_WITH_SEVERAL_DOUBLE_PARAMS_ACTION, new Param(PARAM_NAME_1, value1), new Param(PARAM_NAME_2, value2));
Assert.assertEquals(controller.getModel().getDoubleValue().doubleValue(), value1 + value2);
}
Aggregations