你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

HttpClientTests 类

  • java.lang.Object
    • com.azure.core.test.http.HttpClientTests

public abstract class HttpClientTests

HttpClient通用测试套件。

字段摘要

修饰符和类型 字段和描述
protected static final String ECHO_RESPONSE

构造函数摘要

构造函数 说明
HttpClientTests()

方法摘要

修饰符和类型 方法和描述
protected T createService(Class<T> serviceClass)
protected T createService(Class<T> serviceClass, HttpClient httpClient)
void asyncCompletableHeadRequest()
void asyncDeleteRequest()
void asyncGetRequestWithAnything()
void asyncGetRequestWithHeaderParametersAndAnything()
void asyncGetRequestWithNoReturn()

测试是否正确处理了没有返回类型的响应。

void asyncGetRequestWithQueryParametersAndAnything()
void asyncHeadBooleanRequest()
void asyncHeadRequest()
void asyncHeadersRequest()
void asyncHttpsHeadersRequest()
void asyncPatchRequest()
void asyncPostRequestWithStringBody()
void asyncPutRequestWithBinaryDataBodyAndEqualContentLength()
void asyncPutRequestWithBinaryDataBodyAndLessThanContentLength()
void asyncPutRequestWithBinaryDataBodyAndMoreThanContentLength()
void asyncPutRequestWithBodyAndEqualContentLength()
void asyncPutRequestWithBodyAndLessThanContentLength()
void asyncPutRequestWithBodyAndMoreThanContentLength()
void asyncPutRequestWithIntBody()
void asyncPutRequestWithStreamBinaryDataBodyAndLessThanContentLength()

在 rest 代理中验证输入流的长度依赖于读取器到达 EOF。

void asyncPutRequestWithStreamBinaryDataBodyAndMoreThanContentLength()

在 rest 代理中验证输入流的长度依赖于读取器到达 EOF。

void asyncPutRequestWithUnexpectedResponse()
void asyncPutRequestWithUnexpectedResponseAndDeterminedExceptionType()
void asyncPutRequestWithUnexpectedResponseAndExceptionType()
void asyncPutRequestWithUnexpectedResponseAndFallthroughExceptionType()
void asyncPutRequestWithUnexpectedResponseAndNoFallthroughExceptionType()
void asyncRequestWithByteArrayReturnType()

测试响应正文是否以字节数组的形式正确返回。

void asyncRequestWithByteArrayReturnTypeAndParameterizedHostAndPath()

测试响应正文是否以字节数组的形式正确返回。

void asyncRequestWithMultipleHostParams()
void binaryDataUploadTest()
void bomWithDifferentHeader()

测试具有字节顺序标记和“Content-Type”标头的响应是否遵循使用 BOM 编码。

void bomWithSameHeader()

测试具有字节顺序标记和“Content-Type”标头的响应是否遵循使用 BOM 编码。

void bufferedResponseCanBeReadMultipleTimes()

测试缓冲响应是否确实已缓冲,i.e.

void canAccessResponseBody()

可访问未缓冲区响应正文的测试。

void canSendBinaryData(BinaryData requestBody, byte[] expectedResponseBody)

将各种形式的随机字节发送到终结点的测试,该终结点将字节回显给发送方。

void canSendBinaryDataSync(BinaryData requestBody, byte[] expectedResponseBody)

将各种形式的随机字节发送到终结点的测试,该终结点将字节回显给发送方。

void canSendBinaryDataWithProgressReporting(BinaryData requestBody, byte[] expectedResponseBody)

将各种形式的随机字节发送到终结点的测试,该终结点将字节回显给发送方。

void canSendBinaryDataWithProgressReportingSync(BinaryData requestBody, byte[] expectedResponseBody)

将各种形式的随机字节发送到终结点的测试,该终结点将字节回显给发送方。

protected abstract HttpClient createHttpClient()

获取将用于每个测试的 HTTP 客户端。

static Stream<org.junit.jupiter.params.provider.Arguments> downloadTestArgumentProvider()
void eagerlyConvertedHeadersAreHttpHeaders()

已完成将实现 HTTP 标头转换为 azure 核心 Http标头的测试。

void fluxUploadTest()
void getByteArrayAsyncWithNoExpectedResponses()

测试响应正文是否正确返回为字节数组。

protected abstract int getPort()

已放弃

获取服务器用于正确路由请求的动态端口。

protected URL getRequestUrl(String requestPath)

获取给定路径的请求 URL。

protected abstract String getServerUri(boolean secure)

获取服务器用于正确路由请求的动态 URI。

void headerResponse()

