@ThreadSafe
public interface RequestExpectation
Provides expectations for a request received by HttpSpy. During
verification, the spy server compares every actual request received with its
expectation. In addition, expectation may declare how the spy server should
response on the request.
Concurrency notes. User creates an object of this class when setting
expectations in the thread that runs the test - typically main
thread. During the test execution, another thread reads data from the
expectation object, but does not modify the object. Finally, the original
thread reads the expectation object during verification. Therefore an
implementation should be thread safe.
HttpSpy.verify()| Modifier and Type | Method and Description |
|---|---|
org.hamcrest.Matcher<HttpRequest> |
getRequestMatcher()
Gets matcher to check an actual request against this expectation.
|
org.hamcrest.Matcher<HttpRequest> getRequestMatcher()
Copyright © 2016. All rights reserved.