Skip navigation links
A B C D F G I M N P R S T V 

A

addHeader(String, String) - Method in class com.azure.core.test.http.MockHttpResponse
Adds the header name and value to the existing set of HTTP headers.
addNetworkCall(NetworkCallRecord) - Method in class com.azure.core.test.models.RecordedData
Adds a network call to the end of the list.
addTextReplacementRule(String, String) - Method in class com.azure.core.test.InterceptorManager
Add text replacement rule (regex as key, the replacement text as value) into InterceptorManager.textReplacementRules
addVariable(String) - Method in class com.azure.core.test.models.RecordedData
Adds a variable to the end of the list.
afterTest() - Method in class com.azure.core.test.TestBase
Dispose of any resources and clean-up after a test case runs.

B

beforeEach(ExtensionContext) - Method in class com.azure.core.test.TestBase
 
beforeTest() - Method in class com.azure.core.test.TestBase
Performs any set-up before each test case.

C

close() - Method in class com.azure.core.test.InterceptorManager
Disposes of resources used by this InterceptorManager.
com.azure.core.test - package com.azure.core.test
Package containing common test classes for Azure client libraries.
com.azure.core.test.annotation - package com.azure.core.test.annotation
Package containing annotations test classes for Azure client libraries.
com.azure.core.test.http - package com.azure.core.test.http
Package containing classes to test HTTP communications in Azure client libraries.
com.azure.core.test.models - package com.azure.core.test.models
Package containing models used to test Azure client libraries.
com.azure.core.test.policy - package com.azure.core.test.policy
Package containing HttpPipelinePolicies used to test Azure client libraries.
com.azure.core.test.utils - package com.azure.core.test.utils
Package containing utility classes used for testing Azure client libraries.

D

didTestRun() - Method in class com.azure.core.test.TestContextManager
Returns whether the current test was ran.
DoNotRecord - Annotation Type in com.azure.core.test.annotation
Annotation given to some tests to indicate that network calls made during the test shouldn't be recorded.
doNotRecordTest() - Method in class com.azure.core.test.TestContextManager
Returns whether the test should have its network calls recorded during a record test run.

F

findFirstAndRemoveNetworkCall(Predicate<NetworkCallRecord>) - Method in class com.azure.core.test.models.RecordedData
Finds the first matching NetworkCallRecord based on the predicate, removes it from the current network calls, and returns it.

G

get() - Method in class com.azure.core.test.models.NetworkCallError
 
getBody() - Method in class com.azure.core.test.http.MockHttpResponse
getBodyAsByteArray() - Method in class com.azure.core.test.http.MockHttpResponse
getBodyAsString() - Method in class com.azure.core.test.http.MockHttpResponse
getBodyAsString(Charset) - Method in class com.azure.core.test.http.MockHttpResponse
getException() - Method in class com.azure.core.test.models.NetworkCallRecord
Gets the throwable thrown during evaluation of the network call.
getHeaders() - Method in class com.azure.core.test.http.MockHttpResponse
getHeaders() - Method in class com.azure.core.test.models.NetworkCallRecord
Gets the HTTP headers for the network call.
getHeaderValue(String) - Method in class com.azure.core.test.http.MockHttpResponse
getMethod() - Method in class com.azure.core.test.models.NetworkCallRecord
Gets the HTTP method for with this network call
getPlaybackClient() - Method in class com.azure.core.test.InterceptorManager
Gets a new HTTP client that plays back test session records managed by InterceptorManager.
getRecordedData() - Method in class com.azure.core.test.InterceptorManager
Gets the recorded data InterceptorManager is keeping track of.
getRecordPolicy() - Method in class com.azure.core.test.InterceptorManager
Gets a new HTTP pipeline policy that records network calls and its data is managed by InterceptorManager.
getResponse() - Method in class com.azure.core.test.models.NetworkCallRecord
Gets the contents of the HTTP response as a map of its HTTP headers and response body.
getStatusCode() - Method in class com.azure.core.test.http.MockHttpResponse
getTestMode() - Method in class com.azure.core.test.TestBase
Gets the TestMode that has been initialized.
getTestMode() - Method in class com.azure.core.test.TestContextManager
Returns the mode being used to run tests.
getTestName() - Method in class com.azure.core.test.TestBase
Deprecated.
This method is deprecated as JUnit 5 provides a simpler mechanism to get the test method name through TestInfo. Keeping this for backward compatability of other client libraries that still override this method. This method can be deleted when all client libraries remove this method. See TestBase.setupTest(TestInfo).
getTestName() - Method in class com.azure.core.test.TestContextManager
Returns the name of the test being ran.
getUri() - Method in class com.azure.core.test.models.NetworkCallRecord
Gets the URL for this network call.
getValue() - Method in exception com.azure.core.test.MyAzureException
 