测试具有“Content-Type”标头的响应使用指定的字符集进行编码。

void invalidHeaderResponse()

使用 UTF-8 测试包含无效或不受支持的字符集的“Content-Type”的响应是否编码。

protected boolean isSecure()

获取一个标志,指示是否应保护通信 (https 或 http) 。

void plainResponse()

测试没有字节顺序标记或“Content-Type”标头的响应是否使用 UTF-8 进行编码。

void postUrlForm()
void postUrlFormEncoded()
void rawFluxDownloadTest()
void requestOptionsAddAHeader()
void requestOptionsChangesBody()
void requestOptionsChangesBodyAndContentLength()
void requestOptionsSetsAHeader()
void segmentUploadTest()
void service16Put()
void service16PutAsync()
void service18GetStatus200()
void service18GetStatus200WithExpectedResponse200()
void service18GetStatus300()
void service18GetStatus300WithExpectedResponse300()
void service18GetStatus400()
void service18GetStatus400WithExpectedResponse400()
void service18GetStatus500()
void service18GetStatus500WithExpectedResponse500()
void service19PutWithBodyParamApplicationJsonContentTypeAndByteArrayBodyWithEmptyBody()
void service19PutWithBodyParamApplicationJsonContentTypeAndByteArrayBodyWithNonEmptyBody()
void service19PutWithBodyParamApplicationJsonContentTypeAndByteArrayBodyWithNullBody()
void service19PutWithBodyParamApplicationJsonContentTypeAndCharsetAndStringBodyWithEmptyBody()
void service19PutWithBodyParamApplicationJsonContentTypeAndCharsetAndStringBodyWithNonEmptyBody()
void service19PutWithBodyParamApplicationJsonContentTypeAndCharsetAndStringBodyWithNullBody()
void service19PutWithBodyParamApplicationJsonContentTypeAndStringBodyWithEmptyBody()
void service19PutWithBodyParamApplicationJsonContentTypeAndStringBodyWithNonEmptyBody()
void service19PutWithBodyParamApplicationJsonContentTypeAndStringBodyWithNullBody()
void service19PutWithBodyParamApplicationOctetStreamContentTypeAndByteArrayBodyWithEmptyBody()
void service19PutWithBodyParamApplicationOctetStreamContentTypeAndByteArrayBodyWithNonEmptyBody()
void service19PutWithBodyParamApplicationOctetStreamContentTypeAndByteArrayBodyWithNullBody()
void service19PutWithBodyParamApplicationOctetStreamContentTypeAndStringBodyWithEmptyBody()
void service19PutWithBodyParamApplicationOctetStreamContentTypeAndStringBodyWithNonEmptyBody()
void service19PutWithBodyParamApplicationOctetStreamContentTypeAndStringBodyWithNullBody()
void service19PutWithHeaderApplicationJsonContentTypeAndByteArrayBodyWithEmptyBody()
void service19PutWithHeaderApplicationJsonContentTypeAndByteArrayBodyWithNonEmptyBody()
void service19PutWithHeaderApplicationJsonContentTypeAndByteArrayBodyWithNullBody()
void service19PutWithHeaderApplicationJsonContentTypeAndCharsetAndStringBodyWithEmptyBody()
void service19PutWithHeaderApplicationJsonContentTypeAndCharsetAndStringBodyWithNonEmptyBody()
void service19PutWithHeaderApplicationJsonContentTypeAndCharsetAndStringBodyWithNullBody()
void service19PutWithHeaderApplicationJsonContentTypeAndStringBodyWithEmptyBody()
void service19PutWithHeaderApplicationJsonContentTypeAndStringBodyWithNonEmptyBody()
void service19PutWithHeaderApplicationJsonContentTypeAndStringBodyWithNullBody()
void service19PutWithHeaderApplicationOctetStreamContentTypeAndByteArrayBodyWithEmptyBody()
void service19PutWithHeaderApplicationOctetStreamContentTypeAndByteArrayBodyWithNonEmptyBody()
void service19PutWithHeaderApplicationOctetStreamContentTypeAndByteArrayBodyWithNullBody()
void service19PutWithHeaderApplicationOctetStreamContentTypeAndStringBodyWithEmptyBody()
void service19PutWithHeaderApplicationOctetStreamContentTypeAndStringBodyWithNonEmptyBody()
void service19PutWithHeaderApplicationOctetStreamContentTypeAndStringBodyWithNullBody()
void service19PutWithNoContentTypeAndByteArrayBodyWithEmptyBody()
void service19PutWithNoContentTypeAndByteArrayBodyWithNonEmptyBody()
void service19PutWithNoContentTypeAndByteArrayBodyWithNullBody()
void service19PutWithNoContentTypeAndStringBodyWithEmptyBody()
void service19PutWithNoContentTypeAndStringBodyWithNonEmptyBody()
void service19PutWithNoContentTypeAndStringBodyWithNullBody()
void service20GetBytes100BodyAndHeaders()
void service20GetBytes100OnlyHeaders()
void service20GetBytesOnlyHeaders()
void service20GetBytesOnlyStatus()
void service20GetResponseBody()
void service20GetVoidResponse()
void service20PutBodyAndHeaders()
void service20PutOnlyHeaders()
void service21GetBytes100()
void service22GetBytes()
void service23GetBytes()
void service24Put()
void shouldBufferResponse()

