public interface HttpResponseProvider
http requests. Abstracts where the responses come from.
Used with MockHttpServer.
MockHttpServer| Modifier and Type | Method and Description |
|---|---|
HttpResponse |
getResponse(HttpRequest request)
Gets expected response for given request.
|
void |
verify()
Should be executed when all requests have been submitted.
|
HttpResponse getResponse(HttpRequest request)
request - HttpRequest.null in case we don't know given request.void verify()
throws UnsatisfiedExpectationException
UnsatisfiedExpectationException - In case expectation were not as expected. See
UnsatisfiedExpectationException.getMissingHttpRequests() and
UnsatisfiedExpectationException.getUnexpectedHttpRequests() to get missing and unexpected
requests.Copyright © 2014. All Rights Reserved.