Search in sources :

Example 86 with Param

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

the class ActionControllerTest method testCallPrivateMethodWithFloatParams.

@Test(dataProvider = ENDPOINTS_DATAPROVIDER, description = "Tests if an private action method with Float param can be called")
public void testCallPrivateMethodWithFloatParams(String containerType, String endpoint) {
    final float value = 10.0F;
    performActionForFloat(containerType, endpoint, PRIVATE_WITH_FLOAT_PARAM_ACTION, value, new Param(PARAM_NAME, value));
}
Also used : Param(com.canoo.platform.remoting.client.Param) Test(org.testng.annotations.Test)

Example 87 with Param

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

the class ActionControllerTest method testCallPublicMethodWithElementTypeParams.

/**
 * End UUID Type Related Integration Test
 */
/**
 * Start ElementType Type Related Integration Test
 */
@Test(dataProvider = ENDPOINTS_DATAPROVIDER, description = "Tests if an public action method with ElementType param can be called")
public void testCallPublicMethodWithElementTypeParams(String containerType, String endpoint) {
    final ElementType value = ElementType.PARAMETER;
    performActionForElementType(containerType, endpoint, PUBLIC_WITH_ELEMENT_TYPE_PARAM_ACTION, value, new Param(PARAM_NAME, value));
}
Also used : ElementType(java.lang.annotation.ElementType) Param(com.canoo.platform.remoting.client.Param) Test(org.testng.annotations.Test)

Example 88 with Param

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

the class ActionControllerTest method callPrivateMethodWithSeveralByteParams.

@Test(dataProvider = ENDPOINTS_DATAPROVIDER, description = "Tests if an private action method with several Byte param can be called")
public void callPrivateMethodWithSeveralByteParams(String containerType, String endpoint) {
    final byte value1 = 1;
    final byte value2 = 2;
    final byte result = (byte) (value1 + value2);
    performActionForByte(containerType, endpoint, PRIVATE_WITH_SEVERAL_BYTE_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 89 with Param

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

the class ActionControllerTest method testCallPrivateMethodWithBigDecimalParams.

@Test(dataProvider = ENDPOINTS_DATAPROVIDER, description = "Tests if an private action method with BigDecimal param can be called")
public void testCallPrivateMethodWithBigDecimalParams(String containerType, String endpoint) {
    final BigDecimal value = BigDecimal.TEN;
    performActionForBigDecimal(containerType, endpoint, PRIVATE_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 90 with Param

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

the class ActionControllerTest method callPrivateMethodWithSeveralBigDecimalParams.

@Test(dataProvider = ENDPOINTS_DATAPROVIDER, description = "Tests if an private action method with several BigDecimal param can be called")
public void callPrivateMethodWithSeveralBigDecimalParams(String containerType, String endpoint) {
    final BigDecimal value1 = BigDecimal.TEN;
    final BigDecimal value2 = BigDecimal.TEN;
    final BigDecimal result = value1.add(value2);
    performActionForBigDecimal(containerType, endpoint, PRIVATE_WITH_SEVERAL_BIGDECIMAL_PARAMS_ACTION, result, new Param(PARAM_NAME_1, value1), new Param(PARAM_NAME_2, value2));
}
Also used : Param(com.canoo.platform.remoting.client.Param) BigDecimal(java.math.BigDecimal) 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