use of com.canoo.platform.remoting.client.Param in project dolphin-platform by canoo.
the class ActionTestControllerTest method callPublicMethodWithCalendarParam.
/**
* End Byte Type Related Action Test
*/
/**
* Start Calendar Type Related Action Test
*/
@Test
public void callPublicMethodWithCalendarParam() {
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 callPublicMethodWithElementTypeParam.
/**
* End UUID Type Related Action Test
*/
/**
* Start ElementType Type Related Action Test
*/
@Test
public void callPublicMethodWithElementTypeParam() {
Assert.assertNull(controller.getModel().getEnumValue());
final ElementType value = ElementType.FIELD;
controller.invoke(PUBLIC_WITH_ELEMENT_TYPE_PARAM_ACTION, new Param(PARAM_NAME, value));
Assert.assertEquals(controller.getModel().getEnumValue(), value);
}
use of com.canoo.platform.remoting.client.Param in project dolphin-platform by canoo.
the class ActionTestControllerTest method callPrivateMethodWithSeveralBigIntegerParams.
@Test
public void callPrivateMethodWithSeveralBigIntegerParams() {
Assert.assertNull(controller.getModel().getBigIntegerValue());
final BigInteger value1 = BigInteger.TEN;
final BigInteger value2 = BigInteger.TEN;
controller.invoke(PRIVATE_WITH_SEVERAL_BIGINTEGER_PARAMS_ACTION, new Param(PARAM_NAME_1, value1), new Param(PARAM_NAME_2, value2));
Assert.assertEquals(controller.getModel().getBigIntegerValue(), value1.add(value2));
}
use of com.canoo.platform.remoting.client.Param in project dolphin-platform by canoo.
the class ActionTestControllerTest method callPublicMethodWithSeveralBigDecimalParams.
@Test
public void callPublicMethodWithSeveralBigDecimalParams() {
Assert.assertNull(controller.getModel().getBigDecimalValue());
final BigDecimal value1 = new BigDecimal(10);
final BigDecimal value2 = new BigDecimal(20);
final BigDecimal value3 = new BigDecimal(30);
controller.invoke(PUBLIC_WITH_SEVERAL_BIGDECIMAL_PARAMS_ACTION, new Param(PARAM_NAME_1, value1), new Param(PARAM_NAME_2, value2), new Param(PARAM_NAME_3, value3));
Assert.assertEquals(controller.getModel().getBigDecimalValue(), value1.add(value2).add(value3));
}
use of com.canoo.platform.remoting.client.Param in project dolphin-platform by canoo.
the class ActionTestControllerTest method callPrivateMethodWithSeveralByteParams.
@Test
public void callPrivateMethodWithSeveralByteParams() {
Assert.assertNull(controller.getModel().getByteValue());
final Byte value1 = 10;
final Byte value2 = 20;
controller.invoke(PRIVATE_WITH_SEVERAL_BYTE_PARAMS_ACTION, new Param(PARAM_NAME_1, value1), new Param(PARAM_NAME_2, value2));
Assert.assertEquals(controller.getModel().getByteValue().byteValue(), (byte) (value1 + value2));
}
Aggregations