use of com.canoo.platform.remoting.client.Param in project dolphin-platform by canoo.
the class ActionTestControllerTest method callPrivateMethodWithCalendarParam.
@Test
public void callPrivateMethodWithCalendarParam() {
Assert.assertNull(controller.getModel().getCalendarValue());
final Calendar value = Calendar.getInstance();
controller.invoke(PUBLIC_WITH_CALENDER_PARAM_ACTION, new Param(PARAM_NAME, value));
Assert.assertEquals(controller.getModel().getCalendarValue().getTime(), value.getTime());
}
use of com.canoo.platform.remoting.client.Param in project dolphin-platform by canoo.
the class ActionTestControllerTest method callPrivateMethodWithSeveralIntegerParams.
@Test
public void callPrivateMethodWithSeveralIntegerParams() {
Assert.assertNull(controller.getModel().getIntegerValue());
final int value1 = 1;
final int value2 = 2;
controller.invoke(PRIVATE_WITH_SEVERAL_INTEGER_PARAMS_ACTION, new Param(PARAM_NAME_1, value1), new Param(PARAM_NAME_2, value2));
Assert.assertEquals(controller.getModel().getIntegerValue().intValue(), value1 + value2);
}
use of com.canoo.platform.remoting.client.Param in project dolphin-platform by canoo.
the class ActionTestControllerTest method callPublicMethodWithDoubleParam.
/**
* End Float Type Related Action Test
*/
/**
* Start Double Type Related Action Test
*/
@Test
public void callPublicMethodWithDoubleParam() {
Assert.assertNull(controller.getModel().getDoubleValue());
final double value = 10.0;
controller.invoke(PUBLIC_WITH_DOUBLE_PARAM_ACTION, new Param(PARAM_NAME, value));
Assert.assertEquals(controller.getModel().getDoubleValue().doubleValue(), value);
}
use of com.canoo.platform.remoting.client.Param in project dolphin-platform by canoo.
the class ActionTestControllerTest method callPublicMethodWithSeveralLongParams.
@Test
public void callPublicMethodWithSeveralLongParams() {
Assert.assertNull(controller.getModel().getLongValue());
final long value1 = 1L;
final long value2 = 2L;
final long value3 = 3L;
controller.invoke(PUBLIC_WITH_SEVERAL_LONG_PARAMS_ACTION, new Param(PARAM_NAME_1, value1), new Param(PARAM_NAME_2, value2), new Param(PARAM_NAME_3, value3));
Assert.assertEquals(controller.getModel().getLongValue().longValue(), value1 + value2 + value3);
}
use of com.canoo.platform.remoting.client.Param in project dolphin-platform by canoo.
the class ActionTestControllerTest method callPrivateMethodWithIntegerParam.
@Test
public void callPrivateMethodWithIntegerParam() {
Assert.assertNull(controller.getModel().getIntegerValue());
final int value = 10;
controller.invoke(PUBLIC_WITH_INTEGER_PARAM_ACTION, new Param(PARAM_NAME, value));
Assert.assertEquals(controller.getModel().getIntegerValue().intValue(), value);
}
Aggregations