Examples of acceptHeader()


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

                        .from("/car/{color}/{brand}")
                        .on(GET)
                        .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
View Full Code Here

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

                        .on(GET)
                        .produces(JSP, JSON)
                        .to(SampleController.class).find(param("id",Long.class));
            }
        });
        routeTester.acceptHeader("application/*;limit=500, text/*").processGetRequest("/car/3");
        verify(routeTester.<SampleController>getController()).find(new Long(3));
        verify(routeTester.jsonResponder()).respond(any(), any(RouteContext.class));
    }
   
    @Test
View Full Code Here

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

                        .from("/car/{color}/somepath/{brand}")
                        .on(GET)
                        .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 {
View Full Code Here

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

                        .on(GET)
                        .produces(JSP)
                        .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
View Full Code Here

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

                        .on(GET)
                        .produces(JSP, JSON)
                        .to(SampleController.class).find(param("id"));
            }
        });
        routeTester.acceptHeader(JSON).processGetRequest("/car/3");
        verify(routeTester.<SampleController>getController()).find("3");
        verify(routeTester.jsonResponder()).respond(any(), any(RouteContext.class));
    }

    @Test
View Full Code Here

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

                        .on(GET)
                        .produces(JSP, JSON)
                        .to(SampleController.class).find(param("id",Long.class));
            }
        });
        routeTester.acceptHeader(JSON).processGetRequest("/car/3");
        verify(routeTester.<SampleController>getController()).find(new Long(3));
        verify(routeTester.jsonResponder()).respond(any(), any(RouteContext.class));
    }

    @Test
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.