public class MockNetwork extends java.lang.Object implements NetworkClient
Modifier and Type | Method and Description |
---|---|
Ds3Client |
asClient() |
void |
close() |
static MockNetwork |
expecting(HttpVerb verb,
java.lang.String path,
java.util.Map<java.lang.String,java.lang.String> queryParams,
com.google.common.collect.Multimap<java.lang.String,java.lang.String> requestHeaders,
java.lang.String requestContent) |
static MockNetwork |
expecting(HttpVerb verb,
java.lang.String path,
java.util.Map<java.lang.String,java.lang.String> queryParams,
java.lang.String requestContent) |
ConnectionDetails |
getConnectionDetails() |
WebResponse |
getResponse(Ds3Request request) |
MockNetwork |
returning(int statusCode,
java.lang.String responseContent) |
MockNetwork |
returning(int statusCode,
java.lang.String responseContent,
java.util.Map<java.lang.String,java.lang.String> headers) |
public static MockNetwork expecting(HttpVerb verb, java.lang.String path, java.util.Map<java.lang.String,java.lang.String> queryParams, java.lang.String requestContent)
public static MockNetwork expecting(HttpVerb verb, java.lang.String path, java.util.Map<java.lang.String,java.lang.String> queryParams, com.google.common.collect.Multimap<java.lang.String,java.lang.String> requestHeaders, java.lang.String requestContent)
public MockNetwork returning(int statusCode, java.lang.String responseContent, java.util.Map<java.lang.String,java.lang.String> headers)
public MockNetwork returning(int statusCode, java.lang.String responseContent)
public Ds3Client asClient()
public WebResponse getResponse(Ds3Request request) throws java.io.IOException
getResponse
in interface NetworkClient
java.io.IOException
public ConnectionDetails getConnectionDetails()
getConnectionDetails
in interface NetworkClient
public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
java.io.IOException