HttpClientTests Class
- java.
lang. Object - com.
azure. core. test. http. HttpClientTests
- com.
public abstract class HttpClientTests
Generic test suite for HttpClient.
Field Summary
Modifier and Type | Field and Description |
---|---|
protected static final String | ECHO_RESPONSE |
Constructor Summary
Constructor | Description | |
---|---|---|
HttpClientTests() |
Method Summary
Modifier and Type | Method and Description |
---|---|
protected T | createService(Class<T> serviceClass) |
protected T | createService(Class<T> serviceClass, HttpClient httpClient) |
void |
asyncCompletableHeadRequest()
Tests that a HEAD request is sent correctly. |
void |
asyncDeleteRequest()
Tests that a DELETE request is sent correctly. |
void |
asyncGetRequestWithAnything()
Tests that a response with a return type of HttpBinJson is correctly handled. |
void |
asyncGetRequestWithHeaderParametersAndAnything()
Tests that a request with header parameters (HeaderParam) is correctly handled. |
void |
asyncGetRequestWithNoReturn()
Tests that a response with no return type is correctly handled. |
void |
asyncGetRequestWithQueryParametersAndAnything()
Tests that a request with query parameters (QueryParam) that need encoding is correctly handled. |
void |
asyncHeadBooleanRequest()
Tests that a HEAD request is sent correctly. |
void |
asyncHeadRequest()
Tests that a HEAD request is sent correctly. |
void |
asyncHeadersRequest()
Tests that a request with Headers adds the headers to the request correctly. |
void |
asyncHttpsHeadersRequest()
Tests that a request with Headers adds the headers to the request correctly. |
void |
asyncPatchRequest()
Tests that a PATCH request is sent correctly. |
void |
asyncPostRequestWithStringBody()
Tests that a request with an octet-stream body is correctly handled. |
void |
asyncPutRequestWithBinaryDataBodyAndEqualContentLength()
Tests that a request with an octet-stream body where the body length is equal to the content length is correctly handled. |
void |
asyncPutRequestWithBinaryDataBodyAndLessThanContentLength()
Tests that a request with an octet-stream body where the body length is less than the content length is correctly handled. |
void |
asyncPutRequestWithBinaryDataBodyAndMoreThanContentLength()
Tests that a request with an octet-stream body where the body length is greater than the content length is correctly handled. |
void |
asyncPutRequestWithBodyAndEqualContentLength()
Tests that a request with an octet-stream body where the body length is equal to the content length is correctly handled. |
void |
asyncPutRequestWithBodyAndLessThanContentLength()
Tests that a request with an octet-stream body where the body length is less than the content length is correctly handled. |
void |
asyncPutRequestWithBodyAndMoreThanContentLength()
Tests that a request with an octet-stream body where the body length is greater than the content length is correctly handled. |
void |
asyncPutRequestWithIntBody()
Tests that a request with an octet-stream body where th body is a single value binary is correctly handled. |
void |
asyncPutRequestWithStreamBinaryDataBodyAndLessThanContentLength()
Length |
void |
asyncPutRequestWithStreamBinaryDataBodyAndMoreThanContentLength()
Length |
void |
asyncPutRequestWithUnexpectedResponse()
Tests that an unexpected response is handled correctly. |
void |
asyncPutRequestWithUnexpectedResponseAndDeterminedExceptionType()
Tests that a status code specific unexpected response is handled correctly. |
void |
asyncPutRequestWithUnexpectedResponseAndExceptionType()
Tests that a specific unexpected response is handled correctly. |
void |
asyncPutRequestWithUnexpectedResponseAndFallthroughExceptionType()
Tests that an unexpected response that falls through to the default type is handled correctly. |
void |
asyncPutRequestWithUnexpectedResponseAndNoFallthroughExceptionType()
Tests that an unexpected response that falls through without a default type falls back to a global default is handled correctly. |
void |
asyncRequestWithByteArrayReturnType()
Tests that the response body is correctly returned as a byte array. |
void |
asyncRequestWithByteArrayReturnTypeAndParameterizedHostAndPath()
Tests that the response body is correctly returned as a byte array. |
void |
asyncRequestWithMultipleHostParams()
Tests that a request with multiple host parameters is correctly handled. |
void |
binaryDataUploadTest()
This test verifies that a File-based Binary |
void |
bomWithDifferentHeader()
Tests that a response with a byte order marker and 'Content-Type' header will defer to using the BOM encoding. |
void |
bomWithSameHeader()
Tests that a response with a byte order marker and 'Content-Type' header will defer to using the BOM encoding. |
void |
bufferedResponseCanBeReadMultipleTimes()
Tests that buffered response is indeed buffered, i. |
void |
canAccessResponseBody()
Tests that unbuffered response body can be accessed. |
void |
canSendByteArrayBinaryData(BinaryData requestBody, byte[] expectedResponseBody, HttpClientTests.BinaryDataTestConsumer consumer)
Tests that send random bytes in various forms to an endpoint that echoes bytes back to sender. |
void |
canSendByteBufferBinaryData(BinaryData requestBody, byte[] expectedResponseBody, HttpClientTests.BinaryDataTestConsumer consumer)
Tests that send random bytes in various forms to an endpoint that echoes bytes back to sender. |
void |
canSendFileBinaryData(BinaryData requestBody, byte[] expectedResponseBody, HttpClientTests.BinaryDataTestConsumer consumer)
Tests that send random bytes in various forms to an endpoint that echoes bytes back to sender. |
void |
canSendKnownLengthNoBufferAsyncFluxBinaryData(BinaryData requestBody, byte[] expectedResponseBody, HttpClientTests.BinaryDataTestConsumer consumer)
Tests that send random bytes in various forms to an endpoint that echoes bytes back to sender. |
void |
canSendKnownLengthNoBufferFluxBinaryData(BinaryData requestBody, byte[] expectedResponseBody, HttpClientTests.BinaryDataTestConsumer consumer)
Tests that send random bytes in various forms to an endpoint that echoes bytes back to sender. |
void |
canSendObjectBinaryData(BinaryData requestBody, byte[] expectedResponseBody, HttpClientTests.BinaryDataTestConsumer consumer)
Tests that send random bytes in various forms to an endpoint that echoes bytes back to sender. |
void |
canSendSliceFileBinaryData(BinaryData requestBody, byte[] expectedResponseBody, HttpClientTests.BinaryDataTestConsumer consumer)
Tests that send random bytes in various forms to an endpoint that echoes bytes back to sender. |
void |
canSendStreamBinaryData(BinaryData requestBody, byte[] expectedResponseBody, HttpClientTests.BinaryDataTestConsumer consumer)
Tests that send random bytes in various forms to an endpoint that echoes bytes back to sender. |
void |
canSendStringBinaryData(BinaryData requestBody, byte[] expectedResponseBody, HttpClientTests.BinaryDataTestConsumer consumer)
Tests that send random bytes in various forms to an endpoint that echoes bytes back to sender. |
void |
canSendUnknownLengthNoBufferAsyncFluxBinaryData(BinaryData requestBody, byte[] expectedResponseBody, HttpClientTests.BinaryDataTestConsumer consumer)
Tests that send random bytes in various forms to an endpoint that echoes bytes back to sender. |
void |
canSendUnknownLengthNoBufferFluxBinaryData(BinaryData requestBody, byte[] expectedResponseBody, HttpClientTests.BinaryDataTestConsumer consumer)
Tests that send random bytes in various forms to an endpoint that echoes bytes back to sender. |
protected abstract
Http |
createHttpClient()
Get the HTTP client that will be used for each test. |
void |
eagerlyConvertedHeadersAreHttpHeaders()
Tests that eagerly converting implementation HTTP headers to azure-core Http |
void |
fluxUploadTest()
This test verifies that a File-based Flux is uploaded correctly. |
void |
getByteArrayAsyncWithNoExpectedResponses()
Tests that the response body is correctly returned as a byte array. |
protected abstract int |
getPort()
Deprecated
Use getServerUri(boolean secure) instead.
Get the dynamic port the server is using to properly route the request. |
protected URL |
getRequestUrl(String requestPath)
Gets the request URL for given path. |
protected abstract String |
getServerUri(boolean secure)
Gets the dynamic URI the server is using to properly route the request. |
void |
headerResponse()
Tests that a response with a 'Content-Type' header encodes using the specified charset. |
void |
invalidHeaderResponse()
Tests that a response with a 'Content-Type' containing an invalid or unsupported charset encodes using UTF-8. |
protected boolean |
isSecure()
Get a flag indicating if communication should be secured or not (https or http). |
void |
plainResponse()
Tests that a response without a byte order mark or a 'Content-Type' header encodes using UTF-8. |
void |
postUrlForm()
This test verifies that the form parameters are encoded when the encoded flag is set to false. |
void |
postUrlFormEncoded()
This test verifies that the form parameters aren't encoded when the encoded flag is set to true. |
void |
rawFluxDownloadTest()
This test verifies that a raw Flux is downloaded correctly. |
void |
requestOptionsAddAHeader()
This test verifies that add header adds a header to the request. |
void |
requestOptionsChangesBody()
This test verifies that the body is overridden by the request options. |
void |
requestOptionsChangesBodyAndContentLength()
This test verifies that the body and content length header is overridden by the request options. |
void |
requestOptionsSetsAHeader()
This test verifies that set header overrides any previously added headers with the same name. |
void |
segmentUploadTest()
This test verifies that a File-based Flux with a range is uploaded correctly. |
void |
service16Put()
Tests that a request with an octet-stream body where the body is a byte array is correctly handled. |
void |
service16PutAsync()
Tests that a request with an octet-stream body where the body is a byte array is correctly handled. |
void |
service18GetStatus200()
This test verifies that a response with a 200 status code does not throw if the status code wasn't expected. |
void |
service18GetStatus200WithExpectedResponse200()
This test verifies that a response with a 200 status code does not throw if the status code was expected. |
void |
service18GetStatus300()
This test verifies that a response with a non-200 status code does throw if the status code wasn't expected. |
void |
service18GetStatus300WithExpectedResponse300()
This test verifies that a response with a non-200 status code does not throw if the status code was expected. |
void |
service18GetStatus400()
This test verifies that a response with a non-200 status code does throw if the status code wasn't expected. |
void |
service18GetStatus400WithExpectedResponse400()
This test verifies that a response with a non-200 status code does not throw if the status code was expected. |
void |
service18GetStatus500()
This test verifies that a response with a non-200 status code does throw if the status code wasn't expected. |
void |
service18GetStatus500WithExpectedResponse500()
This test verifies that a response with a non-200 status code does not throw if the status code was expected. |
void |
service19PutWithBodyParamApplicationJsonContentTypeAndByteArrayBodyWithEmptyBody()
This test verifies a byte array application-json that is empty is sent correctly. |
void |
service19PutWithBodyParamApplicationJsonContentTypeAndByteArrayBodyWithNonEmptyBody()
This test verifies a byte array application-json is sent correctly. |
void |
service19PutWithBodyParamApplicationJsonContentTypeAndByteArrayBodyWithNullBody()
This test verifies a byte array application-json that is null is sent correctly. |
void |
service19PutWithBodyParamApplicationJsonContentTypeAndCharsetAndStringBodyWithEmptyBody()
This test verifies a String application-json with charset that is null is sent correctly. |
void |
service19PutWithBodyParamApplicationJsonContentTypeAndCharsetAndStringBodyWithNonEmptyBody()
This test verifies a String application-json with charset is sent correctly. |
void |
service19PutWithBodyParamApplicationJsonContentTypeAndCharsetAndStringBodyWithNullBody()
This test verifies a String application-json with charset that is empty is sent correctly. |
void |
service19PutWithBodyParamApplicationJsonContentTypeAndStringBodyWithEmptyBody()
This test verifies a String application-json that is empty is sent correctly. |
void |
service19PutWithBodyParamApplicationJsonContentTypeAndStringBodyWithNonEmptyBody()
This test verifies a String application-json is sent correctly. |
void |
service19PutWithBodyParamApplicationJsonContentTypeAndStringBodyWithNullBody()
This test verifies a String application-json that is null is sent correctly. |
void |
service19PutWithBodyParamApplicationOctetStreamContentTypeAndByteArrayBodyWithEmptyBody()
This test verifies a byte array octet-stream that is empty is sent correctly. |
void |
service19PutWithBodyParamApplicationOctetStreamContentTypeAndByteArrayBodyWithNonEmptyBody()
This test verifies a byte array octet-stream is sent correctly. |
void |
service19PutWithBodyParamApplicationOctetStreamContentTypeAndByteArrayBodyWithNullBody()
This test verifies a byte array octet-stream that is null is sent correctly. |
void |
service19PutWithBodyParamApplicationOctetStreamContentTypeAndStringBodyWithEmptyBody()
This test verifies a String octet-stream that is empty is sent correctly. |
void |
service19PutWithBodyParamApplicationOctetStreamContentTypeAndStringBodyWithNonEmptyBody()
This test verifies a String octet-stream is sent correctly. |
void |
service19PutWithBodyParamApplicationOctetStreamContentTypeAndStringBodyWithNullBody()
This test verifies a String octet-stream that is null is sent correctly. |
void |
service19PutWithHeaderApplicationJsonContentTypeAndByteArrayBodyWithEmptyBody()
This test verifies a byte array application-json with ignored content type that is empty is sent correctly. |
void |
service19PutWithHeaderApplicationJsonContentTypeAndByteArrayBodyWithNonEmptyBody()
This test verifies a byte array application-json with ignored content type is sent correctly. |
void |
service19PutWithHeaderApplicationJsonContentTypeAndByteArrayBodyWithNullBody()
This test verifies a byte array application-json with ignored content type that is null is sent correctly. |
void |
service19PutWithHeaderApplicationJsonContentTypeAndCharsetAndStringBodyWithEmptyBody()
This test verifies a String octet-stream with an ignored content type that is empty is sent correctly. |
void |
service19PutWithHeaderApplicationJsonContentTypeAndCharsetAndStringBodyWithNonEmptyBody()
This test verifies a String octet-stream with an ignored content type is sent correctly. |
void |
service19PutWithHeaderApplicationJsonContentTypeAndCharsetAndStringBodyWithNullBody()
This test verifies a String octet-stream with an ignored content type that is null is sent correctly. |
void |
service19PutWithHeaderApplicationJsonContentTypeAndStringBodyWithEmptyBody()
This test verifies a String application-json that is empty is sent correctly. |
void |
service19PutWithHeaderApplicationJsonContentTypeAndStringBodyWithNonEmptyBody()
This test verifies a String application-json is sent correctly. |
void |
service19PutWithHeaderApplicationJsonContentTypeAndStringBodyWithNullBody()
This test verifies a String application-json that is null is sent correctly. |
void |
service19PutWithHeaderApplicationOctetStreamContentTypeAndByteArrayBodyWithEmptyBody()
This test verifies a byte array octet-stream with an ignored content type that is empty is sent correctly. |
void |
service19PutWithHeaderApplicationOctetStreamContentTypeAndByteArrayBodyWithNonEmptyBody()
This test verifies a byte array octet-stream with an ignored content type is sent correctly. |
void |
service19PutWithHeaderApplicationOctetStreamContentTypeAndByteArrayBodyWithNullBody()
This test verifies a byte array octet-stream with an ignored content type that is null is sent correctly. |
void |
service19PutWithHeaderApplicationOctetStreamContentTypeAndStringBodyWithEmptyBody()
This test verifies a String octet-stream with an ignored content type that is empty is sent correctly. |
void |
service19PutWithHeaderApplicationOctetStreamContentTypeAndStringBodyWithNonEmptyBody()
This test verifies a String octet-stream with an ignored content type is sent correctly. |
void |
service19PutWithHeaderApplicationOctetStreamContentTypeAndStringBodyWithNullBody()
This test verifies a String octet-stream with an ignored content type that is null is sent correctly. |
void |
service19PutWithNoContentTypeAndByteArrayBodyWithEmptyBody()
This test verifies a byte array octet-stream that is empty is sent correctly. |
void |
service19PutWithNoContentTypeAndByteArrayBodyWithNonEmptyBody()
This test verifies a byte array octet-stream is sent correctly. |
void |
service19PutWithNoContentTypeAndByteArrayBodyWithNullBody()
This test verifies a byte array octet-stream that is null is sent correctly. |
void |
service19PutWithNoContentTypeAndStringBodyWithEmptyBody()
This test verifies a String octet-stream that is empty is sent correctly. |
void |
service19PutWithNoContentTypeAndStringBodyWithNonEmptyBody()
This test verifies a String octet-stream is sent correctly. |
void |
service19PutWithNoContentTypeAndStringBodyWithNullBody()
This test verifies a String octet-stream that is null is sent correctly. |
void |
service20GetBytes100BodyAndHeaders()
This test verifies that a byte array body with deserialized headers are handled correctly. |
void |
service20GetBytes100OnlyHeaders()
This test verifies a deserialized body and deserialized headers are handled correctly. |
void |
service20GetBytesOnlyHeaders()
This test verifies that a void body, even if data is returned, with deserialized headers are handled correctly. |
void |
service20GetBytesOnlyStatus()
This test verifies that a void body, even if data is returned, with void deserialized headers are handled correctly. |
void |
service20GetResponseBody()
This test verifies a String-based octet-stream is sent correctly. |
void |
service20GetVoidResponse()
This test verifies that a void response is handled correctly. |
void |
service20PutBodyAndHeaders()
This test verifies that deserialized headers are handled correctly. |
void |
service20PutOnlyHeaders()
This test verifies that a void body with deserialized headers are handled correctly. |
void |
service21GetBytes100()
This test verifies that a byte array is downloaded correctly. |
void |
service22GetBytes()
This test verifies that the response body is returned as a byte array. |
void |
service23GetBytes()
This test verifies that the response body is returned as a byte array. |
void |
service24Put()
This test verifies that the header collection sets headers correctly. |
void |
shouldBufferResponse()
Tests that client returns buffered response if requested via azure-eagerly-read-response Context flag. |
void |
simpleDownloadTest(Context context)
This test verifies that a Stream |
void |
simpleDownloadTestAsync(Context context)
This test verifies that a Stream |
void |
streamResponseCanTransferBody(Context context)
This test verifies that a StreamResponse transfers correctly. |
void |
streamResponseCanTransferBodyAsync(Context context)
This test verifies that a StreamResponse transfers correctly. |
void |
syncDeleteRequest()
Tests that a DELETE request is sent correctly. |
void |
syncGetRequestWithAnything()
Tests that a response with a return type of HttpBinJson is correctly handled. |
void |
syncGetRequestWithAnythingWithEncodedPathParam()
Tests that a request with a path parameter (PathParam) that is already encoded is correctly handled. |
void |
syncGetRequestWithAnythingWithEncodedPathParamWithPercent20()
Tests that a request with a path parameter (PathParam) that is already encoded is correctly handled. |
void |
syncGetRequestWithAnythingWithEncodedPathParamWithPlus()
Tests that a request with a path parameter (PathParam) that is already encoded is correctly handled. |
void |
syncGetRequestWithAnythingWithPathParam()
Tests that a request with a path parameter (PathParam) is correctly handled. |
void |
syncGetRequestWithAnythingWithPathParamWithPlus()
Tests that a request with a path parameter (PathParam) that needs encoding is correctly handled. |
void |
syncGetRequestWithAnythingWithPathParamWithSpace()
Tests that a request with a path parameter (PathParam) that needs encoding is correctly handled. |
void |
syncGetRequestWithAnythingWithPlus()
Tests that a request with a path containing a plus (+) is correctly handled. |
void |
syncGetRequestWithHeaderParametersAndAnythingReturn()
Tests that a request with header parameters (HeaderParam) is correctly handled. |
void |
syncGetRequestWithNoReturn()
Tests that a response with no return type is correctly handled. |
void |
syncGetRequestWithNullHeader()
Tests that a request with header parameters (HeaderParam) where a value is null is correctly handled. |
void |
syncGetRequestWithNullQueryParameter()
Tests that a request with query parameters (QueryParam) that need encoding where a value is null is correctly handled. |
void |
syncGetRequestWithQueryParametersAndAnything()
Tests that a request with query parameters (QueryParam) that need encoding is correctly handled. |
void |
syncGetRequestWithQueryParametersAndAnythingWithEncodedWithPercent20()
Tests that a request with query parameters (QueryParam) where some need encoding and some are already encoded is correctly handled. |
void |
syncGetRequestWithQueryParametersAndAnythingWithPercent20()
Tests that a request with query parameters (QueryParam) that need encoding is correctly handled. |
void |
syncHeadBooleanRequest()
Tests that a HEAD request is sent correctly. |
void |
syncHeadRequest()
Tests that a HEAD request is sent correctly. |
void |
syncHeadersRequest()
Tests that a request with Headers adds the headers to the request correctly. |
void |
syncPatchRequest()
Tests that a PATCH request is sent correctly. |
void |
syncPostRequestWithNullBody()
Tests that a request with an octet-stream body where the body is null is correctly handled. |
void |
syncPostRequestWithStringBody()
Tests that a request with an octet-stream body is correctly handled. |
void |
syncPutRequestWithBodyAndEqualContentLength()
Tests that a request with an octet-stream body where the body length is equal to the content length is correctly handled. |
void |
syncPutRequestWithBodyLessThanContentLength()
Tests that a request with an octet-stream body where the body length is less than the content length is correctly handled. |
void |
syncPutRequestWithBodyMoreThanContentLength()
Tests that a request with an octet-stream body where the body length is greater than the content length is correctly handled. |
void |
syncPutRequestWithIntBody()
Tests that a request with an octet-stream body where th body is a single value binary is correctly handled. |
void |
syncPutRequestWithUnexpectedResponse()
Tests that an unexpected response is handled correctly. |
void |
syncPutRequestWithUnexpectedResponseAndDeterminedExceptionType()
Tests that a status code specific unexpected response is handled correctly. |
void |
syncPutRequestWithUnexpectedResponseAndExceptionType()
Tests that a specific unexpected response is handled correctly. |
void |
syncPutRequestWithUnexpectedResponseAndFallthroughExceptionType()
Tests that an unexpected response that falls through to the default type is handled correctly. |
void |
syncPutRequestWithUnexpectedResponseAndNoFallthroughExceptionType()
Tests that an unexpected response that falls through without a default type falls back to a global default is handled correctly. |
void |
syncRequestWithByteArrayReturnType()
Tests that the response body is correctly returned as a byte array. |
void |
syncRequestWithByteArrayReturnTypeAndParameterizedHostAndPath()
Tests that the response body is correctly returned as a byte array. |
void |
syncRequestWithEmptyByteArrayReturnTypeAndParameterizedHostAndPath()
Tests that the response body is correctly returned as a byte array. |
void |
syncRequestWithMultipleHostParams()
Tests that a request with multiple host parameters is correctly handled. |
void |
syncVoidHeadRequest()
Tests that a HEAD request is sent correctly. |
void |
unexpectedHttpOk()
This test verifies that an unexpected 200 response is handled correctly. |
void |
utf16BeBomResponse()
Tests that a response with a byte order mark encodes using the specified charset. |
void |
utf16LeBomResponse()
Tests that a response with a byte order mark encodes using the specified charset. |
void |
utf32BeBomResponse()
Tests that a response with a byte order mark encodes using the specified charset. |
void |
utf32LeBomResponse()
Tests that a response with a byte order mark encodes using the specified charset. |
void |
utf8BomResponse()
Tests that a response with a byte order mark encodes using the specified charset. |
void |
voidDoesNotEagerlyReadResponse(BiConsumer<String,HttpClientTests.Service28> executable)
This test verifies that the response body is not eagerly read when the response is void. |
void |
voidErrorReturnsErrorBody(BiConsumer<String,HttpClientTests.Service29> executable)
This test verifies that the error response body is returned when the response is void. |
Methods inherited from java.lang.Object
Field Details
ECHO_RESPONSE
protected static final String ECHO_RESPONSE
Constructor Details
HttpClientTests
public HttpClientTests()
Method Details
createService
protected T
Parameters:
createService
protected T
Parameters:
asyncCompletableHeadRequest
public void asyncCompletableHeadRequest()
Tests that a HEAD request is sent correctly.
asyncDeleteRequest
public void asyncDeleteRequest()
Tests that a DELETE request is sent correctly.
asyncGetRequestWithAnything
public void asyncGetRequestWithAnything()
Tests that a response with a return type of HttpBinJson is correctly handled.
asyncGetRequestWithHeaderParametersAndAnything
public void asyncGetRequestWithHeaderParametersAndAnything()
Tests that a request with header parameters (HeaderParam) is correctly handled.
asyncGetRequestWithNoReturn
public void asyncGetRequestWithNoReturn()
Tests that a response with no return type is correctly handled.
asyncGetRequestWithQueryParametersAndAnything
public void asyncGetRequestWithQueryParametersAndAnything()
Tests that a request with query parameters (QueryParam) that need encoding is correctly handled.
asyncHeadBooleanRequest
public void asyncHeadBooleanRequest()
Tests that a HEAD request is sent correctly.
asyncHeadRequest
public void asyncHeadRequest()
Tests that a HEAD request is sent correctly.
asyncHeadersRequest
public void asyncHeadersRequest()
Tests that a request with Headers adds the headers to the request correctly.
asyncHttpsHeadersRequest
public void asyncHttpsHeadersRequest()
Tests that a request with Headers adds the headers to the request correctly.
asyncPatchRequest
public void asyncPatchRequest()
Tests that a PATCH request is sent correctly.
asyncPostRequestWithStringBody
public void asyncPostRequestWithStringBody()
Tests that a request with an octet-stream body is correctly handled.
asyncPutRequestWithBinaryDataBodyAndEqualContentLength
public void asyncPutRequestWithBinaryDataBodyAndEqualContentLength()
Tests that a request with an octet-stream body where the body length is equal to the content length is correctly handled.
asyncPutRequestWithBinaryDataBodyAndLessThanContentLength
public void asyncPutRequestWithBinaryDataBodyAndLessThanContentLength()
Tests that a request with an octet-stream body where the body length is less than the content length is correctly handled.
asyncPutRequestWithBinaryDataBodyAndMoreThanContentLength
public void asyncPutRequestWithBinaryDataBodyAndMoreThanContentLength()
Tests that a request with an octet-stream body where the body length is greater than the content length is correctly handled.
asyncPutRequestWithBodyAndEqualContentLength
public void asyncPutRequestWithBodyAndEqualContentLength()
Tests that a request with an octet-stream body where the body length is equal to the content length is correctly handled.
asyncPutRequestWithBodyAndLessThanContentLength
public void asyncPutRequestWithBodyAndLessThanContentLength()
Tests that a request with an octet-stream body where the body length is less than the content length is correctly handled.
asyncPutRequestWithBodyAndMoreThanContentLength
public void asyncPutRequestWithBodyAndMoreThanContentLength()
Tests that a request with an octet-stream body where the body length is greater than the content length is correctly handled.
asyncPutRequestWithIntBody
public void asyncPutRequestWithIntBody()
Tests that a request with an octet-stream body where th body is a single value binary is correctly handled.
asyncPutRequestWithStreamBinaryDataBodyAndLessThanContentLength
public void asyncPutRequestWithStreamBinaryDataBodyAndLessThanContentLength()
LengthValidatingInputStream in rest proxy relies on reader reaching EOF. This test specifically targets InputStream to assert this behavior.
asyncPutRequestWithStreamBinaryDataBodyAndMoreThanContentLength
public void asyncPutRequestWithStreamBinaryDataBodyAndMoreThanContentLength()
LengthValidatingInputStream in rest proxy relies on reader reaching EOF. This test specifically targets InputStream to assert this behavior.
asyncPutRequestWithUnexpectedResponse
public void asyncPutRequestWithUnexpectedResponse()
Tests that an unexpected response is handled correctly.
asyncPutRequestWithUnexpectedResponseAndDeterminedExceptionType
public void asyncPutRequestWithUnexpectedResponseAndDeterminedExceptionType()
Tests that a status code specific unexpected response is handled correctly.
asyncPutRequestWithUnexpectedResponseAndExceptionType
public void asyncPutRequestWithUnexpectedResponseAndExceptionType()
Tests that a specific unexpected response is handled correctly.
asyncPutRequestWithUnexpectedResponseAndFallthroughExceptionType
public void asyncPutRequestWithUnexpectedResponseAndFallthroughExceptionType()
Tests that an unexpected response that falls through to the default type is handled correctly.
asyncPutRequestWithUnexpectedResponseAndNoFallthroughExceptionType
public void asyncPutRequestWithUnexpectedResponseAndNoFallthroughExceptionType()
Tests that an unexpected response that falls through without a default type falls back to a global default is handled correctly.
asyncRequestWithByteArrayReturnType
public void asyncRequestWithByteArrayReturnType()
Tests that the response body is correctly returned as a byte array.
asyncRequestWithByteArrayReturnTypeAndParameterizedHostAndPath
public void asyncRequestWithByteArrayReturnTypeAndParameterizedHostAndPath()
Tests that the response body is correctly returned as a byte array.
asyncRequestWithMultipleHostParams
public void asyncRequestWithMultipleHostParams()
Tests that a request with multiple host parameters is correctly handled.
binaryDataUploadTest
public void binaryDataUploadTest()
This test verifies that a File-based BinaryData is uploaded correctly.
Throws:
bomWithDifferentHeader
public void bomWithDifferentHeader()
Tests that a response with a byte order marker and 'Content-Type' header will defer to using the BOM encoding.
bomWithSameHeader
public void bomWithSameHeader()
Tests that a response with a byte order marker and 'Content-Type' header will defer to using the BOM encoding.
bufferedResponseCanBeReadMultipleTimes
public void bufferedResponseCanBeReadMultipleTimes()
Tests that buffered response is indeed buffered, i.e. content can be accessed many times.
Throws:
canAccessResponseBody
public void canAccessResponseBody()
Tests that unbuffered response body can be accessed.
Throws:
canSendByteArrayBinaryData
public void canSendByteArrayBinaryData(BinaryData requestBody, byte[] expectedResponseBody, HttpClientTests.BinaryDataTestConsumer consumer)
Tests that send random bytes in various forms to an endpoint that echoes bytes back to sender.
Parameters:
canSendByteBufferBinaryData
public void canSendByteBufferBinaryData(BinaryData requestBody, byte[] expectedResponseBody, HttpClientTests.BinaryDataTestConsumer consumer)
Tests that send random bytes in various forms to an endpoint that echoes bytes back to sender.
Parameters:
canSendFileBinaryData
public void canSendFileBinaryData(BinaryData requestBody, byte[] expectedResponseBody, HttpClientTests.BinaryDataTestConsumer consumer)
Tests that send random bytes in various forms to an endpoint that echoes bytes back to sender.
Parameters:
canSendKnownLengthNoBufferAsyncFluxBinaryData
public void canSendKnownLengthNoBufferAsyncFluxBinaryData(BinaryData requestBody, byte[] expectedResponseBody, HttpClientTests.BinaryDataTestConsumer consumer)
Tests that send random bytes in various forms to an endpoint that echoes bytes back to sender.
Parameters:
canSendKnownLengthNoBufferFluxBinaryData
public void canSendKnownLengthNoBufferFluxBinaryData(BinaryData requestBody, byte[] expectedResponseBody, HttpClientTests.BinaryDataTestConsumer consumer)
Tests that send random bytes in various forms to an endpoint that echoes bytes back to sender.
Parameters:
canSendObjectBinaryData
public void canSendObjectBinaryData(BinaryData requestBody, byte[] expectedResponseBody, HttpClientTests.BinaryDataTestConsumer consumer)
Tests that send random bytes in various forms to an endpoint that echoes bytes back to sender.
Parameters:
canSendSliceFileBinaryData
public void canSendSliceFileBinaryData(BinaryData requestBody, byte[] expectedResponseBody, HttpClientTests.BinaryDataTestConsumer consumer)
Tests that send random bytes in various forms to an endpoint that echoes bytes back to sender.
Parameters:
canSendStreamBinaryData
public void canSendStreamBinaryData(BinaryData requestBody, byte[] expectedResponseBody, HttpClientTests.BinaryDataTestConsumer consumer)
Tests that send random bytes in various forms to an endpoint that echoes bytes back to sender.
Parameters:
canSendStringBinaryData
public void canSendStringBinaryData(BinaryData requestBody, byte[] expectedResponseBody, HttpClientTests.BinaryDataTestConsumer consumer)
Tests that send random bytes in various forms to an endpoint that echoes bytes back to sender.
Parameters:
canSendUnknownLengthNoBufferAsyncFluxBinaryData
public void canSendUnknownLengthNoBufferAsyncFluxBinaryData(BinaryData requestBody, byte[] expectedResponseBody, HttpClientTests.BinaryDataTestConsumer consumer)
Tests that send random bytes in various forms to an endpoint that echoes bytes back to sender.
Parameters:
canSendUnknownLengthNoBufferFluxBinaryData
public void canSendUnknownLengthNoBufferFluxBinaryData(BinaryData requestBody, byte[] expectedResponseBody, HttpClientTests.BinaryDataTestConsumer consumer)
Tests that send random bytes in various forms to an endpoint that echoes bytes back to sender.
Parameters:
createHttpClient
protected abstract HttpClient createHttpClient()
Get the HTTP client that will be used for each test. This will be called once per test.
Returns:
eagerlyConvertedHeadersAreHttpHeaders
public void eagerlyConvertedHeadersAreHttpHeaders()
Tests that eagerly converting implementation HTTP headers to azure-core HttpHeaders is done.
fluxUploadTest
public void fluxUploadTest()
This test verifies that a File-based Flux is uploaded correctly.
Throws:
getByteArrayAsyncWithNoExpectedResponses
public void getByteArrayAsyncWithNoExpectedResponses()
Tests that the response body is correctly returned as a byte array.
getPort
@Deprecated
protected abstract int getPort()
Deprecated
Get the dynamic port the server is using to properly route the request.
Returns:
getRequestUrl
protected URL getRequestUrl(String requestPath)
Gets the request URL for given path.
Parameters:
Returns:
getServerUri
protected abstract String getServerUri(boolean secure)
Gets the dynamic URI the server is using to properly route the request.
Parameters:
Returns:
headerResponse
public void headerResponse()
Tests that a response with a 'Content-Type' header encodes using the specified charset.
invalidHeaderResponse
public void invalidHeaderResponse()
Tests that a response with a 'Content-Type' containing an invalid or unsupported charset encodes using UTF-8.
isSecure
protected boolean isSecure()
Get a flag indicating if communication should be secured or not (https or http).
Returns:
plainResponse
public void plainResponse()
Tests that a response without a byte order mark or a 'Content-Type' header encodes using UTF-8.
postUrlForm
public void postUrlForm()
This test verifies that the form parameters are encoded when the encoded flag is set to false.
postUrlFormEncoded
public void postUrlFormEncoded()
This test verifies that the form parameters aren't encoded when the encoded flag is set to true.
rawFluxDownloadTest
public void rawFluxDownloadTest()
This test verifies that a raw Flux is downloaded correctly.
requestOptionsAddAHeader
public void requestOptionsAddAHeader()
This test verifies that add header adds a header to the request.
requestOptionsChangesBody
public void requestOptionsChangesBody()
This test verifies that the body is overridden by the request options.
requestOptionsChangesBodyAndContentLength
public void requestOptionsChangesBodyAndContentLength()
This test verifies that the body and content length header is overridden by the request options.
requestOptionsSetsAHeader
public void requestOptionsSetsAHeader()
This test verifies that set header overrides any previously added headers with the same name.
segmentUploadTest
public void segmentUploadTest()
This test verifies that a File-based Flux with a range is uploaded correctly.
Throws:
service16Put
public void service16Put()
Tests that a request with an octet-stream body where the body is a byte array is correctly handled.
service16PutAsync
public void service16PutAsync()
Tests that a request with an octet-stream body where the body is a byte array is correctly handled.
service18GetStatus200
public void service18GetStatus200()
This test verifies that a response with a 200 status code does not throw if the status code wasn't expected.
service18GetStatus200WithExpectedResponse200
public void service18GetStatus200WithExpectedResponse200()
This test verifies that a response with a 200 status code does not throw if the status code was expected.
service18GetStatus300
public void service18GetStatus300()
This test verifies that a response with a non-200 status code does throw if the status code wasn't expected.
service18GetStatus300WithExpectedResponse300
public void service18GetStatus300WithExpectedResponse300()
This test verifies that a response with a non-200 status code does not throw if the status code was expected.
service18GetStatus400
public void service18GetStatus400()
This test verifies that a response with a non-200 status code does throw if the status code wasn't expected.
service18GetStatus400WithExpectedResponse400
public void service18GetStatus400WithExpectedResponse400()
This test verifies that a response with a non-200 status code does not throw if the status code was expected.
service18GetStatus500
public void service18GetStatus500()
This test verifies that a response with a non-200 status code does throw if the status code wasn't expected.
service18GetStatus500WithExpectedResponse500
public void service18GetStatus500WithExpectedResponse500()
This test verifies that a response with a non-200 status code does not throw if the status code was expected.
service19PutWithBodyParamApplicationJsonContentTypeAndByteArrayBodyWithEmptyBody
public void service19PutWithBodyParamApplicationJsonContentTypeAndByteArrayBodyWithEmptyBody()
This test verifies a byte array application-json that is empty is sent correctly.
service19PutWithBodyParamApplicationJsonContentTypeAndByteArrayBodyWithNonEmptyBody
public void service19PutWithBodyParamApplicationJsonContentTypeAndByteArrayBodyWithNonEmptyBody()
This test verifies a byte array application-json is sent correctly.
service19PutWithBodyParamApplicationJsonContentTypeAndByteArrayBodyWithNullBody
public void service19PutWithBodyParamApplicationJsonContentTypeAndByteArrayBodyWithNullBody()
This test verifies a byte array application-json that is null is sent correctly.
service19PutWithBodyParamApplicationJsonContentTypeAndCharsetAndStringBodyWithEmptyBody
public void service19PutWithBodyParamApplicationJsonContentTypeAndCharsetAndStringBodyWithEmptyBody()
This test verifies a String application-json with charset that is null is sent correctly.
service19PutWithBodyParamApplicationJsonContentTypeAndCharsetAndStringBodyWithNonEmptyBody
public void service19PutWithBodyParamApplicationJsonContentTypeAndCharsetAndStringBodyWithNonEmptyBody()
This test verifies a String application-json with charset is sent correctly.
service19PutWithBodyParamApplicationJsonContentTypeAndCharsetAndStringBodyWithNullBody
public void service19PutWithBodyParamApplicationJsonContentTypeAndCharsetAndStringBodyWithNullBody()
This test verifies a String application-json with charset that is empty is sent correctly.
service19PutWithBodyParamApplicationJsonContentTypeAndStringBodyWithEmptyBody
public void service19PutWithBodyParamApplicationJsonContentTypeAndStringBodyWithEmptyBody()
This test verifies a String application-json that is empty is sent correctly.
service19PutWithBodyParamApplicationJsonContentTypeAndStringBodyWithNonEmptyBody
public void service19PutWithBodyParamApplicationJsonContentTypeAndStringBodyWithNonEmptyBody()
This test verifies a String application-json is sent correctly.
service19PutWithBodyParamApplicationJsonContentTypeAndStringBodyWithNullBody
public void service19PutWithBodyParamApplicationJsonContentTypeAndStringBodyWithNullBody()
This test verifies a String application-json that is null is sent correctly.
service19PutWithBodyParamApplicationOctetStreamContentTypeAndByteArrayBodyWithEmptyBody
public void service19PutWithBodyParamApplicationOctetStreamContentTypeAndByteArrayBodyWithEmptyBody()
This test verifies a byte array octet-stream that is empty is sent correctly.
service19PutWithBodyParamApplicationOctetStreamContentTypeAndByteArrayBodyWithNonEmptyBody
public void service19PutWithBodyParamApplicationOctetStreamContentTypeAndByteArrayBodyWithNonEmptyBody()
This test verifies a byte array octet-stream is sent correctly.
service19PutWithBodyParamApplicationOctetStreamContentTypeAndByteArrayBodyWithNullBody
public void service19PutWithBodyParamApplicationOctetStreamContentTypeAndByteArrayBodyWithNullBody()
This test verifies a byte array octet-stream that is null is sent correctly.
service19PutWithBodyParamApplicationOctetStreamContentTypeAndStringBodyWithEmptyBody
public void service19PutWithBodyParamApplicationOctetStreamContentTypeAndStringBodyWithEmptyBody()
This test verifies a String octet-stream that is empty is sent correctly.
service19PutWithBodyParamApplicationOctetStreamContentTypeAndStringBodyWithNonEmptyBody
public void service19PutWithBodyParamApplicationOctetStreamContentTypeAndStringBodyWithNonEmptyBody()
This test verifies a String octet-stream is sent correctly.
service19PutWithBodyParamApplicationOctetStreamContentTypeAndStringBodyWithNullBody
public void service19PutWithBodyParamApplicationOctetStreamContentTypeAndStringBodyWithNullBody()
This test verifies a String octet-stream that is null is sent correctly.
service19PutWithHeaderApplicationJsonContentTypeAndByteArrayBodyWithEmptyBody
public void service19PutWithHeaderApplicationJsonContentTypeAndByteArrayBodyWithEmptyBody()
This test verifies a byte array application-json with ignored content type that is empty is sent correctly.
service19PutWithHeaderApplicationJsonContentTypeAndByteArrayBodyWithNonEmptyBody
public void service19PutWithHeaderApplicationJsonContentTypeAndByteArrayBodyWithNonEmptyBody()
This test verifies a byte array application-json with ignored content type is sent correctly.
service19PutWithHeaderApplicationJsonContentTypeAndByteArrayBodyWithNullBody
public void service19PutWithHeaderApplicationJsonContentTypeAndByteArrayBodyWithNullBody()
This test verifies a byte array application-json with ignored content type that is null is sent correctly.
service19PutWithHeaderApplicationJsonContentTypeAndCharsetAndStringBodyWithEmptyBody
public void service19PutWithHeaderApplicationJsonContentTypeAndCharsetAndStringBodyWithEmptyBody()
This test verifies a String octet-stream with an ignored content type that is empty is sent correctly.
service19PutWithHeaderApplicationJsonContentTypeAndCharsetAndStringBodyWithNonEmptyBody
public void service19PutWithHeaderApplicationJsonContentTypeAndCharsetAndStringBodyWithNonEmptyBody()
This test verifies a String octet-stream with an ignored content type is sent correctly.
service19PutWithHeaderApplicationJsonContentTypeAndCharsetAndStringBodyWithNullBody
public void service19PutWithHeaderApplicationJsonContentTypeAndCharsetAndStringBodyWithNullBody()
This test verifies a String octet-stream with an ignored content type that is null is sent correctly.
service19PutWithHeaderApplicationJsonContentTypeAndStringBodyWithEmptyBody
public void service19PutWithHeaderApplicationJsonContentTypeAndStringBodyWithEmptyBody()
This test verifies a String application-json that is empty is sent correctly.
service19PutWithHeaderApplicationJsonContentTypeAndStringBodyWithNonEmptyBody
public void service19PutWithHeaderApplicationJsonContentTypeAndStringBodyWithNonEmptyBody()
This test verifies a String application-json is sent correctly.
service19PutWithHeaderApplicationJsonContentTypeAndStringBodyWithNullBody
public void service19PutWithHeaderApplicationJsonContentTypeAndStringBodyWithNullBody()
This test verifies a String application-json that is null is sent correctly.
service19PutWithHeaderApplicationOctetStreamContentTypeAndByteArrayBodyWithEmptyBody
public void service19PutWithHeaderApplicationOctetStreamContentTypeAndByteArrayBodyWithEmptyBody()
This test verifies a byte array octet-stream with an ignored content type that is empty is sent correctly.
service19PutWithHeaderApplicationOctetStreamContentTypeAndByteArrayBodyWithNonEmptyBody
public void service19PutWithHeaderApplicationOctetStreamContentTypeAndByteArrayBodyWithNonEmptyBody()
This test verifies a byte array octet-stream with an ignored content type is sent correctly.
service19PutWithHeaderApplicationOctetStreamContentTypeAndByteArrayBodyWithNullBody
public void service19PutWithHeaderApplicationOctetStreamContentTypeAndByteArrayBodyWithNullBody()
This test verifies a byte array octet-stream with an ignored content type that is null is sent correctly.
service19PutWithHeaderApplicationOctetStreamContentTypeAndStringBodyWithEmptyBody
public void service19PutWithHeaderApplicationOctetStreamContentTypeAndStringBodyWithEmptyBody()
This test verifies a String octet-stream with an ignored content type that is empty is sent correctly.
service19PutWithHeaderApplicationOctetStreamContentTypeAndStringBodyWithNonEmptyBody
public void service19PutWithHeaderApplicationOctetStreamContentTypeAndStringBodyWithNonEmptyBody()
This test verifies a String octet-stream with an ignored content type is sent correctly.
service19PutWithHeaderApplicationOctetStreamContentTypeAndStringBodyWithNullBody
public void service19PutWithHeaderApplicationOctetStreamContentTypeAndStringBodyWithNullBody()
This test verifies a String octet-stream with an ignored content type that is null is sent correctly.
service19PutWithNoContentTypeAndByteArrayBodyWithEmptyBody
public void service19PutWithNoContentTypeAndByteArrayBodyWithEmptyBody()
This test verifies a byte array octet-stream that is empty is sent correctly.
service19PutWithNoContentTypeAndByteArrayBodyWithNonEmptyBody
public void service19PutWithNoContentTypeAndByteArrayBodyWithNonEmptyBody()
This test verifies a byte array octet-stream is sent correctly.
service19PutWithNoContentTypeAndByteArrayBodyWithNullBody
public void service19PutWithNoContentTypeAndByteArrayBodyWithNullBody()
This test verifies a byte array octet-stream that is null is sent correctly.
service19PutWithNoContentTypeAndStringBodyWithEmptyBody
public void service19PutWithNoContentTypeAndStringBodyWithEmptyBody()
This test verifies a String octet-stream that is empty is sent correctly.
service19PutWithNoContentTypeAndStringBodyWithNonEmptyBody
public void service19PutWithNoContentTypeAndStringBodyWithNonEmptyBody()
This test verifies a String octet-stream is sent correctly.
service19PutWithNoContentTypeAndStringBodyWithNullBody
public void service19PutWithNoContentTypeAndStringBodyWithNullBody()
This test verifies a String octet-stream that is null is sent correctly.
service20GetBytes100BodyAndHeaders
public void service20GetBytes100BodyAndHeaders()
This test verifies that a byte array body with deserialized headers are handled correctly.
service20GetBytes100OnlyHeaders
public void service20GetBytes100OnlyHeaders()
This test verifies a deserialized body and deserialized headers are handled correctly.
service20GetBytesOnlyHeaders
public void service20GetBytesOnlyHeaders()
This test verifies that a void body, even if data is returned, with deserialized headers are handled correctly.
service20GetBytesOnlyStatus
public void service20GetBytesOnlyStatus()
This test verifies that a void body, even if data is returned, with void deserialized headers are handled correctly.
service20GetResponseBody
public void service20GetResponseBody()
This test verifies a String-based octet-stream is sent correctly.
service20GetVoidResponse
public void service20GetVoidResponse()
This test verifies that a void response is handled correctly.
service20PutBodyAndHeaders
public void service20PutBodyAndHeaders()
This test verifies that deserialized headers are handled correctly.
service20PutOnlyHeaders
public void service20PutOnlyHeaders()
This test verifies that a void body with deserialized headers are handled correctly.
service21GetBytes100
public void service21GetBytes100()
This test verifies that a byte array is downloaded correctly.
service22GetBytes
public void service22GetBytes()
This test verifies that the response body is returned as a byte array.
service23GetBytes
public void service23GetBytes()
This test verifies that the response body is returned as a byte array.
service24Put
public void service24Put()
This test verifies that the header collection sets headers correctly.
shouldBufferResponse
public void shouldBufferResponse()
Tests that client returns buffered response if requested via azure-eagerly-read-response Context flag.
simpleDownloadTest
public void simpleDownloadTest(Context context)
This test verifies that a StreamResponse is downloaded correctly.
Parameters:
simpleDownloadTestAsync
public void simpleDownloadTestAsync(Context context)
This test verifies that a StreamResponse is downloaded correctly.
Parameters:
streamResponseCanTransferBody
public void streamResponseCanTransferBody(Context context)
This test verifies that a StreamResponse transfers correctly.
Parameters:
Throws:
streamResponseCanTransferBodyAsync
public void streamResponseCanTransferBodyAsync(Context context)
This test verifies that a StreamResponse transfers correctly.
Parameters:
Throws:
syncDeleteRequest
public void syncDeleteRequest()
Tests that a DELETE request is sent correctly.
syncGetRequestWithAnything
public void syncGetRequestWithAnything()
Tests that a response with a return type of HttpBinJson is correctly handled.
syncGetRequestWithAnythingWithEncodedPathParam
public void syncGetRequestWithAnythingWithEncodedPathParam()
Tests that a request with a path parameter (PathParam) that is already encoded is correctly handled.
syncGetRequestWithAnythingWithEncodedPathParamWithPercent20
public void syncGetRequestWithAnythingWithEncodedPathParamWithPercent20()
Tests that a request with a path parameter (PathParam) that is already encoded is correctly handled.
syncGetRequestWithAnythingWithEncodedPathParamWithPlus
public void syncGetRequestWithAnythingWithEncodedPathParamWithPlus()
Tests that a request with a path parameter (PathParam) that is already encoded is correctly handled.
syncGetRequestWithAnythingWithPathParam
public void syncGetRequestWithAnythingWithPathParam()
Tests that a request with a path parameter (PathParam) is correctly handled.
syncGetRequestWithAnythingWithPathParamWithPlus
public void syncGetRequestWithAnythingWithPathParamWithPlus()
Tests that a request with a path parameter (PathParam) that needs encoding is correctly handled.
syncGetRequestWithAnythingWithPathParamWithSpace
public void syncGetRequestWithAnythingWithPathParamWithSpace()
Tests that a request with a path parameter (PathParam) that needs encoding is correctly handled.
syncGetRequestWithAnythingWithPlus
public void syncGetRequestWithAnythingWithPlus()
Tests that a request with a path containing a plus (+) is correctly handled.
syncGetRequestWithHeaderParametersAndAnythingReturn
public void syncGetRequestWithHeaderParametersAndAnythingReturn()
Tests that a request with header parameters (HeaderParam) is correctly handled.
syncGetRequestWithNoReturn
public void syncGetRequestWithNoReturn()
Tests that a response with no return type is correctly handled.
syncGetRequestWithNullHeader
public void syncGetRequestWithNullHeader()
Tests that a request with header parameters (HeaderParam) where a value is null is correctly handled.
syncGetRequestWithNullQueryParameter
public void syncGetRequestWithNullQueryParameter()
Tests that a request with query parameters (QueryParam) that need encoding where a value is null is correctly handled.
syncGetRequestWithQueryParametersAndAnything
public void syncGetRequestWithQueryParametersAndAnything()
Tests that a request with query parameters (QueryParam) that need encoding is correctly handled.
syncGetRequestWithQueryParametersAndAnythingWithEncodedWithPercent20
public void syncGetRequestWithQueryParametersAndAnythingWithEncodedWithPercent20()
Tests that a request with query parameters (QueryParam) where some need encoding and some are already encoded is correctly handled.
syncGetRequestWithQueryParametersAndAnythingWithPercent20
public void syncGetRequestWithQueryParametersAndAnythingWithPercent20()
Tests that a request with query parameters (QueryParam) that need encoding is correctly handled.
syncHeadBooleanRequest
public void syncHeadBooleanRequest()
Tests that a HEAD request is sent correctly.
syncHeadRequest
public void syncHeadRequest()
Tests that a HEAD request is sent correctly.
syncHeadersRequest
public void syncHeadersRequest()
Tests that a request with Headers adds the headers to the request correctly.
syncPatchRequest
public void syncPatchRequest()
Tests that a PATCH request is sent correctly.
syncPostRequestWithNullBody
public void syncPostRequestWithNullBody()
Tests that a request with an octet-stream body where the body is null is correctly handled.
syncPostRequestWithStringBody
public void syncPostRequestWithStringBody()
Tests that a request with an octet-stream body is correctly handled.
syncPutRequestWithBodyAndEqualContentLength
public void syncPutRequestWithBodyAndEqualContentLength()
Tests that a request with an octet-stream body where the body length is equal to the content length is correctly handled.
syncPutRequestWithBodyLessThanContentLength
public void syncPutRequestWithBodyLessThanContentLength()
Tests that a request with an octet-stream body where the body length is less than the content length is correctly handled.
syncPutRequestWithBodyMoreThanContentLength
public void syncPutRequestWithBodyMoreThanContentLength()
Tests that a request with an octet-stream body where the body length is greater than the content length is correctly handled.
syncPutRequestWithIntBody
public void syncPutRequestWithIntBody()
Tests that a request with an octet-stream body where th body is a single value binary is correctly handled.
syncPutRequestWithUnexpectedResponse
public void syncPutRequestWithUnexpectedResponse()
Tests that an unexpected response is handled correctly.
syncPutRequestWithUnexpectedResponseAndDeterminedExceptionType
public void syncPutRequestWithUnexpectedResponseAndDeterminedExceptionType()
Tests that a status code specific unexpected response is handled correctly.
syncPutRequestWithUnexpectedResponseAndExceptionType
public void syncPutRequestWithUnexpectedResponseAndExceptionType()
Tests that a specific unexpected response is handled correctly.
syncPutRequestWithUnexpectedResponseAndFallthroughExceptionType
public void syncPutRequestWithUnexpectedResponseAndFallthroughExceptionType()
Tests that an unexpected response that falls through to the default type is handled correctly.
syncPutRequestWithUnexpectedResponseAndNoFallthroughExceptionType
public void syncPutRequestWithUnexpectedResponseAndNoFallthroughExceptionType()
Tests that an unexpected response that falls through without a default type falls back to a global default is handled correctly.
syncRequestWithByteArrayReturnType
public void syncRequestWithByteArrayReturnType()
Tests that the response body is correctly returned as a byte array.
syncRequestWithByteArrayReturnTypeAndParameterizedHostAndPath
public void syncRequestWithByteArrayReturnTypeAndParameterizedHostAndPath()
Tests that the response body is correctly returned as a byte array.
syncRequestWithEmptyByteArrayReturnTypeAndParameterizedHostAndPath
public void syncRequestWithEmptyByteArrayReturnTypeAndParameterizedHostAndPath()
Tests that the response body is correctly returned as a byte array.
syncRequestWithMultipleHostParams
public void syncRequestWithMultipleHostParams()
Tests that a request with multiple host parameters is correctly handled.
syncVoidHeadRequest
public void syncVoidHeadRequest()
Tests that a HEAD request is sent correctly.
unexpectedHttpOk
public void unexpectedHttpOk()
This test verifies that an unexpected 200 response is handled correctly.
utf16BeBomResponse
public void utf16BeBomResponse()
Tests that a response with a byte order mark encodes using the specified charset.
utf16LeBomResponse
public void utf16LeBomResponse()
Tests that a response with a byte order mark encodes using the specified charset.
utf32BeBomResponse
public void utf32BeBomResponse()
Tests that a response with a byte order mark encodes using the specified charset.
utf32LeBomResponse
public void utf32LeBomResponse()
Tests that a response with a byte order mark encodes using the specified charset.
utf8BomResponse
public void utf8BomResponse()
Tests that a response with a byte order mark encodes using the specified charset.
voidDoesNotEagerlyReadResponse
public void voidDoesNotEagerlyReadResponse(BiConsumer
This test verifies that the response body is not eagerly read when the response is void.
Parameters:
voidErrorReturnsErrorBody
public void voidErrorReturnsErrorBody(BiConsumer
This test verifies that the error response body is returned when the response is void.
Parameters: