Package com.github.restdriver.clientdriver

Examples of com.github.restdriver.clientdriver.RequestMatcher


        when(mockHttpResponse.getOutputStream()).thenReturn(mockServletOutputStream);
    }
   
    @Test
    public void unexpected_request_error_should_include_expectations() throws IOException, ServletException {
        RequestMatcher requestMatcher = mock(RequestMatcher.class);
        when(requestMatcher.isMatch((RealRequest) anyObject(), (ClientDriverRequest) anyObject())).thenReturn(false);
       
        DefaultClientDriverJettyHandler sut = new DefaultClientDriverJettyHandler(requestMatcher);
        sut.addExpectation(new ClientDriverRequest("/not_matched").withMethod(Method.POST), realResponse);
       
        try {
View Full Code Here


        }
    }
   
    @Test
    public void unexpected_request_should_not_fail_fast_if_excluded() throws IOException, ServletException {
        RequestMatcher requestMatcher = mock(RequestMatcher.class);
        when(requestMatcher.isMatch((RealRequest) anyObject(), (ClientDriverRequest) anyObject())).thenReturn(false);
       
        DefaultClientDriverJettyHandler sut = new DefaultClientDriverJettyHandler(requestMatcher);
        sut.addExpectation(new ClientDriverRequest("/not_matched").withMethod(Method.POST), realResponse);
        sut.noFailFastOnUnexpectedRequest();
        sut.handle("", mockRequest, mockHttpRequest, mockHttpResponse);
View Full Code Here

TOP

Related Classes of com.github.restdriver.clientdriver.RequestMatcher

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.