getValue() - Method in exception com.azure.core.test.MyRestException
 

I

InterceptorManager - Class in com.azure.core.test
A class that keeps track of network calls by either reading the data from an existing test session record or recording the network calls in memory.
InterceptorManager(String, TestMode) - Constructor for class com.azure.core.test.InterceptorManager
InterceptorManager(TestContextManager) - Constructor for class com.azure.core.test.InterceptorManager
Creates a new InterceptorManager that either replays test-session records or saves them.
InterceptorManager(String, Map<String, String>) - Constructor for class com.azure.core.test.InterceptorManager
InterceptorManager(String, Map<String, String>, boolean) - Constructor for class com.azure.core.test.InterceptorManager
Creates a new InterceptorManager that replays test session records.
interceptorManager - Variable in class com.azure.core.test.TestBase
 
isPlaybackMode() - Method in class com.azure.core.test.InterceptorManager
Gets whether this InterceptorManager is in playback mode.

M

MockHttpClient - Class in com.azure.core.test.http
This HttpClient attempts to mimic the behavior of http://httpbin.org without ever making a network call.
MockHttpClient() - Constructor for class com.azure.core.test.http.MockHttpClient
 
MockHttpResponse - Class in com.azure.core.test.http
An HTTP response that is created to simulate a HTTP request.
MockHttpResponse(HttpRequest, int) - Constructor for class com.azure.core.test.http.MockHttpResponse
Creates a HTTP response associated with a request, returns the statusCode, and has an empty response body.
MockHttpResponse(HttpRequest, int, byte[]) - Constructor for class com.azure.core.test.http.MockHttpResponse
Creates an HTTP response associated with a request, returns the statusCode, and response body of bodyBytes.
MockHttpResponse(HttpRequest, int, HttpHeaders) - Constructor for class com.azure.core.test.http.MockHttpResponse
Creates an HTTP response associated with a request, returns the statusCode, and http headers.
MockHttpResponse(HttpRequest, int, HttpHeaders, byte[]) - Constructor for class com.azure.core.test.http.MockHttpResponse
Creates an HTTP response associated with a request, returns the statusCode, contains the headers, and response body of bodyBytes.
MockHttpResponse(HttpRequest, int, HttpHeaders, Object) - Constructor for class com.azure.core.test.http.MockHttpResponse
Creates an HTTP response associated with a request, returns the statusCode, contains the given headers, and response body that is JSON serialized from serializable.
MockHttpResponse(HttpRequest, int, Object) - Constructor for class com.azure.core.test.http.MockHttpResponse
Creates an HTTP response associated with a request, returns the statusCode, and response body that is JSON serialized from serializable.
MyAzureException - Exception in com.azure.core.test
A test exception.
MyAzureException(String, HttpResponse, HttpBinJSON) - Constructor for exception com.azure.core.test.MyAzureException
Creates an exception with the message, response, and body.
MyRestException - Exception in com.azure.core.test
A test exception.
MyRestException(String, HttpResponse, HttpBinJSON) - Constructor for exception com.azure.core.test.MyRestException
Creates a service request exception.

N

NetworkCallError - Class in com.azure.core.test.models
This class represents a caught throwable during a network call.
NetworkCallError() - Constructor for class com.azure.core.test.models.NetworkCallError
Empty constructor used by deserialization.
NetworkCallError(Throwable) - Constructor for class com.azure.core.test.models.NetworkCallError
Constructs the class setting the throwable and its class name.
NetworkCallRecord - Class in com.azure.core.test.models
Keeps track of network call records from each unit test session.
NetworkCallRecord() - Constructor for class com.azure.core.test.models.NetworkCallRecord
 
NoOpHttpClient - Class in com.azure.core.test.http
An HttpClient instance that does not do anything.
NoOpHttpClient() - Constructor for class com.azure.core.test.http.NoOpHttpClient
 
now() - Method in class com.azure.core.test.utils.TestResourceNamer
Gets an OffsetDateTime of UTC now.

P

PlaybackClient - Class in com.azure.core.test.http
HTTP client that plays back NetworkCallRecords.
PlaybackClient(RecordedData, Map<String, String>) - Constructor for class com.azure.core.test.http.PlaybackClient
Creates a PlaybackClient that replays network calls from recordedData and replaces response text for any rules specified in textReplacementRules.
process(HttpPipelineCallContext, HttpPipelineNextPolicy) - Method in class com.azure.core.test.policy.RecordNetworkCallPolicy
 

R

