Package org.jboss.aerogear.controller.router

Examples of org.jboss.aerogear.controller.router.AbstractRoutingModule


        verify(routeTester.jsonResponder(), never()).respond(anyObject(), any(RouteContext.class));
    }

    @Test
    public void testDefaultErrorRoute() throws Exception {
        final RouteTester routeTester = RouteTester.from(new AbstractRoutingModule() {
            @Override
            public void configuration() throws Exception {
                route()
                        .from("/home").on(RequestMethod.GET, RequestMethod.POST)
                        .to(SampleController.class).throwSampleControllerException();
View Full Code Here


        assertThat(routeTester.errorViewResponder().getViewResolver()).isInstanceOf(ErrorViewResolver.class);
    }

    @Test
    public void testJsonResponseOnException() throws Exception {
        final RouteTester routeTester = RouteTester.from(new AbstractRoutingModule() {
            @Override
            public void configuration() throws Exception {
                route()
                        .on(IllegalStateException.class)
                        .produces(JSON)
View Full Code Here

        assertThat(routeTester.getStringWriter().toString()).isEqualTo("[]");
    }
   
    @Test
    public void testDefaultErrorRouteJsonRequested() throws Exception {
        final RouteTester routeTester = RouteTester.from(new AbstractRoutingModule() {
            @Override
            public void configuration() throws Exception {
                route()
                        .from("/home")
                        .on(RequestMethod.GET)
View Full Code Here

TOP

Related Classes of org.jboss.aerogear.controller.router.AbstractRoutingModule

Copyright © 2018 www.massapicom. 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.