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

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

beforeTest() - Method in class com.azure.core.test.TestBase
Performs any set-up before each test case.
body() - Method in class com.azure.core.test.http.MockHttpResponse
bodyAsByteArray() - Method in class com.azure.core.test.http.MockHttpResponse
bodyAsString() - Method in class com.azure.core.test.http.MockHttpResponse
bodyAsString(Charset) - Method in class com.azure.core.test.http.MockHttpResponse

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.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.

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

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.
getTestMode() - Method in class com.azure.core.test.TestBase
Gets the TestMode that has been initialized.

H

headers() - Method in class com.azure.core.test.http.MockHttpResponse
headers() - Method in class com.azure.core.test.models.NetworkCallRecord
Gets the HTTP headers for the network call.
headers(Map<String, String>) - Method in class com.azure.core.test.models.NetworkCallRecord
Sets the HTTP headers for the network call.
headerValue(String) - Method in class com.azure.core.test.http.MockHttpResponse

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

method() - Method in class com.azure.core.test.models.NetworkCallRecord
Gets the HTTP method for with this network call
method(String) - Method in class com.azure.core.test.models.NetworkCallRecord
Sets the HTTP method for with this network call
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, 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.

N

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
 

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.
port(int) - Method in class com.azure.core.test.http.PlaybackClient
process(HttpPipelineCallContext, HttpPipelineNextPolicy) - Method in class com.azure.core.test.policy.RecordNetworkCallPolicy
 
proxy(Supplier<ProxyOptions>) - Method in class com.azure.core.test.http.PlaybackClient

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.
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.
response() - 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.
response(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.

S

send(HttpRequest) - Method in class com.azure.core.test.http.PlaybackClient
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() - Method in class com.azure.core.test.TestBase
Sets-up the TestBase.testResourceNamer and TestBase.interceptorManager before each test case is run.
statusCode() - Method in class com.azure.core.test.http.MockHttpResponse

T

teardownTest() - 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
 
TestMode - Enum in com.azure.core.test
The possible testing modes.
testName() - Method in class com.azure.core.test.TestBase
Gets the name of the current test being run.
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
Constructor of TestResourceNamer

U

uri() - Method in class com.azure.core.test.models.NetworkCallRecord
Gets the URL for this network call.
uri(String) - Method in class com.azure.core.test.models.NetworkCallRecord
Sets the URL for this network call.

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.

W

wiretap(boolean) - Method in class com.azure.core.test.http.PlaybackClient
A B C F G H I M N P R S T U V W 
Skip navigation links
Visit the Azure for Java Developerssite for more Java documentation, including quick starts, tutorials, and code samples.

Copyright © 2019 Microsoft Corporation. All rights reserved.