Package org.jboss.aerogear.controller

Examples of org.jboss.aerogear.controller.SampleController


                        .from("/ints")
                        .on(RequestMethod.GET)
                        .produces(JSON)
                        .to(SampleController.class).findByWithCustomParamNames(param(PaginationInfo.class), param("brand"));
            }
        }).acceptHeader(JSON).addResponder(new JsonResponder()).spyController(new SampleController());
        final InvocationResult result = routeTester.processGetRequest("/ints?brand=BMW&myoffset=50&mylimit=5");
        final HttpServletResponse response = result.getRouteContext().getResponse();
        verify(routeTester.<SampleController>getController()).findByWithCustomParamNames(any(PaginationInfo.class), eq("BMW"));
        verify(response).setHeader("TS-Links-Previous", "http://localhost:8080/test/ints?brand=BMW&myoffset=45&mylimit=5");
        verify(response, never()).setHeader(eq("TS-Links-Next"), anyString());
View Full Code Here


                        .from("/cars")
                        .on(RequestMethod.GET)
                        .produces(JSP)
                        .to(SampleController.class).find(param("color"), param("brand", "Ferrari"));
            }
        }).spyController(new SampleController());
        final InvocationResult result = routeTester.acceptHeader(JSP).processGetRequest("/cars");
        assertThat(result.getResult()).isInstanceOf(MissingRequestParameterException.class);
    }   
View Full Code Here

TOP

Related Classes of org.jboss.aerogear.controller.SampleController

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.