Examples of jspResponder()


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

                        .to(SampleController.class).save(param("color"), param("brand"));
            }
        });
        routeTester.acceptHeader(HTML).processGetRequest("/car/red/ferrari");
        verify(routeTester.<SampleController>getController()).save("red", "ferrari");
        verify(routeTester.jspResponder()).respond(any(), any(RouteContext.class));
    }
   
    @Test
    public void testRestRouteWithAcceptMediaRange() throws Exception {
        final RouteTester routeTester = RouteTester.from(new AbstractRoutingModule() {
View Full Code Here

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

                        .to(SampleController.class).save(param("color"), param("brand"));
            }
        });
        routeTester.acceptHeader(HTML).processGetRequest("/car/red/somepath/ferrari");
        verify(routeTester.<SampleController>getController()).save("red", "ferrari");
        verify(routeTester.jspResponder()).respond(any(), any(RouteContext.class));
    }
   
    private class CustomResponder extends AbstractRestResponder {
       
        private MediaType customMediaType = new MediaType("application/custom", CustomResponder.class);
View Full Code Here

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

                        .to(SampleController.class).find(param("id"));
            }
        });
        routeTester.acceptHeader(HTML).processGetRequest("/car/3");
        verify(routeTester.<SampleController>getController()).find("3");
        verify(routeTester.jspResponder()).respond(any(), any(RouteContext.class));
    }

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

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

        routeTester.spyController(new SampleController());
        final InvocationResult r = routeTester.process("/cars");
        final Car car = (Car) r.getResult();
        assertThat(car.getColor()).isEqualTo("red");
        assertThat(car.getBrand()).isEqualTo("Ferrari");
        verify(routeTester.jspResponder()).respond(any(), any(RouteContext.class));
    }

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

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

                        .to(SampleController.class).save(param("color", "gray"), param("brand", "Lada"));
            }
        }).acceptHeader(HTML).param("color", "gray");
        routeTester.processPostRequest("/cars");
        verify(routeTester.<SampleController>getController()).save("gray", "Lada");
        verify(routeTester.jspResponder()).respond(any(), any(RouteContext.class));
    }

    @Test
    public void testEntityFormParameter() throws Exception {
        final RouteTester routeTester = RouteTester.from(new AbstractRoutingModule() {
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.