Examples of errorViewResponder()


Examples of org.jboss.aerogear.controller.mocks.RouteTester.errorViewResponder()

                        .to(SampleController.class).throwSampleControllerException();
            }
        }).acceptHeader(JSP).spyController(new SampleController());
        routeTester.processGetRequest("/home");
        verify(routeTester.getErrorTarget()).error(any(SampleControllerException.class));
        verify(routeTester.errorViewResponder()).respond(anyObject(), any(RouteContext.class));
        assertThat(routeTester.errorViewResponder().getViewResolver()).isInstanceOf(ErrorViewResolver.class);
    }

    @Test
    public void testJsonResponseOnException() throws Exception {
View Full Code Here

Examples of org.jboss.aerogear.controller.mocks.RouteTester.errorViewResponder()

            }
        }).acceptHeader(JSP).spyController(new SampleController());
        routeTester.processGetRequest("/home");
        verify(routeTester.getErrorTarget()).error(any(SampleControllerException.class));
        verify(routeTester.errorViewResponder()).respond(anyObject(), any(RouteContext.class));
        assertThat(routeTester.errorViewResponder().getViewResolver()).isInstanceOf(ErrorViewResolver.class);
    }

    @Test
    public void testJsonResponseOnException() throws Exception {
        final RouteTester routeTester = RouteTester.from(new AbstractRoutingModule() {
View Full Code Here

Examples of org.jboss.aerogear.controller.mocks.RouteTester.errorViewResponder()

                        .to(SampleController.class).throwIllegalStateException();
            }
        }).acceptHeader(JSON).spyController(new SampleController());
        routeTester.processGetRequest("/home");
        verify(routeTester.getErrorTarget()).error(any(SampleControllerException.class));
        verify(routeTester.errorViewResponder()).respond(anyObject(), any(RouteContext.class));
    }
   
}
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.