Package org.mockserver.matchers

Examples of org.mockserver.matchers.HttpResponseMatcher


    public Expectation[] retrieveAsExpectations(HttpRequest httpRequest, HttpResponse httpResponse) {
        Expectation[] expectations = expectationSerializer.deserializeArray(apacheHttpClient.sendPUTRequest(uriBase, "/retrieve", (httpRequest != null ? httpRequestSerializer.serialize(httpRequest) : "")));

        if (httpResponse != null) {
            List<Expectation> matchingExpectations = new ArrayList<Expectation>();
            HttpResponseMatcher httpResponseMatcher = new HttpResponseMatcher(httpResponse);
            for (Expectation expectation : expectations) {
                if (httpResponseMatcher.matches(expectation.getHttpResponse(false))) {
                    matchingExpectations.add(expectation);
                }
            }
            expectations = matchingExpectations.toArray(new Expectation[matchingExpectations.size()]);
        }
View Full Code Here

TOP

Related Classes of org.mockserver.matchers.HttpResponseMatcher

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.