use of com.vaadin.flow.theme.ThemeDefinition in project flow by vaadin.
the class FrontendDependenciesTest method appShellConfigurator_collectedAsEndpoint.
@Test
public void appShellConfigurator_collectedAsEndpoint() throws ClassNotFoundException {
Mockito.when(classFinder.getSubTypesOf(AppShellConfigurator.class)).thenReturn(Collections.singleton(MyAppShell.class));
Mockito.when(classFinder.loadClass(FakeLumo.class.getName())).thenReturn((Class) FakeLumo.class);
FrontendDependencies dependencies = new FrontendDependencies(classFinder, false);
Assert.assertEquals("UI and AppShell should be found", 2, dependencies.getEndPoints().size());
AbstractTheme theme = dependencies.getTheme();
Assert.assertNotNull("Theme not found in endpoint", theme);
ThemeDefinition themeDefinition = dependencies.getThemeDefinition();
Assert.assertNotNull("ThemeDefinition is not filled", themeDefinition);
Assert.assertEquals(FakeLumo.class, themeDefinition.getTheme());
}
Aggregations