Examples of spyController()


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

                        .on(RequestMethod.POST)
                        .produces(JSP)
                        .to(SampleController.class).save(param("color"), param("brand"));
            }
        }).requestMethod(POST).acceptHeader(HTML).param("color", "red").param("brand", "Ferrari");
        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));
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.