use of com.canoo.platform.remoting.client.Param in project dolphin-platform by canoo.
the class ActionTestControllerTest method callPrivateMethodWithNullParam.
@Test
public void callPrivateMethodWithNullParam() {
Assert.assertNull(controller.getModel().getBooleanValue());
controller.invoke(PRIVATE_WITH_STRING_PARAM_ACTION, new Param(PARAM_NAME, null));
Assert.assertTrue(controller.getModel().getBooleanValue());
Assert.assertNull(controller.getModel().getStringValue());
}
use of com.canoo.platform.remoting.client.Param in project dolphin-platform by canoo.
the class ActionTestControllerTest method callPublicMethodWithSeveralIntegerParams.
@Test
public void callPublicMethodWithSeveralIntegerParams() {
Assert.assertNull(controller.getModel().getIntegerValue());
final int value1 = 1;
final int value2 = 2;
final int value3 = 3;
controller.invoke(PUBLIC_WITH_SEVERAL_INTEGER_PARAMS_ACTION, new Param(PARAM_NAME_1, value1), new Param(PARAM_NAME_2, value2), new Param(PARAM_NAME_3, value3));
Assert.assertEquals(controller.getModel().getIntegerValue().intValue(), value1 + value2 + value3);
}
use of com.canoo.platform.remoting.client.Param in project dolphin-platform by canoo.
the class ActionTestControllerTest method callPublicMethodWithFloatParam.
/**
* End Long Type Related Action Test
*/
/**
* Start Float Type Related Action Test
*/
@Test
public void callPublicMethodWithFloatParam() {
Assert.assertNull(controller.getModel().getFloatValue());
final float value = 10F;
controller.invoke(PUBLIC_WITH_FLOAT_PARAM_ACTION, new Param(PARAM_NAME, value));
Assert.assertEquals(controller.getModel().getFloatValue().floatValue(), value);
}
use of com.canoo.platform.remoting.client.Param in project dolphin-platform by canoo.
the class ActionControllerTest method testCallPublicMethodWithLongParams.
/**
* End Integer Type Related Integration Test
*/
/**
* Start Long Type Related Integration Test
*/
@Test(dataProvider = ENDPOINTS_DATAPROVIDER, description = "Tests if an public action method with Long param can be called")
public void testCallPublicMethodWithLongParams(String containerType, String endpoint) {
final long value = 10L;
performActionForLong(containerType, endpoint, PUBLIC_WITH_LONG_PARAM_ACTION, value, new Param(PARAM_NAME, value));
}
use of com.canoo.platform.remoting.client.Param in project dolphin-platform by canoo.
the class ActionControllerTest method testCallPublicMethodWithShortParams.
/**
* End Date Type Related Integration Test
*/
/**
* Start Short Type Related Integration Test
*/
@Test(dataProvider = ENDPOINTS_DATAPROVIDER, description = "Tests if an public action method with Short param can be called")
public void testCallPublicMethodWithShortParams(String containerType, String endpoint) {
final short value = 10;
performActionForShort(containerType, endpoint, PUBLIC_WITH_SHORT_PARAM_ACTION, value, new Param(PARAM_NAME, value));
}
Aggregations