use of com.vaadin.flow.router.RouterLayout in project flow by vaadin.
the class NavigationStateRendererTest method getRouterLayoutForMulipleLayers.
@Test
public void getRouterLayoutForMulipleLayers() throws Exception {
NavigationStateRenderer childRenderer = new NavigationStateRenderer(navigationStateFromTarget(ChildConfiguration.class));
List<Class<? extends RouterLayout>> routerLayoutTypes = childRenderer.getRouterLayoutTypes(ChildConfiguration.class);
Assert.assertEquals("Not all expected layouts were found", 2, routerLayoutTypes.size());
Assert.assertEquals("Wrong class found as first in array", MiddleLayout.class, routerLayoutTypes.get(0));
Assert.assertEquals("Wrong class found as second in array", RouteParentLayout.class, routerLayoutTypes.get(1));
}
use of com.vaadin.flow.router.RouterLayout in project flow by vaadin.
the class NavigationStateRendererTest method getRouterLayoutForSingleParent.
@Test
public void getRouterLayoutForSingleParent() throws Exception {
NavigationStateRenderer childRenderer = new NavigationStateRenderer(navigationStateFromTarget(SingleView.class));
List<Class<? extends RouterLayout>> routerLayoutTypes = childRenderer.getRouterLayoutTypes(SingleView.class);
Assert.assertEquals("Not all expected layouts were found", 1, routerLayoutTypes.size());
Assert.assertEquals("Wrong class found", RouteParentLayout.class, routerLayoutTypes.get(0));
}
Aggregations