public final class MockHttpTransportHelper extends Object
MockHttpTransport
Modifier and Type | Class and Description |
---|---|
static class |
MockHttpTransportHelper.ErrorResponses
HTTP JSON API error responses
|
Modifier and Type | Field and Description |
---|---|
static com.google.api.client.json.JsonFactory |
JSON_FACTORY |
Modifier and Type | Method and Description |
---|---|
static com.google.api.client.testing.http.MockLowLevelHttpResponse |
arbitraryInputStreamSupplier(Supplier<InputStream> supplier)
Return an arbitrary InputStream supplier.
|
static com.google.api.client.testing.http.MockLowLevelHttpResponse |
dataRangeResponse(byte[] content,
long rangeStart,
long totalSize) |
static com.google.api.client.testing.http.MockLowLevelHttpResponse |
dataResponse(byte[] content) |
static com.google.api.client.testing.http.MockLowLevelHttpResponse |
dataResponse(Map<String,Object> headers,
byte[] content) |
static com.google.api.client.testing.http.MockLowLevelHttpResponse |
emptyResponse(int statusCode) |
static com.google.api.client.testing.http.MockLowLevelHttpResponse |
inputStreamResponse(Map<String,Object> headers,
InputStream content) |
static com.google.api.client.testing.http.MockLowLevelHttpResponse |
inputStreamResponse(String header,
Object headerValue,
InputStream content) |
static com.google.api.client.testing.http.MockLowLevelHttpResponse |
jsonDataResponse(Object object) |
static com.google.api.client.testing.http.MockLowLevelHttpResponse |
jsonErrorResponse(MockHttpTransportHelper.ErrorResponses errorResponse) |
static com.google.api.client.testing.http.MockHttpTransport |
mockBatchTransport(int requestsPerBatch,
com.google.api.client.http.LowLevelHttpResponse... responses) |
static com.google.api.client.testing.http.MockHttpTransport |
mockTransport(Object... responsesIn) |
public static com.google.api.client.testing.http.MockHttpTransport mockTransport(Object... responsesIn)
public static com.google.api.client.testing.http.MockHttpTransport mockBatchTransport(int requestsPerBatch, com.google.api.client.http.LowLevelHttpResponse... responses)
public static com.google.api.client.testing.http.MockLowLevelHttpResponse emptyResponse(int statusCode)
public static com.google.api.client.testing.http.MockLowLevelHttpResponse dataRangeResponse(byte[] content, long rangeStart, long totalSize)
public static com.google.api.client.testing.http.MockLowLevelHttpResponse jsonDataResponse(Object object) throws IOException
IOException
public static com.google.api.client.testing.http.MockLowLevelHttpResponse dataResponse(byte[] content)
public static com.google.api.client.testing.http.MockLowLevelHttpResponse dataResponse(Map<String,Object> headers, byte[] content)
public static com.google.api.client.testing.http.MockLowLevelHttpResponse jsonErrorResponse(MockHttpTransportHelper.ErrorResponses errorResponse) throws IOException
IOException
public static com.google.api.client.testing.http.MockLowLevelHttpResponse inputStreamResponse(String header, Object headerValue, InputStream content)
public static com.google.api.client.testing.http.MockLowLevelHttpResponse inputStreamResponse(Map<String,Object> headers, InputStream content)
public static com.google.api.client.testing.http.MockLowLevelHttpResponse arbitraryInputStreamSupplier(Supplier<InputStream> supplier)
execute
and executeMedia
.Copyright © 2024. All rights reserved.