测试客户端在通过 azure-eagerly-read-response 上下文标志请求时返回缓冲响应。

void simpleDownloadTest(Context context)
void simpleDownloadTestAsync(Context context)
void streamResponseCanTransferBody(Context context)
void streamResponseCanTransferBodyAsync(Context context)
void syncDeleteRequest()
void syncGetRequestWithAnything()
void syncGetRequestWithAnythingWithEncodedPathParam()
void syncGetRequestWithAnythingWithEncodedPathParamWithPercent20()
void syncGetRequestWithAnythingWithEncodedPathParamWithPlus()
void syncGetRequestWithAnythingWithPathParam()
void syncGetRequestWithAnythingWithPathParamWithPlus()
void syncGetRequestWithAnythingWithPathParamWithSpace()
void syncGetRequestWithAnythingWithPlus()
void syncGetRequestWithHeaderParametersAndAnythingReturn()
void syncGetRequestWithNoReturn()

测试是否正确处理了没有返回类型的响应。

void syncGetRequestWithNullHeader()
void syncGetRequestWithNullQueryParameter()
void syncGetRequestWithQueryParametersAndAnything()
void syncGetRequestWithQueryParametersAndAnythingWithEncodedWithPercent20()
void syncGetRequestWithQueryParametersAndAnythingWithPercent20()
void syncHeadBooleanRequest()
void syncHeadRequest()
void syncHeadersRequest()
void syncPatchRequest()
void syncPostRequestWithNullBody()
void syncPostRequestWithStringBody()
void syncPutRequestWithBodyAndEqualContentLength()
void syncPutRequestWithBodyLessThanContentLength()
void syncPutRequestWithBodyMoreThanContentLength()
void syncPutRequestWithIntBody()
void syncPutRequestWithUnexpectedResponse()
void syncPutRequestWithUnexpectedResponseAndDeterminedExceptionType()
void syncPutRequestWithUnexpectedResponseAndExceptionType()
void syncPutRequestWithUnexpectedResponseAndFallthroughExceptionType()
void syncPutRequestWithUnexpectedResponseAndNoFallthroughExceptionType()
void syncRequestWithByteArrayReturnType()

测试响应正文是否正确返回为字节数组。

void syncRequestWithByteArrayReturnTypeAndParameterizedHostAndPath()

测试响应正文是否正确返回为字节数组。

void syncRequestWithEmptyByteArrayReturnTypeAndParameterizedHostAndPath()

测试响应正文是否正确返回为字节数组。

void syncRequestWithMultipleHostParams()
void syncVoidHeadRequest()
void unexpectedHTTPOK()
void utf16BeBomResponse()

测试具有字节顺序标记的响应使用指定的字符集进行编码。

void utf16LeBomResponse()

测试具有字节顺序标记的响应使用指定的字符集进行编码。

void utf32BeBomResponse()

测试具有字节顺序标记的响应使用指定的字符集进行编码。

void utf32LeBomResponse()

测试具有字节顺序标记的响应使用指定的字符集进行编码。

void utf8BomResponse()

测试具有字节顺序标记的响应使用指定的字符集进行编码。

void voidDoesNotEagerlyReadResponse(BiConsumer<String,HttpClientTests.Service28> executable)
void voidErrorReturnsErrorBody(BiConsumer<String,HttpClientTests.Service29> executable)

方法继承自 java.lang.Object

字段详细信息

ECHO_RESPONSE

protected static final String ECHO_RESPONSE

构造函数详细信息

HttpClientTests

public HttpClientTests()

方法详细信息

createService

protected T createService(Class serviceClass)

Parameters:

serviceClass

createService

protected T createService(Class serviceClass, HttpClient httpClient)

Parameters:

serviceClass
httpClient

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

public void binaryDataUploadTest()

Throws:

bomWithDifferentHeader

