Interface MockHttpClient
-
- All Known Implementing Classes:
MockAsyncHttpClient
,MockSyncHttpClient
public interface MockHttpClient
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description SdkHttpRequest
getLastRequest()
Get the last request called on the mock.List<SdkHttpRequest>
getRequests()
Get all requests called on the mock.void
reset()
Resets this mock by clearing any captured requests and wiping any stubbed responses.void
stubNextResponse(HttpExecuteResponse nextResponse)
Sets up the next HTTP response that will be returned by the mock.void
stubNextResponse(HttpExecuteResponse nextResponse, Duration delay)
Sets up the next HTTP response that will be returned by the mock with a delay.default void
stubNextResponse200()
void
stubResponses(HttpExecuteResponse... responses)
Sets the next set of HTTP responses that will be returned by the mock.void
stubResponses(Pair<HttpExecuteResponse,Duration>... responses)
-
-
-
Method Detail
-
reset
void reset()
Resets this mock by clearing any captured requests and wiping any stubbed responses.
-
stubNextResponse
void stubNextResponse(HttpExecuteResponse nextResponse)
Sets up the next HTTP response that will be returned by the mock. Removes responses previously added to the mock.
-
stubNextResponse200
default void stubNextResponse200()
-
stubNextResponse
void stubNextResponse(HttpExecuteResponse nextResponse, Duration delay)
Sets up the next HTTP response that will be returned by the mock with a delay. Removes responses previously added to the mock.
-
stubResponses
void stubResponses(Pair<HttpExecuteResponse,Duration>... responses)
-
stubResponses
void stubResponses(HttpExecuteResponse... responses)
Sets the next set of HTTP responses that will be returned by the mock. Removes responses previously added to the mock.
-
getLastRequest
SdkHttpRequest getLastRequest()
Get the last request called on the mock.
-
getRequests
List<SdkHttpRequest> getRequests()
Get all requests called on the mock.
-
-