HttpClientTests クラス
- java.
lang. Object - com.
azure. core. test. http. HttpClientTests
- com.
public abstract class HttpClientTests
の HttpClient汎用テスト スイート。
フィールドの概要
修飾子と型 | フィールドと説明 |
---|---|
protected static final String | ECHO_RESPONSE |
コンストラクターの概要
コンストラクター | 説明 | |
---|---|---|
HttpClientTests() |
メソッドの概要
メソッドの継承元: java.lang.Object
フィールドの詳細
ECHO_RESPONSE
protected static final String ECHO_RESPONSE
コンストラクターの詳細
HttpClientTests
public HttpClientTests()
メソッドの詳細
createService
protected T
Parameters:
createService
protected T
Parameters:
asyncCompletableHeadRequest
public void asyncCompletableHeadRequest()
asyncDeleteRequest
public void asyncDeleteRequest()
asyncGetRequestWithAnything
public void asyncGetRequestWithAnything()
asyncGetRequestWithHeaderParametersAndAnything
public void asyncGetRequestWithHeaderParametersAndAnything()
asyncGetRequestWithNoReturn
public void asyncGetRequestWithNoReturn()
戻り値の型を持たない応答が正しく処理されることをテストします。
asyncGetRequestWithQueryParametersAndAnything
public void asyncGetRequestWithQueryParametersAndAnything()
asyncHeadBooleanRequest
public void asyncHeadBooleanRequest()
asyncHeadRequest
public void asyncHeadRequest()
asyncHeadersRequest
public void asyncHeadersRequest()
asyncHttpsHeadersRequest
public void asyncHttpsHeadersRequest()
asyncPatchRequest
public void asyncPatchRequest()
asyncPostRequestWithStringBody
public void asyncPostRequestWithStringBody()
asyncPutRequestWithBinaryDataBodyAndEqualContentLength
public void asyncPutRequestWithBinaryDataBodyAndEqualContentLength()
asyncPutRequestWithBinaryDataBodyAndLessThanContentLength
public void asyncPutRequestWithBinaryDataBodyAndLessThanContentLength()
asyncPutRequestWithBinaryDataBodyAndMoreThanContentLength
public void asyncPutRequestWithBinaryDataBodyAndMoreThanContentLength()
asyncPutRequestWithBodyAndEqualContentLength
public void asyncPutRequestWithBodyAndEqualContentLength()
asyncPutRequestWithBodyAndLessThanContentLength
public void asyncPutRequestWithBodyAndLessThanContentLength()
asyncPutRequestWithBodyAndMoreThanContentLength
public void asyncPutRequestWithBodyAndMoreThanContentLength()
asyncPutRequestWithIntBody
public void asyncPutRequestWithIntBody()
asyncPutRequestWithStreamBinaryDataBodyAndLessThanContentLength
public void asyncPutRequestWithStreamBinaryDataBodyAndLessThanContentLength()
Rest プロキシ内の LengthValidatingInputStream は、EOF に到達するリーダーに依存します。 このテストでは、この動作をアサートするために InputStream を具体的に対象とします。
asyncPutRequestWithStreamBinaryDataBodyAndMoreThanContentLength
public void asyncPutRequestWithStreamBinaryDataBodyAndMoreThanContentLength()
Rest プロキシ内の LengthValidatingInputStream は、EOF に到達するリーダーに依存します。 このテストでは、この動作をアサートするために InputStream を具体的に対象とします。
asyncPutRequestWithUnexpectedResponse
public void asyncPutRequestWithUnexpectedResponse()
asyncPutRequestWithUnexpectedResponseAndDeterminedExceptionType
public void asyncPutRequestWithUnexpectedResponseAndDeterminedExceptionType()
asyncPutRequestWithUnexpectedResponseAndExceptionType
public void asyncPutRequestWithUnexpectedResponseAndExceptionType()
asyncPutRequestWithUnexpectedResponseAndFallthroughExceptionType
public void asyncPutRequestWithUnexpectedResponseAndFallthroughExceptionType()
asyncPutRequestWithUnexpectedResponseAndNoFallthroughExceptionType
public void asyncPutRequestWithUnexpectedResponseAndNoFallthroughExceptionType()
asyncRequestWithByteArrayReturnType
public void asyncRequestWithByteArrayReturnType()
応答本文がバイト配列として正しく返されることをテストします。
asyncRequestWithByteArrayReturnTypeAndParameterizedHostAndPath
public void asyncRequestWithByteArrayReturnTypeAndParameterizedHostAndPath()
応答本文がバイト配列として正しく返されることをテストします。
asyncRequestWithMultipleHostParams
public void asyncRequestWithMultipleHostParams()
binaryDataUploadTest
bomWithDifferentHeader
public void bomWithDifferentHeader()
バイトオーダー マーカーと 'Content-Type' ヘッダーを含む応答が BOM エンコードの使用に遅延することをテストします。
bomWithSameHeader
public void bomWithSameHeader()
バイトオーダー マーカーと 'Content-Type' ヘッダーを含む応答が BOM エンコードの使用に遅延することをテストします。
bufferedResponseCanBeReadMultipleTimes
public void bufferedResponseCanBeReadMultipleTimes()
バッファリングされた応答が実際にバッファリングされているテスト、つまりコンテンツに何度もアクセスできます。
Throws:
canAccessResponseBody
canSendBinaryData
public void canSendBinaryData(BinaryData requestBody, byte[] expectedResponseBody)
さまざまな形式のランダムなバイトを、送信側にエコーバックするエンドポイントに送信するテスト。
Parameters:
canSendBinaryDataSync
public void canSendBinaryDataSync(BinaryData requestBody, byte[] expectedResponseBody)
さまざまな形式のランダムなバイトを、送信側にエコーバックするエンドポイントに送信するテスト。
Parameters:
canSendBinaryDataWithProgressReporting
public void canSendBinaryDataWithProgressReporting(BinaryData requestBody, byte[] expectedResponseBody)
さまざまな形式のランダムなバイトを、送信側にエコーバックするエンドポイントに送信するテスト。
Parameters:
canSendBinaryDataWithProgressReportingSync
public void canSendBinaryDataWithProgressReportingSync(BinaryData requestBody, byte[] expectedResponseBody)
さまざまな形式のランダムなバイトを、送信側にエコーバックするエンドポイントに送信するテスト。
Parameters:
createHttpClient
protected abstract HttpClient createHttpClient()
各テストに使用される HTTP クライアントを取得します。 これはテストごとに 1 回呼び出されます。
Returns:
downloadTestArgumentProvider
public static Stream
eagerlyConvertedHeadersAreHttpHeaders
public void eagerlyConvertedHeadersAreHttpHeaders()
実装 HTTP ヘッダーを azure-core HttpHeaders に熱心に変換するテストが行われます。
fluxUploadTest
getByteArrayAsyncWithNoExpectedResponses
public void getByteArrayAsyncWithNoExpectedResponses()
応答本文がバイト配列として正しく返されることをテストします。
getPort
@Deprecated
protected abstract int getPort()
非推奨
サーバーが要求を適切にルーティングするために使用している動的ポートを取得します。
Returns:
getRequestUrl
protected URL getRequestUrl(String requestPath)
指定されたパスの要求 URL を取得します。
Parameters:
Returns:
getServerUri
protected abstract String getServerUri(boolean secure)
サーバーが要求を適切にルーティングするために使用している動的 URI を取得します。
Parameters:
Returns:
headerResponse
public void headerResponse()
'Content-Type' ヘッダーを持つ応答が、指定された文字セットを使用してエンコードすることをテストします。
invalidHeaderResponse
public void invalidHeaderResponse()
無効またはサポートされていない文字セットを含む 'Content-Type' の応答が UTF-8 を使用してエンコードされることをテストします。
isSecure
protected boolean isSecure()
通信をセキュリティで保護する必要があるかどうかを示すフラグ (https または http) を取得します。
Returns:
plainResponse
public void plainResponse()
バイトオーダー マークまたは 'Content-Type' ヘッダーのない応答が UTF-8 を使用してエンコードされることをテストします。
postUrlForm
public void postUrlForm()
postUrlFormEncoded
public void postUrlFormEncoded()
rawFluxDownloadTest
public void rawFluxDownloadTest()
requestOptionsAddAHeader
public void requestOptionsAddAHeader()
requestOptionsChangesBody
public void requestOptionsChangesBody()
requestOptionsChangesBodyAndContentLength
public void requestOptionsChangesBodyAndContentLength()
requestOptionsSetsAHeader
public void requestOptionsSetsAHeader()
segmentUploadTest
service16Put
public void service16Put()
service16PutAsync
public void service16PutAsync()
service18GetStatus200
public void service18GetStatus200()
service18GetStatus200WithExpectedResponse200
public void service18GetStatus200WithExpectedResponse200()
service18GetStatus300
public void service18GetStatus300()
service18GetStatus300WithExpectedResponse300
public void service18GetStatus300WithExpectedResponse300()
service18GetStatus400
public void service18GetStatus400()
service18GetStatus400WithExpectedResponse400
public void service18GetStatus400WithExpectedResponse400()
service18GetStatus500
public void service18GetStatus500()
service18GetStatus500WithExpectedResponse500
public void service18GetStatus500WithExpectedResponse500()
service19PutWithBodyParamApplicationJsonContentTypeAndByteArrayBodyWithEmptyBody
public void service19PutWithBodyParamApplicationJsonContentTypeAndByteArrayBodyWithEmptyBody()
service19PutWithBodyParamApplicationJsonContentTypeAndByteArrayBodyWithNonEmptyBody
public void service19PutWithBodyParamApplicationJsonContentTypeAndByteArrayBodyWithNonEmptyBody()
service19PutWithBodyParamApplicationJsonContentTypeAndByteArrayBodyWithNullBody
public void service19PutWithBodyParamApplicationJsonContentTypeAndByteArrayBodyWithNullBody()
service19PutWithBodyParamApplicationJsonContentTypeAndCharsetAndStringBodyWithEmptyBody
public void service19PutWithBodyParamApplicationJsonContentTypeAndCharsetAndStringBodyWithEmptyBody()
service19PutWithBodyParamApplicationJsonContentTypeAndCharsetAndStringBodyWithNonEmptyBody
public void service19PutWithBodyParamApplicationJsonContentTypeAndCharsetAndStringBodyWithNonEmptyBody()
service19PutWithBodyParamApplicationJsonContentTypeAndCharsetAndStringBodyWithNullBody
public void service19PutWithBodyParamApplicationJsonContentTypeAndCharsetAndStringBodyWithNullBody()
service19PutWithBodyParamApplicationJsonContentTypeAndStringBodyWithEmptyBody
public void service19PutWithBodyParamApplicationJsonContentTypeAndStringBodyWithEmptyBody()
service19PutWithBodyParamApplicationJsonContentTypeAndStringBodyWithNonEmptyBody
public void service19PutWithBodyParamApplicationJsonContentTypeAndStringBodyWithNonEmptyBody()
service19PutWithBodyParamApplicationJsonContentTypeAndStringBodyWithNullBody
public void service19PutWithBodyParamApplicationJsonContentTypeAndStringBodyWithNullBody()
service19PutWithBodyParamApplicationOctetStreamContentTypeAndByteArrayBodyWithEmptyBody
public void service19PutWithBodyParamApplicationOctetStreamContentTypeAndByteArrayBodyWithEmptyBody()
service19PutWithBodyParamApplicationOctetStreamContentTypeAndByteArrayBodyWithNonEmptyBody
public void service19PutWithBodyParamApplicationOctetStreamContentTypeAndByteArrayBodyWithNonEmptyBody()
service19PutWithBodyParamApplicationOctetStreamContentTypeAndByteArrayBodyWithNullBody
public void service19PutWithBodyParamApplicationOctetStreamContentTypeAndByteArrayBodyWithNullBody()
service19PutWithBodyParamApplicationOctetStreamContentTypeAndStringBodyWithEmptyBody
public void service19PutWithBodyParamApplicationOctetStreamContentTypeAndStringBodyWithEmptyBody()
service19PutWithBodyParamApplicationOctetStreamContentTypeAndStringBodyWithNonEmptyBody
public void service19PutWithBodyParamApplicationOctetStreamContentTypeAndStringBodyWithNonEmptyBody()
service19PutWithBodyParamApplicationOctetStreamContentTypeAndStringBodyWithNullBody
public void service19PutWithBodyParamApplicationOctetStreamContentTypeAndStringBodyWithNullBody()
service19PutWithHeaderApplicationJsonContentTypeAndByteArrayBodyWithEmptyBody
public void service19PutWithHeaderApplicationJsonContentTypeAndByteArrayBodyWithEmptyBody()
service19PutWithHeaderApplicationJsonContentTypeAndByteArrayBodyWithNonEmptyBody
public void service19PutWithHeaderApplicationJsonContentTypeAndByteArrayBodyWithNonEmptyBody()
service19PutWithHeaderApplicationJsonContentTypeAndByteArrayBodyWithNullBody
public void service19PutWithHeaderApplicationJsonContentTypeAndByteArrayBodyWithNullBody()
service19PutWithHeaderApplicationJsonContentTypeAndCharsetAndStringBodyWithEmptyBody
public void service19PutWithHeaderApplicationJsonContentTypeAndCharsetAndStringBodyWithEmptyBody()
service19PutWithHeaderApplicationJsonContentTypeAndCharsetAndStringBodyWithNonEmptyBody
public void service19PutWithHeaderApplicationJsonContentTypeAndCharsetAndStringBodyWithNonEmptyBody()
service19PutWithHeaderApplicationJsonContentTypeAndCharsetAndStringBodyWithNullBody
public void service19PutWithHeaderApplicationJsonContentTypeAndCharsetAndStringBodyWithNullBody()
service19PutWithHeaderApplicationJsonContentTypeAndStringBodyWithEmptyBody
public void service19PutWithHeaderApplicationJsonContentTypeAndStringBodyWithEmptyBody()
service19PutWithHeaderApplicationJsonContentTypeAndStringBodyWithNonEmptyBody
public void service19PutWithHeaderApplicationJsonContentTypeAndStringBodyWithNonEmptyBody()
service19PutWithHeaderApplicationJsonContentTypeAndStringBodyWithNullBody
public void service19PutWithHeaderApplicationJsonContentTypeAndStringBodyWithNullBody()
service19PutWithHeaderApplicationOctetStreamContentTypeAndByteArrayBodyWithEmptyBody
public void service19PutWithHeaderApplicationOctetStreamContentTypeAndByteArrayBodyWithEmptyBody()
service19PutWithHeaderApplicationOctetStreamContentTypeAndByteArrayBodyWithNonEmptyBody
public void service19PutWithHeaderApplicationOctetStreamContentTypeAndByteArrayBodyWithNonEmptyBody()
service19PutWithHeaderApplicationOctetStreamContentTypeAndByteArrayBodyWithNullBody
public void service19PutWithHeaderApplicationOctetStreamContentTypeAndByteArrayBodyWithNullBody()
service19PutWithHeaderApplicationOctetStreamContentTypeAndStringBodyWithEmptyBody
public void service19PutWithHeaderApplicationOctetStreamContentTypeAndStringBodyWithEmptyBody()
service19PutWithHeaderApplicationOctetStreamContentTypeAndStringBodyWithNonEmptyBody
public void service19PutWithHeaderApplicationOctetStreamContentTypeAndStringBodyWithNonEmptyBody()
service19PutWithHeaderApplicationOctetStreamContentTypeAndStringBodyWithNullBody
public void service19PutWithHeaderApplicationOctetStreamContentTypeAndStringBodyWithNullBody()
service19PutWithNoContentTypeAndByteArrayBodyWithEmptyBody
public void service19PutWithNoContentTypeAndByteArrayBodyWithEmptyBody()
service19PutWithNoContentTypeAndByteArrayBodyWithNonEmptyBody
public void service19PutWithNoContentTypeAndByteArrayBodyWithNonEmptyBody()
service19PutWithNoContentTypeAndByteArrayBodyWithNullBody
public void service19PutWithNoContentTypeAndByteArrayBodyWithNullBody()
service19PutWithNoContentTypeAndStringBodyWithEmptyBody
public void service19PutWithNoContentTypeAndStringBodyWithEmptyBody()
service19PutWithNoContentTypeAndStringBodyWithNonEmptyBody
public void service19PutWithNoContentTypeAndStringBodyWithNonEmptyBody()
service19PutWithNoContentTypeAndStringBodyWithNullBody
public void service19PutWithNoContentTypeAndStringBodyWithNullBody()
service20GetBytes100BodyAndHeaders
public void service20GetBytes100BodyAndHeaders()
service20GetBytes100OnlyHeaders
public void service20GetBytes100OnlyHeaders()
service20GetBytesOnlyHeaders
public void service20GetBytesOnlyHeaders()
service20GetBytesOnlyStatus
public void service20GetBytesOnlyStatus()
service20GetResponseBody
public void service20GetResponseBody()
service20GetVoidResponse
public void service20GetVoidResponse()
service20PutBodyAndHeaders
public void service20PutBodyAndHeaders()
service20PutOnlyHeaders
public void service20PutOnlyHeaders()
service21GetBytes100
public void service21GetBytes100()
service22GetBytes
public void service22GetBytes()
service23GetBytes
public void service23GetBytes()
service24Put
public void service24Put()
shouldBufferResponse
public void shouldBufferResponse()
azure-eagerly-read-response Context フラグを使用して要求された場合に、クライアントからバッファーされた応答が返されることをテストします。
simpleDownloadTest
public void simpleDownloadTest(Context context)
Parameters:
simpleDownloadTestAsync
public void simpleDownloadTestAsync(Context context)
Parameters:
streamResponseCanTransferBody
streamResponseCanTransferBodyAsync
public void streamResponseCanTransferBodyAsync(Context context)
Parameters:
Throws:
syncDeleteRequest
public void syncDeleteRequest()
syncGetRequestWithAnything
public void syncGetRequestWithAnything()
syncGetRequestWithAnythingWithEncodedPathParam
public void syncGetRequestWithAnythingWithEncodedPathParam()
syncGetRequestWithAnythingWithEncodedPathParamWithPercent20
public void syncGetRequestWithAnythingWithEncodedPathParamWithPercent20()
syncGetRequestWithAnythingWithEncodedPathParamWithPlus
public void syncGetRequestWithAnythingWithEncodedPathParamWithPlus()
syncGetRequestWithAnythingWithPathParam
public void syncGetRequestWithAnythingWithPathParam()
syncGetRequestWithAnythingWithPathParamWithPlus
public void syncGetRequestWithAnythingWithPathParamWithPlus()
syncGetRequestWithAnythingWithPathParamWithSpace
public void syncGetRequestWithAnythingWithPathParamWithSpace()
syncGetRequestWithAnythingWithPlus
public void syncGetRequestWithAnythingWithPlus()
syncGetRequestWithHeaderParametersAndAnythingReturn
public void syncGetRequestWithHeaderParametersAndAnythingReturn()
syncGetRequestWithNoReturn
public void syncGetRequestWithNoReturn()
戻り値の型を持たない応答が正しく処理されることをテストします。
syncGetRequestWithNullHeader
public void syncGetRequestWithNullHeader()
syncGetRequestWithNullQueryParameter
public void syncGetRequestWithNullQueryParameter()
syncGetRequestWithQueryParametersAndAnything
public void syncGetRequestWithQueryParametersAndAnything()
syncGetRequestWithQueryParametersAndAnythingWithEncodedWithPercent20
public void syncGetRequestWithQueryParametersAndAnythingWithEncodedWithPercent20()
syncGetRequestWithQueryParametersAndAnythingWithPercent20
public void syncGetRequestWithQueryParametersAndAnythingWithPercent20()
syncHeadBooleanRequest
public void syncHeadBooleanRequest()
syncHeadRequest
public void syncHeadRequest()
syncHeadersRequest
public void syncHeadersRequest()
syncPatchRequest
public void syncPatchRequest()
syncPostRequestWithNullBody
public void syncPostRequestWithNullBody()
syncPostRequestWithStringBody
public void syncPostRequestWithStringBody()
syncPutRequestWithBodyAndEqualContentLength
public void syncPutRequestWithBodyAndEqualContentLength()
syncPutRequestWithBodyLessThanContentLength
public void syncPutRequestWithBodyLessThanContentLength()
syncPutRequestWithBodyMoreThanContentLength
public void syncPutRequestWithBodyMoreThanContentLength()
syncPutRequestWithIntBody
public void syncPutRequestWithIntBody()
syncPutRequestWithUnexpectedResponse
public void syncPutRequestWithUnexpectedResponse()
syncPutRequestWithUnexpectedResponseAndDeterminedExceptionType
public void syncPutRequestWithUnexpectedResponseAndDeterminedExceptionType()
syncPutRequestWithUnexpectedResponseAndExceptionType
public void syncPutRequestWithUnexpectedResponseAndExceptionType()
syncPutRequestWithUnexpectedResponseAndFallthroughExceptionType
public void syncPutRequestWithUnexpectedResponseAndFallthroughExceptionType()
syncPutRequestWithUnexpectedResponseAndNoFallthroughExceptionType
public void syncPutRequestWithUnexpectedResponseAndNoFallthroughExceptionType()
syncRequestWithByteArrayReturnType
public void syncRequestWithByteArrayReturnType()
応答本文がバイト配列として正しく返されることをテストします。
syncRequestWithByteArrayReturnTypeAndParameterizedHostAndPath
public void syncRequestWithByteArrayReturnTypeAndParameterizedHostAndPath()
応答本文がバイト配列として正しく返されることをテストします。
syncRequestWithEmptyByteArrayReturnTypeAndParameterizedHostAndPath
public void syncRequestWithEmptyByteArrayReturnTypeAndParameterizedHostAndPath()
応答本文がバイト配列として正しく返されることをテストします。
syncRequestWithMultipleHostParams
public void syncRequestWithMultipleHostParams()
syncVoidHeadRequest
public void syncVoidHeadRequest()
unexpectedHTTPOK
public void unexpectedHTTPOK()
utf16BeBomResponse
public void utf16BeBomResponse()
バイトオーダー マークを持つ応答が、指定した文字セットを使用してエンコードされることをテストします。
utf16LeBomResponse
public void utf16LeBomResponse()
バイトオーダー マークを持つ応答が、指定した文字セットを使用してエンコードされることをテストします。
utf32BeBomResponse
public void utf32BeBomResponse()
バイトオーダー マークを持つ応答が、指定した文字セットを使用してエンコードされることをテストします。
utf32LeBomResponse
public void utf32LeBomResponse()
バイトオーダー マークを持つ応答が、指定した文字セットを使用してエンコードされることをテストします。
utf8BomResponse
public void utf8BomResponse()
バイトオーダー マークを持つ応答が、指定した文字セットを使用してエンコードされることをテストします。
voidDoesNotEagerlyReadResponse
public void voidDoesNotEagerlyReadResponse(BiConsumer
Parameters:
voidErrorReturnsErrorBody
public void voidErrorReturnsErrorBody(BiConsumer
Parameters:
適用対象
Azure SDK for Java