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);
}
}
Aggregations