use of com.canoo.platform.remoting.client.Param in project dolphin-platform by canoo.
the class ActionTestControllerTest method callPrivateMethodWithSeveralLongParams.
@Test
public void callPrivateMethodWithSeveralLongParams() {
Assert.assertNull(controller.getModel().getLongValue());
final long value1 = 1L;
final long value2 = 2L;
controller.invoke(PRIVATE_WITH_SEVERAL_LONG_PARAMS_ACTION, new Param(PARAM_NAME_1, value1), new Param(PARAM_NAME_2, value2));
Assert.assertEquals(controller.getModel().getLongValue().longValue(), value1 + value2);
}
use of com.canoo.platform.remoting.client.Param in project dolphin-platform by canoo.
the class ActionTestControllerTest method callPrivateMethodWithLongParam.
@Test
public void callPrivateMethodWithLongParam() {
Assert.assertNull(controller.getModel().getLongValue());
final long value = 10L;
controller.invoke(PUBLIC_WITH_LONG_PARAM_ACTION, new Param(PARAM_NAME, value));
Assert.assertEquals(controller.getModel().getLongValue().longValue(), value);
}
use of com.canoo.platform.remoting.client.Param in project dolphin-platform by canoo.
the class ActionTestControllerTest method callPublicMethodWithUUIDParam.
/**
* End Short Type Related Action Test
*/
/**
* Start UUID Type Related Action Test
*/
@Test
public void callPublicMethodWithUUIDParam() {
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-examples by canoo.
the class ToDoControllerTests method testElementDeleteSync.
@Test
public void testElementDeleteSync() {
// given:
ControllerUnderTest<ToDoList> controllerUnderTest = createController(TODO_CONTROLLER_NAME);
ControllerUnderTest<ToDoList> controllerUnderTest2 = createController(TODO_CONTROLLER_NAME);
// when:
controllerUnderTest.getModel().getNewItemText().set("Banana");
controllerUnderTest.invoke(ADD_ACTION);
controllerUnderTest.invoke(REMOVE_ACTION, new Param(ITEM_PARAM, "Banana"));
// then:
Assert.assertEquals(controllerUnderTest2.getModel().getItems().size(), 0);
}
use of com.canoo.platform.remoting.client.Param in project dolphin-platform by canoo.
the class ActionControllerTest method testCallPublicMethodWithDateParams.
/**
* End Calendar Type Related Integration Test
*/
/**
* Start Date Type Related Integration Test
*/
@Test(dataProvider = ENDPOINTS_DATAPROVIDER, description = "Tests if an public action method with Date param can be called")
public void testCallPublicMethodWithDateParams(String containerType, String endpoint) {
final Date value = new Date();
performActionForDate(containerType, endpoint, PUBLIC_WITH_DATE_PARAM_ACTION, value, new Param(PARAM_NAME, value));
}
Aggregations