Search in sources :

Example 81 with Param

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

the class ActionControllerTest method testCallPrivateMethodWithElementTypeParams.

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

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

the class ActionControllerTest method testCallPrivateMethodWithDoubleParams.

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

Example 83 with Param

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

the class ActionControllerTest method callPublicMethodWithSeveralFloatParams.

@Test(dataProvider = ENDPOINTS_DATAPROVIDER, description = "Tests if an public action method with several Float param can be called")
public void callPublicMethodWithSeveralFloatParams(String containerType, String endpoint) {
    final float value1 = 1.0F;
    final float value2 = 2.0F;
    final float value3 = 3.0F;
    final float result = value1 + value2 + value3;
    performActionForFloat(containerType, endpoint, PUBLIC_WITH_SEVERAL_FLOAT_PARAMS_ACTION, result, new Param(PARAM_NAME_1, value1), new Param(PARAM_NAME_2, value2), new Param(PARAM_NAME_3, value3));
}
Also used : Param(com.canoo.platform.remoting.client.Param) Test(org.testng.annotations.Test)

Example 84 with Param

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

the class ActionControllerTest method callPublicMethodWithSeveralBigDecimalParams.

@Test(dataProvider = ENDPOINTS_DATAPROVIDER, description = "Tests if an public action method with several BigDecimal param can be called")
public void callPublicMethodWithSeveralBigDecimalParams(String containerType, String endpoint) {
    final BigDecimal value1 = BigDecimal.TEN;
    final BigDecimal value2 = BigDecimal.TEN;
    final BigDecimal value3 = BigDecimal.TEN;
    final BigDecimal result = value1.add(value2).add(value3);
    performActionForBigDecimal(containerType, endpoint, PUBLIC_WITH_SEVERAL_BIGDECIMAL_PARAMS_ACTION, result, new Param(PARAM_NAME_1, value1), new Param(PARAM_NAME_2, value2), new Param(PARAM_NAME_3, value3));
}
Also used : Param(com.canoo.platform.remoting.client.Param) BigDecimal(java.math.BigDecimal) Test(org.testng.annotations.Test)

Example 85 with Param

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

the class ActionControllerTest method testCallPrivateMethodWithShortParams.

@Test(dataProvider = ENDPOINTS_DATAPROVIDER, description = "Tests if an private action method with Short param can be called")
public void testCallPrivateMethodWithShortParams(String containerType, String endpoint) {
    final short value = 10;
    performActionForShort(containerType, endpoint, PRIVATE_WITH_SHORT_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