AssertingHttpClientBuilder Class
- java.
lang. Object - com.
azure. core. test. http. AssertingHttpClientBuilder
- com.
public class AssertingHttpClientBuilder
HTTP client builder that helps in running sync and async assertion checks.
Constructor Summary
Constructor | Description |
---|---|
AssertingHttpClientBuilder(HttpClient delegate) |
Create an instance of AssertingHttpClientBuilder with the provided Http |
Method Summary
Modifier and Type | Method and Description |
---|---|
Asserting |
assertAsync()
Asserts that only async implementations are invoked from within the implementation call stack. |
Asserting |
assertSync()
Asserts that only sync implementations are invoked from within the implementation call stack. |
Http |
build()
Creates a new HttpClient instance that helps in providing assertions for invoking http client implementations. |
Asserting |
skipRequest(BiFunction<HttpRequest,Context,Boolean> skipRequestFunction)
Method used to specify http requests to be skipped when executing assertions. |
Methods inherited from java.lang.Object
Constructor Details
AssertingHttpClientBuilder
public AssertingHttpClientBuilder(HttpClient delegate)
Create an instance of AssertingHttpClientBuilder with the provided HttpClient.
Parameters:
Method Details
assertAsync
public AssertingHttpClientBuilder assertAsync()
Asserts that only async implementations are invoked from within the implementation call stack. Cause tests to fail if sync HttpClient#sendSync(HttpRequest, Context) is invoked.
Returns:
assertSync
public AssertingHttpClientBuilder assertSync()
Asserts that only sync implementations are invoked from within the implementation call stack. Cause tests to fail if async or HttpClient#send(HttpRequest, Context) invoked.
Returns:
build
public HttpClient build()
Creates a new HttpClient instance that helps in providing assertions for invoking http client implementations.
Returns:
skipRequest
public AssertingHttpClientBuilder skipRequest(BiFunction
Method used to specify http requests to be skipped when executing assertions.
Parameters:
Returns: