public final class MockHttpClient extends Object implements SdkHttpClient
SdkHttpClient.SdkHttpClient.Builder<T extends SdkHttpClient.Builder<T>>| Constructor and Description |
|---|
MockHttpClient() |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
SdkHttpRequest |
getLastRequest() |
ExecutableHttpRequest |
prepareRequest(HttpExecuteRequest request) |
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.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitclientNamepublic ExecutableHttpRequest prepareRequest(HttpExecuteRequest request)
prepareRequest in interface SdkHttpClientpublic void close()
close in interface AutoCloseableclose in interface SdkAutoCloseablepublic void reset()
public void stubNextResponse(HttpExecuteResponse nextResponse)
nextResponse - Next SdkHttpFullResponse to return from
prepareRequest(HttpExecuteRequest)public SdkHttpRequest getLastRequest()
IllegalStateException - If no requests have been captured.Copyright © 2020. All rights reserved.