use of com.canoo.platform.remoting.client.Param in project dolphin-platform by canoo.
the class ActionTestControllerTest method callPublicMethodWithBigIntegerParam.
/**
* End BigDecimal Type Related Action Test
*/
/**
* Start BigInteger Type Related Action Test
*/
@Test
public void callPublicMethodWithBigIntegerParam() {
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 callPrivateMethodWithDateParam.
@Test
public void callPrivateMethodWithDateParam() {
Assert.assertNull(controller.getModel().getDateValue());
final Date value = new Date();
controller.invoke(PUBLIC_WITH_DATE_PARAM_ACTION, new Param(PARAM_NAME, value));
Assert.assertEquals(controller.getModel().getDateValue(), value);
}
use of com.canoo.platform.remoting.client.Param in project dolphin-platform by canoo.
the class ActionTestControllerTest method callPrivateMethodWithStringParam.
@Test
public void callPrivateMethodWithStringParam() {
Assert.assertNull(controller.getModel().getBooleanValue());
String value = "Hello Dolphin Platform!";
controller.invoke(PRIVATE_WITH_STRING_PARAM_ACTION, new Param(PARAM_NAME, value));
Assert.assertTrue(controller.getModel().getBooleanValue());
Assert.assertEquals(controller.getModel().getStringValue(), value);
}
use of com.canoo.platform.remoting.client.Param in project dolphin-platform by canoo.
the class ActionTestControllerTest method callPublicMethodWithSeveralFloatParams.
@Test
public void callPublicMethodWithSeveralFloatParams() {
Assert.assertNull(controller.getModel().getFloatValue());
final float value1 = 1F;
final float value2 = 2F;
final float value3 = 3F;
controller.invoke(PUBLIC_WITH_SEVERAL_FLOAT_PARAMS_ACTION, new Param(PARAM_NAME_1, value1), new Param(PARAM_NAME_2, value2), new Param(PARAM_NAME_3, value3));
Assert.assertEquals(controller.getModel().getFloatValue().floatValue(), value1 + value2 + value3);
}
use of com.canoo.platform.remoting.client.Param in project dolphin-platform by canoo.
the class ActionTestControllerTest method callPrivateMethodWithSeveralShortParams.
@Test
public void callPrivateMethodWithSeveralShortParams() {
Assert.assertNull(controller.getModel().getShortValue());
final short value1 = 10;
final short value2 = 10;
controller.invoke(PRIVATE_WITH_SEVERAL_SHORT_PARAMS_ACTION, new Param(PARAM_NAME_1, value1), new Param(PARAM_NAME_2, value2));
Assert.assertEquals(controller.getModel().getShortValue().shortValue(), (short) (value1 + value2));
}
Aggregations