Search in sources :

Example 1 with ControllerTestException

use of com.canoo.platform.spring.test.ControllerTestException in project dolphin-platform by canoo.

the class ClientTestFactory method createController.

public static <T> ControllerUnderTest<T> createController(final TestClientContext clientContext, final String controllerName) {
    Assert.requireNonNull(clientContext, "clientContext");
    Assert.requireNonBlank(controllerName, "controllerName");
    try {
        final ControllerProxy<T> proxy = (ControllerProxy<T>) clientContext.createController(controllerName).get();
        return new ControllerUnderTestWrapper<>(clientContext, proxy);
    } catch (Exception e) {
        throw new ControllerTestException("Can't create controller proxy", e);
    }
}
Also used : ControllerProxy(com.canoo.platform.remoting.client.ControllerProxy) ControllerTestException(com.canoo.platform.spring.test.ControllerTestException) ControllerTestException(com.canoo.platform.spring.test.ControllerTestException)

Aggregations

ControllerProxy (com.canoo.platform.remoting.client.ControllerProxy)1 ControllerTestException (com.canoo.platform.spring.test.ControllerTestException)1