Package org.resthub.web.springmvc.router.support

Examples of org.resthub.web.springmvc.router.support.RouterHandler


    @Then("^the request should be handled by \"([^\"]*)\"$")
    public void the_request_should_be_handled_by(String controllerAction) throws Throwable {

        assertThat(chain).isNotNull();
        RouterHandler handler = (RouterHandler) chain.getHandler();

        assertThat(handler).isNotNull();
        assertThat(handler.getRoute()).isNotNull();
        assertThat(handler.getRoute().action).isNotNull().isEqualToIgnoringCase(controllerAction);
    }
View Full Code Here


    @Then("^the handler should raise a security exception$")
    public void the_handler_should_raise_a_security_exception() throws Throwable {

        assertThat(chain).isNotNull();
        RouterHandler handler = (RouterHandler) chain.getHandler();

        Exception securityException = null;

        try {
            ha.handle(request, new MockHttpServletResponse(), handler);
View Full Code Here

    @Then("^the controller should respond with a ModelAndView containing:$")
    public void the_controller_should_respond_with_a_ModelAndView_containing(List<MaVParams> mavparams) throws Throwable {

        assertThat(chain).isNotNull();
        RouterHandler handler = (RouterHandler) chain.getHandler();

        ModelAndView mv = ha.handle(request, new MockHttpServletResponse(), handler);

        for (MaVParams param : mavparams) {
            assertThat(param.value).isEqualTo(mv.getModel().get(param.key).toString());
View Full Code Here

    }

    @Then("^the server should send an HTTP response with status \"([^\"]*)\"$")
    public void the_server_should_send_an_HTTP_response_with_status(int status) throws Throwable {

        RouterHandler handler = null;
        MockHttpServletResponse response = new MockHttpServletResponse();

        if(chain != null) {
            handler = (RouterHandler) chain.getHandler();
        }
View Full Code Here

TOP

Related Classes of org.resthub.web.springmvc.router.support.RouterHandler

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.