Search in sources :

Example 21 with Param

use of com.canoo.platform.remoting.client.Param in project dolphin-platform by canoo.

the class ActionControllerTest method testCallPublicMethodWithCalendarParams.

/**
 * End Byte Type Related Integration Test
 */
/**
 * Start Calendar Type Related Integration Test
 */
@Test(dataProvider = ENDPOINTS_DATAPROVIDER, description = "Tests if an public action method with Calendar param can be called")
public void testCallPublicMethodWithCalendarParams(String containerType, String endpoint) {
    final Calendar value = Calendar.getInstance();
    performActionForCalendar(containerType, endpoint, PUBLIC_WITH_CALENDER_PARAM_ACTION, value, new Param(PARAM_NAME, value));
}
Also used : Calendar(java.util.Calendar) Param(com.canoo.platform.remoting.client.Param) Test(org.testng.annotations.Test)

Example 22 with Param

use of com.canoo.platform.remoting.client.Param in project dolphin-platform by canoo.

the class ActionControllerTest method testCallPublicMethodWithBigDecimalParams.

/**
 * End Double Type Related Integration Test
 */
/**
 * Start BigDecimal Type Related Integration Test
 */
@Test(dataProvider = ENDPOINTS_DATAPROVIDER, description = "Tests if an public action method with BigDecimal param can be called")
public void testCallPublicMethodWithBigDecimalParams(String containerType, String endpoint) {
    final BigDecimal value = BigDecimal.TEN;
    performActionForBigDecimal(containerType, endpoint, PUBLIC_WITH_BIGDECIMAL_PARAM_ACTION, value, new Param(PARAM_NAME, value));
}
Also used : Param(com.canoo.platform.remoting.client.Param) BigDecimal(java.math.BigDecimal) Test(org.testng.annotations.Test)

Example 23 with Param

use of com.canoo.platform.remoting.client.Param in project dolphin-platform by canoo.

the class ActionControllerTest method callPrivateMethodWithSeveralLongParams.

@Test(dataProvider = ENDPOINTS_DATAPROVIDER, description = "Tests if an private action method with several Long param can be called")
public void callPrivateMethodWithSeveralLongParams(String containerType, String endpoint) {
    final long value1 = 1L;
    final long value2 = 2L;
    final long result = value1 + value2;
    performActionForLong(containerType, endpoint, PRIVATE_WITH_SEVERAL_LONG_PARAMS_ACTION, result, new Param(PARAM_NAME_1, value1), new Param(PARAM_NAME_2, value2));
}
Also used : Param(com.canoo.platform.remoting.client.Param) Test(org.testng.annotations.Test)

Example 24 with Param

use of com.canoo.platform.remoting.client.Param in project dolphin-platform by canoo.

the class ActionControllerTest method testCallPublicMethodWithByteParams.

/**
 * End BigInteger Type Related Integration Test
 */
/**
 * Start Byte Type Related Integration Test
 */
@Test(dataProvider = ENDPOINTS_DATAPROVIDER, description = "Tests if an public action method with Byte param can be called")
public void testCallPublicMethodWithByteParams(String containerType, String endpoint) {
    final byte value = 10;
    performActionForByte(containerType, endpoint, PUBLIC_WITH_BYTE_PARAM_ACTION, value, new Param(PARAM_NAME, value));
}
Also used : Param(com.canoo.platform.remoting.client.Param) Test(org.testng.annotations.Test)

Example 25 with Param

use of com.canoo.platform.remoting.client.Param in project dolphin-platform by canoo.

the class ActionControllerTest method testCallPrivateMethodWithIntegerParams.

@Test(dataProvider = ENDPOINTS_DATAPROVIDER, description = "Tests if an private action method with Integer param can be called")
public void testCallPrivateMethodWithIntegerParams(String containerType, String endpoint) {
    final int value = 10;
    performActionForInteger(containerType, endpoint, PRIVATE_WITH_INTEGER_PARAM_ACTION, value, new Param(PARAM_NAME, value));
}
Also used : Param(com.canoo.platform.remoting.client.Param) Test(org.testng.annotations.Test)

Aggregations

Param (com.canoo.platform.remoting.client.Param)95 Test (org.testng.annotations.Test)94 ControllerUnderTest (com.canoo.platform.spring.test.ControllerUnderTest)49 SpringTestNGControllerTest (com.canoo.platform.spring.test.SpringTestNGControllerTest)49 SpringBootTest (org.springframework.boot.test.context.SpringBootTest)49 BigDecimal (java.math.BigDecimal)8 BigInteger (java.math.BigInteger)8 ActionTestBean (com.canoo.dolphin.integration.action.ActionTestBean)5 ClientContext (com.canoo.platform.remoting.client.ClientContext)5 ToDoList (com.canoo.platform.samples.distribution.common.model.ToDoList)4 ElementType (java.lang.annotation.ElementType)4 Calendar (java.util.Calendar)4 Date (java.util.Date)4 UUID (java.util.UUID)4 MappingException (com.canoo.dp.impl.remoting.MappingException)1 CallActionCommand (com.canoo.dp.impl.remoting.commands.CallActionCommand)1 ControllerActionException (com.canoo.platform.remoting.client.ControllerActionException)1 ValueConverterException (com.canoo.platform.remoting.spi.converter.ValueConverterException)1 CompletableFuture (java.util.concurrent.CompletableFuture)1