use of com.canoo.platform.remoting.client.Param in project dolphin-platform by canoo.
the class ActionTestControllerTest method callPrivateMethodWithShortParam.
@Test
public void callPrivateMethodWithShortParam() {
Assert.assertNull(controller.getModel().getShortValue());
final short value = 10;
controller.invoke(PUBLIC_WITH_SHORT_PARAM_ACTION, new Param(PARAM_NAME, value));
Assert.assertEquals(controller.getModel().getShortValue().shortValue(), value);
}
use of com.canoo.platform.remoting.client.Param in project dolphin-platform by canoo.
the class ActionTestControllerTest method callPrivateMethodWithUUIDParam.
@Test
public void callPrivateMethodWithUUIDParam() {
Assert.assertNull(controller.getModel().getUuidValue());
final UUID value = UUID.randomUUID();
controller.invoke(PUBLIC_WITH_UUID_PARAM_ACTION, new Param(PARAM_NAME, value));
Assert.assertEquals(controller.getModel().getUuidValue(), value);
}
use of com.canoo.platform.remoting.client.Param in project dolphin-platform by canoo.
the class ActionTestControllerTest method callPrivateMethodWithElementTypeParam.
@Test
public void callPrivateMethodWithElementTypeParam() {
Assert.assertNull(controller.getModel().getEnumValue());
final ElementType value = ElementType.METHOD;
controller.invoke(PUBLIC_WITH_ELEMENT_TYPE_PARAM_ACTION, new Param(PARAM_NAME, value));
Assert.assertEquals(controller.getModel().getEnumValue().compareTo(value), 0);
}
use of com.canoo.platform.remoting.client.Param in project dolphin-platform by canoo.
the class ActionTestControllerTest method callPublicMethodWithSeveralByteParams.
@Test
public void callPublicMethodWithSeveralByteParams() {
Assert.assertNull(controller.getModel().getByteValue());
final Byte value1 = 10;
final Byte value2 = 20;
final Byte value3 = 30;
controller.invoke(PUBLIC_WITH_SEVERAL_BYTE_PARAMS_ACTION, new Param(PARAM_NAME_1, value1), new Param(PARAM_NAME_2, value2), new Param(PARAM_NAME_3, value3));
Assert.assertEquals(controller.getModel().getByteValue().byteValue(), (byte) (value1 + value2 + value3));
}
use of com.canoo.platform.remoting.client.Param in project dolphin-platform by canoo.
the class ActionTestControllerTest method callPublicMethodWithDateParam.
/**
* End Calendar Type Related Action Test
*/
/**
* Start Date Type Related Action Test
*/
@Test
public void callPublicMethodWithDateParam() {
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);
}
Aggregations