@NotThreadSafe
public interface RequestExpectationListBuilder
HTTP Spy server uses the builder to construct request expectations. User supplies an instance of the builder to method
HttpSpy.expectRequests(com.github.tashoyan.httpspy.RequestExpectationListBuilder). One instance can be used to construct
multiple request expectations.
Concurrency notes. Builder instances are used in a single thread that
prepares requests expectations - typically main thread.
Implementations are not required to be thread safe.
| Modifier and Type | Method and Description |
|---|---|
void |
build()
Builds the list of request expectations.
|
void |
expect(RequestExpectationBuilder requestExpectationBuilder)
Adds a request expectation to this list.
|
List<RequestExpectation> |
getRequestExpectations()
Gets the list of request expectations.
|
List<HttpResponse> |
getResponses()
Gets the list of responses on actual requests.
|
RequestExpectationBuilder |
request()
Returns new request expectation builder that user will use to specify his
expectations.
|
ResponseBuilder |
response()
Returns new response builder that user will use to describe a response on
the actual request.
|
List<RequestExpectation> getRequestExpectations()
List<HttpResponse> getResponses()
void build()
User has to implement this method in order to provide his expectations.
void expect(RequestExpectationBuilder requestExpectationBuilder)
requestExpectationBuilder - Request expectation builder.NullPointerException - requestExpectationBuilder is null.RequestExpectationBuilder request()
ResponseBuilder response()
Copyright © 2016. All rights reserved.