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.jackson2.JacksonFactory |
JSON_FACTORY |
Modifier and Type | Method and Description |
---|---|
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.http.HttpResponse |
fakeResponse(Map<String,Object> headers,
InputStream content) |
static com.google.api.client.http.HttpResponse |
fakeResponse(String header,
Object headerValue,
InputStream content) |
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(com.google.api.client.http.LowLevelHttpResponse... responsesIn) |
public static final com.google.api.client.json.jackson2.JacksonFactory JSON_FACTORY
public static com.google.api.client.http.HttpResponse fakeResponse(String header, Object headerValue, InputStream content) throws IOException
IOException
public static com.google.api.client.http.HttpResponse fakeResponse(Map<String,Object> headers, InputStream content) throws IOException
IOException
public static com.google.api.client.testing.http.MockHttpTransport mockTransport(com.google.api.client.http.LowLevelHttpResponse... 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)
Copyright © 2020. All rights reserved.