use of com.vaadin.flow.router.legacy.ViewRendererTest.ErrorView in project flow by vaadin.
the class RouterTest method testNavigateToEmptyLocation_triggersErrorView.
@Test
public void testNavigateToEmptyLocation_triggersErrorView() {
UI ui = new RouterTestUI();
Router router = new Router();
router.reconfigure(c -> {
c.setErrorView(ErrorView.class);
});
router.navigate(ui, new Location(""), NavigationTrigger.PROGRAMMATIC);
Assert.assertEquals(new ErrorView().getText(), ui.getElement().getTextRecursively());
}