use of com.canoo.dp.impl.server.controller.ControllerRepository in project dolphin-platform by canoo.
the class ControllerRepositoryTest method testWrongControllersName.
@Test(expectedExceptions = IllegalArgumentException.class)
public void testWrongControllersName() throws Exception {
ControllerRepository controllerRepository = new ControllerRepository(new DefaultClasspathScanner(ControllerRepositoryTest.class.getPackage().getName()));
controllerRepository.getControllerClassForName("WrongControllerName");
}
use of com.canoo.dp.impl.server.controller.ControllerRepository in project dolphin-platform by canoo.
the class ControllerRepositoryTest method testExistingControllers.
@Test
public void testExistingControllers() throws Exception {
ControllerRepository controllerRepository = new ControllerRepository(new DefaultClasspathScanner(ControllerRepositoryTest.class.getPackage().getName()));
Class<?> controllerClass = controllerRepository.getControllerClassForName(TestController.class.getName());
assertNotNull(controllerClass);
assertEquals(controllerClass, TestController.class);
}
Aggregations