Search in sources :

Example 1 with DefaultErrorView

use of com.vaadin.flow.router.legacy.DefaultErrorView in project flow by vaadin.

the class RouterTest method testNavigateToEmptyLocation_triggersDefaultErrorView.

@Test
public void testNavigateToEmptyLocation_triggersDefaultErrorView() {
    UI ui = new RouterTestUI();
    Router router = new Router();
    router.reconfigure(c -> {
    });
    router.navigate(ui, new Location(""), NavigationTrigger.PROGRAMMATIC);
    Assert.assertEquals(new DefaultErrorView().getText(), ui.getElement().getTextRecursively());
}
Also used : DefaultErrorView(com.vaadin.flow.router.legacy.DefaultErrorView) UI(com.vaadin.flow.component.UI) Router(com.vaadin.flow.router.legacy.Router) Location(com.vaadin.flow.router.Location) Test(org.junit.Test)

Aggregations

UI (com.vaadin.flow.component.UI)1 Location (com.vaadin.flow.router.Location)1 DefaultErrorView (com.vaadin.flow.router.legacy.DefaultErrorView)1 Router (com.vaadin.flow.router.legacy.Router)1 Test (org.junit.Test)1