Search in sources :

Example 1 with Component1

use of com.vaadin.flow.server.frontend.scanner.ScannerTestComponents.Component1 in project flow by vaadin.

the class ClassFinderTest method should_Fail_when_DifferentClasLoader.

@Test
public void should_Fail_when_DifferentClasLoader() throws Exception {
    ClassLoader loader = new ClassLoader() {

        @Override
        public Class<?> loadClass(String name) throws ClassNotFoundException {
            throw new ClassNotFoundException();
        }
    };
    exception.expect(ClassNotFoundException.class);
    DefaultClassFinder finder = new DefaultClassFinder(loader, Component1.class);
    finder.loadClass(Component1.class.getName());
}
Also used : DefaultClassFinder(com.vaadin.flow.server.frontend.scanner.ClassFinder.DefaultClassFinder) Component1(com.vaadin.flow.server.frontend.scanner.ScannerTestComponents.Component1) Test(org.junit.Test)

Aggregations

DefaultClassFinder (com.vaadin.flow.server.frontend.scanner.ClassFinder.DefaultClassFinder)1 Component1 (com.vaadin.flow.server.frontend.scanner.ScannerTestComponents.Component1)1 Test (org.junit.Test)1