Package com.vaadin.navigator

Examples of com.vaadin.navigator.View.enter()


    public void testNavigateToUnknownView() {
        TestNavigator navigator = new TestNavigator();

        View errorView = EasyMock.createMock(View.class);
        errorView.enter(EasyMock.anyObject(ViewChangeEvent.class));
        EasyMock.replay(errorView);

        try {
            navigator.navigateTo("doesnotexist");
            fail("Should throw IllegalArgumentException");
View Full Code Here


        navigator.setErrorView(errorView);
        navigator.navigateTo("doesnotexist");

        View testView = EasyMock.createMock(View.class);
        testView.enter(EasyMock.anyObject(ViewChangeEvent.class));
        EasyMock.replay(testView);

        navigator.addView("doesnotexist", testView);
        navigator.navigateTo("doesnotexist");
View Full Code Here

        navigator.addView("doesnotexist", testView);
        navigator.navigateTo("doesnotexist");

        View errorView2 = EasyMock.createMock(View.class);
        errorView2.enter(EasyMock.anyObject(ViewChangeEvent.class));
        EasyMock.replay(errorView2);

        ViewProvider errorProvider = EasyMock.createMock(ViewProvider.class);
        EasyMock.expect(errorProvider.getView("doesnotexist2")).andReturn(
                errorView2);
View Full Code Here

        View view = control.createMock(View.class);
        ViewDisplay display = control.createMock(ViewDisplay.class);

        display.showView(view);
        view.enter(EasyMock.anyObject(ViewChangeEvent.class));

        control.replay();

        NavigationStateManager manager = EasyMock
                .createNiceMock(NavigationStateManager.class);
View Full Code Here

        EasyMock.expect(manager.getState()).andReturn("test1");

        EasyMock.expect(provider.getViewName("test2/")).andReturn("test2");
        EasyMock.expect(provider.getView("test2")).andReturn(view2);
        EasyMock.expect(manager.getState()).andReturn("test1");
        view2.enter(eventParametersEqual(""));
        display.showView(view2);
        manager.setState("test2");
        EasyMock.expect(manager.getState()).andReturn("test2");

        EasyMock.expect(provider.getViewName("test1/params"))
View Full Code Here

        manager.setNavigator(EasyMock.anyObject(Navigator.class));

        EasyMock.expect(provider.getViewName("test2")).andReturn("test2");
        EasyMock.expect(provider.getView("test2")).andReturn(view2);
        EasyMock.expect(manager.getState()).andReturn("view1");
        view2.enter(eventParametersEqual(""));
        display.showView(view2);
        manager.setState("test2");

        EasyMock.expect(provider.getViewName("")).andReturn("test1");
        EasyMock.expect(provider.getView("test1")).andReturn(view1);
View Full Code Here

        EasyMock.expect(provider.getView("test2")).andReturn(view2);
        ViewChangeEvent event2 = new ViewChangeEvent(navigator, view1, view2,
                "test2", "");
        listener.addExpectedIsViewChangeAllowed(event2, true);
        EasyMock.expect(manager.getState()).andReturn("test1");
        view2.enter(eventParametersEqual(""));
        display.showView(view2);
        manager.setState("test2");
        listener.addExpectedNavigatorViewChange(event2);

        control.replay();
View Full Code Here

        EasyMock.expect(manager.getState()).andReturn("view1");
        ViewChangeEvent event4 = new ViewChangeEvent(navigator, view1, view2,
                "test2", "");
        listener1.addExpectedIsViewChangeAllowed(event4, true);
        listener2.addExpectedIsViewChangeAllowed(event4, true);
        view2.enter(EasyMock.isA(ViewChangeEvent.class));
        display.showView(view2);
        manager.setState("test2");
        listener1.addExpectedNavigatorViewChange(event4);
        listener2.addExpectedNavigatorViewChange(event4);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.