Package com.spotify.apollo.test
Class StubClient.StubbedResponseBuilder
- java.lang.Object
-
- com.spotify.apollo.test.StubClient.StubbedResponseBuilder
-
- Enclosing class:
- StubClient
public class StubClient.StubbedResponseBuilder extends Object
Immutable response builder.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StubClient.StubbedResponseBuilder
in(long time, TimeUnit unit)
Configure delay before the response should be sent.void
to(String uri)
Map the previously configured response or response source to a URI.void
to(org.hamcrest.Matcher<com.spotify.apollo.Request> requestMatcher)
Map the previously configured response or response source to any messages matching the suppliedMatcher
.
-
-
-
Method Detail
-
in
public StubClient.StubbedResponseBuilder in(long time, TimeUnit unit)
Configure delay before the response should be sent.
-
to
public void to(String uri)
Map the previously configured response or response source to a URI. This means any invocation of that URI, no matter which request method is used, will lead to a match.
-
to
public void to(org.hamcrest.Matcher<com.spotify.apollo.Request> requestMatcher)
Map the previously configured response or response source to any messages matching the suppliedMatcher
. This gives full freedom to do things like inspect payloads, headers, etc., to match requests.
-
-