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 SdkHttpRequestgetLastRequest()Get the last request called on the mock.List<SdkHttpRequest>getRequests()Get all requests called on the mock.voidreset()Resets this mock by clearing any captured requests and wiping any stubbed responses.voidstubNextResponse(HttpExecuteResponse nextResponse)Sets up the next HTTP response that will be returned by the mock.voidstubNextResponse(HttpExecuteResponse nextResponse, Duration delay)Sets up the next HTTP response that will be returned by the mock with a delay.default voidstubNextResponse200()voidstubResponses(HttpExecuteResponse... responses)Sets the next set of HTTP responses that will be returned by the mock.voidstubResponses(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.
-
-