public void bomWithDifferentHeader()

测试具有字节顺序标记和“Content-Type”标头的响应是否遵循使用 BOM 编码。

bomWithSameHeader

public void bomWithSameHeader()

测试具有字节顺序标记和“Content-Type”标头的响应是否遵循使用 BOM 编码。

bufferedResponseCanBeReadMultipleTimes

public void bufferedResponseCanBeReadMultipleTimes()

测试缓冲响应确实已缓冲,即内容可以多次访问。

Throws:

IOException

- IO 失败时。

canAccessResponseBody

public void canAccessResponseBody()

可访问未缓冲区响应正文的测试。

Throws:

IOException

- IO 失败时。

canSendBinaryData

public void canSendBinaryData(BinaryData requestBody, byte[] expectedResponseBody)

将各种形式的随机字节发送到终结点的测试,该终结点将字节回显给发送方。

Parameters:

requestBody - 包含随机字节的 BinaryData。
expectedResponseBody - 回显响应中预期的字节数。

canSendBinaryDataSync

public void canSendBinaryDataSync(BinaryData requestBody, byte[] expectedResponseBody)

将各种形式的随机字节发送到终结点的测试,该终结点将字节回显给发送方。

Parameters:

requestBody - 包含随机字节的 BinaryData。
expectedResponseBody - 回显响应中预期的字节数。

canSendBinaryDataWithProgressReporting

public void canSendBinaryDataWithProgressReporting(BinaryData requestBody, byte[] expectedResponseBody)

将各种形式的随机字节发送到终结点的测试,该终结点将字节回显给发送方。

Parameters:

requestBody - 包含随机字节的 BinaryData。
expectedResponseBody - 回显响应中预期的字节数。

canSendBinaryDataWithProgressReportingSync

public void canSendBinaryDataWithProgressReportingSync(BinaryData requestBody, byte[] expectedResponseBody)

将各种形式的随机字节发送到终结点的测试,该终结点将字节回显给发送方。

Parameters:

requestBody - 包含随机字节的 BinaryData。
expectedResponseBody - 回显响应中预期的字节数。

createHttpClient

protected abstract HttpClient createHttpClient()

获取将用于每个测试的 HTTP 客户端。 这将在每个测试中调用一次。

Returns:

用于每个测试的 HTTP 客户端。

downloadTestArgumentProvider

public static Stream downloadTestArgumentProvider()

eagerlyConvertedHeadersAreHttpHeaders

public void eagerlyConvertedHeadersAreHttpHeaders()

已完成将实现 HTTP 标头转换为 azure 核心 HttpHeaders 的测试。

fluxUploadTest

public void fluxUploadTest()

Throws:

getByteArrayAsyncWithNoExpectedResponses

public void getByteArrayAsyncWithNoExpectedResponses()

测试响应正文是否正确返回为字节数组。

getPort

@Deprecated
protected abstract int getPort()

已放弃

获取服务器用于正确路由请求的动态端口。

Returns:

HTTP 端口正在使用。

getRequestUrl

protected URL getRequestUrl(String requestPath)

获取给定路径的请求 URL。

Parameters:

requestPath - 路径。

Returns:

给定路径的请求 URL。

getServerUri

protected abstract String getServerUri(boolean secure)

获取服务器用于正确路由请求的动态 URI。

Parameters:

secure - 指示 URI 是否应用于安全连接的标志。

Returns:

服务器使用的 URI。

headerResponse

public void headerResponse()

测试具有“Content-Type”标头的响应使用指定的字符集进行编码。

invalidHeaderResponse

public void invalidHeaderResponse()

使用 UTF-8 测试包含无效或不受支持的字符集的“Content-Type”的响应是否编码。

isSecure

protected boolean isSecure()

获取一个标志,指示是否应保护通信 (https 或 http) 。

Returns:

一个标志,指示是否应保护通信 (https 或 http) 。

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

public void segmentUploadTest()

Throws:

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 上下文标志请求时返回缓冲响应。

simpleDownloadTest

public void simpleDownloadTest(Context context)

Parameters:

context

simpleDownloadTestAsync

public void simpleDownloadTestAsync(Context context)

Parameters:

context

streamResponseCanTransferBody

public void streamResponseCanTransferBody(Context context)

Parameters:

context

Throws:

streamResponseCanTransferBodyAsync

public void streamResponseCanTransferBodyAsync(Context context)

Parameters:

context

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 executable)

Parameters:

executable

voidErrorReturnsErrorBody

public void voidErrorReturnsErrorBody(BiConsumer executable)

Parameters:

executable

适用于