randomName(String, int) - Method in class com.azure.core.test.utils.ResourceNamer
Gets a random name.
randomName(String, int) - Method in class com.azure.core.test.utils.TestResourceNamer
Gets a random name.
randomUuid() - Method in class com.azure.core.test.utils.ResourceNamer
Creates a random UUID.
randomUuid() - Method in class com.azure.core.test.utils.TestResourceNamer
Gets a random UUID.
RecordedData - Class in com.azure.core.test.models
Keeps track of the network calls and variable names that were made in a test session.
RecordedData() - Constructor for class com.azure.core.test.models.RecordedData
Creates a new instance of RecordedData to manage network calls and variables in a test session.
RecordNetworkCallPolicy - Class in com.azure.core.test.policy
HTTP Pipeline policy that keeps track of each HTTP request and response that flows through the pipeline.
RecordNetworkCallPolicy(RecordedData) - Constructor for class com.azure.core.test.policy.RecordNetworkCallPolicy
Creates a policy that records network calls into recordedData.
recordValueFromConfig(String) - Method in class com.azure.core.test.utils.TestResourceNamer
Record the value into recordedData, and pop it up when playback.
removeVariable() - Method in class com.azure.core.test.models.RecordedData
Removes the first variable from the list and returns it.
ResourceNamer - Class in com.azure.core.test.utils
A random string generator used in tests.
ResourceNamer(String) - Constructor for class com.azure.core.test.utils.ResourceNamer
Creates a ResourceNameGenerator that prefixes its strings with the name.

S

send(HttpRequest) - Method in class com.azure.core.test.http.MockHttpClient
 
send(HttpRequest) - Method in class com.azure.core.test.http.NoOpHttpClient
 
send(HttpRequest) - Method in class com.azure.core.test.http.PlaybackClient
setClassName(String) - Method in class com.azure.core.test.models.NetworkCallError
Sets the name of the class of the throwable.
setErrorMessage(String) - Method in class com.azure.core.test.models.NetworkCallError
Sets the error message of the class of the throwable.
setException(NetworkCallError) - Method in class com.azure.core.test.models.NetworkCallRecord
Sets the throwable thrown during evaluation of the network call.
setHeaders(Map<String, String>) - Method in class com.azure.core.test.models.NetworkCallRecord
Sets the HTTP headers for the network call.
setMethod(String) - Method in class com.azure.core.test.models.NetworkCallRecord
Sets the HTTP method for with this network call
setResponse(Map<String, String>) - Method in class com.azure.core.test.models.NetworkCallRecord
Sets the contents of the HTTP response as a map of its HTTP headers and response body.
setThrowable(Throwable) - Method in class com.azure.core.test.models.NetworkCallError
Sets the throwable that was thrown during a network call.
setupClass() - Static method in class com.azure.core.test.TestBase
Before tests are executed, determines the test mode by reading the TestBase.AZURE_TEST_MODE environment variable.
setupTest(TestInfo) - Method in class com.azure.core.test.TestBase
Sets-up the TestBase.testResourceNamer and TestBase.interceptorManager before each test case is run.
setUri(String) - Method in class com.azure.core.test.models.NetworkCallRecord
Sets the URL for this network call.
sleepIfRunningAgainstService(long) - Method in class com.azure.core.test.TestBase
Sleeps the test for the given amount of milliseconds if TestMode isn't TestMode.PLAYBACK.

T

teardownTest(TestInfo) - Method in class com.azure.core.test.TestBase
Disposes of InterceptorManager and its inheriting class' resources.
TestBase - Class in com.azure.core.test
Base class for running live and playback tests using InterceptorManager.
TestBase() - Constructor for class com.azure.core.test.TestBase
 
testContextManager - Variable in class com.azure.core.test.TestBase
 
TestContextManager - Class in com.azure.core.test
This class handles managing context about a test, such as custom testing annotations and verifying whether the test is capable of running.
TestContextManager(Method, TestMode) - Constructor for class com.azure.core.test.TestContextManager
Constructs a TestContextManager based on the test method.
TestMode - Enum in com.azure.core.test
The possible testing modes.
testResourceNamer - Variable in class com.azure.core.test.TestBase
 
TestResourceNamer - Class in com.azure.core.test.utils
Provides random string names.
TestResourceNamer(String, TestMode, RecordedData) - Constructor for class com.azure.core.test.utils.TestResourceNamer
TestResourceNamer(TestContextManager, RecordedData) - Constructor for class com.azure.core.test.utils.TestResourceNamer
Constructor of TestResourceNamer

V

valueOf(String) - Static method in enum com.azure.core.test.TestMode
Returns the enum constant of this type with the specified name.
values() - Static method in enum com.azure.core.test.TestMode
Returns an array containing the constants of this enum type, in the order they are declared.
A B C D F G I M N P R S T V 
Skip navigation links
Visit the Azure for Java Developerssite for more Java documentation, including quick starts, tutorials, and code samples.

Copyright © 2020 Microsoft Corporation. All rights reserved.