public interface RequestManager
Modifier and Type | Method and Description |
---|---|
void |
evaluateVerification(Collection<org.hamcrest.Matcher<? super Request>> requestPredicates,
org.hamcrest.Matcher<Integer> nrRequestsPredicate)
Verifies whether the number of received http requests fitting the given predicates is as expected.
|
int |
numberOfRequestsMatching(Collection<org.hamcrest.Matcher<? super Request>> predicates)
Deprecated.
this (rather internal) method has been deprecated. Please use
evaluateVerification(java.util.Collection, org.hamcrest.Matcher) instead |
StubResponse |
provideStubResponseFor(Request req)
Returns a stub response for the given request.
|
StubResponse provideStubResponseFor(Request req)
req
- http request to return a stub response fornull
)void evaluateVerification(Collection<org.hamcrest.Matcher<? super Request>> requestPredicates, org.hamcrest.Matcher<Integer> nrRequestsPredicate)
VerificationException
is thrown and the exact reason is logged on the INFO
level.requestPredicates
- predicates about the http requests received so far (cannot be null
, can be
empty however)nrRequestsPredicate
- a predicate about the number of http requests received so far which fit the given
request predicates (cannot be null
)VerificationException
- if the verification fails@Deprecated int numberOfRequestsMatching(Collection<org.hamcrest.Matcher<? super Request>> predicates)
evaluateVerification(java.util.Collection, org.hamcrest.Matcher)
insteadpredicates
- predicates to be applied on all incoming http requestsprovideStubResponseFor(net.jadler.Request)
matching the
given matchersCopyright © 2016. All Rights Reserved.