A B C F G H I M N P R S T U V W
All Classes All Packages
All Classes All Packages
All Classes All Packages
A
- addHeader(String, String) - Method in class com.azure.common.test.http.MockHttpResponse
-
Adds the header
nameandvalueto the existing set of HTTP headers. - addNetworkCall(NetworkCallRecord) - Method in class com.azure.common.test.models.RecordedData
-
Adds a network call to the end of the list.
- addVariable(String) - Method in class com.azure.common.test.models.RecordedData
-
Adds a variable to the end of the list.
- afterTest() - Method in class com.azure.common.test.TestBase
-
Dispose of any resources and clean-up after a test case runs.
B
- beforeTest() - Method in class com.azure.common.test.TestBase
-
Performs any set-up before each test case.
- body() - Method in class com.azure.common.test.http.MockHttpResponse
- bodyAsByteArray() - Method in class com.azure.common.test.http.MockHttpResponse
- bodyAsString() - Method in class com.azure.common.test.http.MockHttpResponse
- bodyAsString(Charset) - Method in class com.azure.common.test.http.MockHttpResponse
C
- close() - Method in class com.azure.common.test.InterceptorManager
-
Disposes of resources used by this InterceptorManager.
- com.azure.common.test - package com.azure.common.test
-
Package contains common test classes for Azure client libraries.
- com.azure.common.test.http - package com.azure.common.test.http
-
Package contains classes to test HTTP communications in Azure client libraries.
- com.azure.common.test.models - package com.azure.common.test.models
-
Package contains models used to test Azure client libraries.
- com.azure.common.test.policy - package com.azure.common.test.policy
-
Package contains
HttpPipelinePoliciesused to test Azure client libraries. - com.azure.common.test.utils - package com.azure.common.test.utils
-
Package contains utility classes used for testing Azure client libraries.
F
- findFirstAndRemoveNetworkCall(Predicate<NetworkCallRecord>) - Method in class com.azure.common.test.models.RecordedData
-
Finds the first matching
NetworkCallRecordbased on the predicate, removes it from the current network calls, and returns it.
G
- getPlaybackClient() - Method in class com.azure.common.test.InterceptorManager
-
Gets a new HTTP client that plays back test session records managed by
InterceptorManager. - getRecordedData() - Method in class com.azure.common.test.InterceptorManager
-
Gets the recorded data InterceptorManager is keeping track of.
- getRecordPolicy() - Method in class com.azure.common.test.InterceptorManager
-
Gets a new HTTP pipeline policy that records network calls and its data is managed by
InterceptorManager.
H
- headers() - Method in class com.azure.common.test.http.MockHttpResponse
- headers() - Method in class com.azure.common.test.models.NetworkCallRecord
-
Gets the HTTP headers for the network call.
- headers(Map<String, String>) - Method in class com.azure.common.test.models.NetworkCallRecord
-
Sets the HTTP headers for the network call.
- headerValue(String) - Method in class com.azure.common.test.http.MockHttpResponse
I
- interceptorManager - Variable in class com.azure.common.test.TestBase
- InterceptorManager - Class in com.azure.common.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.common.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.common.test.InterceptorManager
-
Creates a new InterceptorManager that replays test session records.
- isPlaybackMode() - Method in class com.azure.common.test.InterceptorManager
-
Gets whether this InterceptorManager is in playback mode.
M
- method() - Method in class com.azure.common.test.models.NetworkCallRecord
-
Gets the HTTP method for with this network call
- method(String) - Method in class com.azure.common.test.models.NetworkCallRecord
-
Sets the HTTP method for with this network call
- MockHttpResponse - Class in com.azure.common.test.http
-
An HTTP response that is created to simulate a HTTP request.
- MockHttpResponse(HttpRequest, int) - Constructor for class com.azure.common.test.http.MockHttpResponse
-
Creates a HTTP response associated with a
request, returns thestatusCode, and has an empty response body. - MockHttpResponse(HttpRequest, int, byte[]) - Constructor for class com.azure.common.test.http.MockHttpResponse
-
Creates an HTTP response associated with a
request, returns thestatusCode, and response body ofbodyBytes. - MockHttpResponse(HttpRequest, int, HttpHeaders, byte[]) - Constructor for class com.azure.common.test.http.MockHttpResponse
-
Creates an HTTP response associated with a
request, returns thestatusCode, contains theheaders, and response body ofbodyBytes. - MockHttpResponse(HttpRequest, int, HttpHeaders, Object) - Constructor for class com.azure.common.test.http.MockHttpResponse
-
Creates an HTTP response associated with a
request, returns thestatusCode, contains the givenheaders, and response body that is JSON serialized fromserializable.
N
- NetworkCallRecord - Class in com.azure.common.test.models
-
Keeps track of network call records from each unit test session.
- NetworkCallRecord() - Constructor for class com.azure.common.test.models.NetworkCallRecord
P
- PLAYBACK - com.azure.common.test.TestMode
-
Playback data from an existing test session.
- PlaybackClient - Class in com.azure.common.test.http
-
HTTP client that plays back
NetworkCallRecords. - PlaybackClient(RecordedData, Map<String, String>) - Constructor for class com.azure.common.test.http.PlaybackClient
-
Creates a PlaybackClient that replays network calls from
recordedDataand replacesresponse textfor any rules specified intextReplacementRules. - port(int) - Method in class com.azure.common.test.http.PlaybackClient
- process(HttpPipelineCallContext, HttpPipelineNextPolicy) - Method in class com.azure.common.test.policy.RecordNetworkCallPolicy
- proxy(Supplier<ProxyOptions>) - Method in class com.azure.common.test.http.PlaybackClient
R
- randomName(String, int) - Method in class com.azure.common.test.utils.ResourceNamer
-
Gets a random name.
- randomResourceName(String, int) - Method in class com.azure.common.test.utils.SdkContext
-
Gets a random name.
- randomResourceNames(String, int, int) - Method in class com.azure.common.test.utils.SdkContext
-
Generates the specified number of random resource names with the same prefix.
- randomUuid() - Method in class com.azure.common.test.utils.ResourceNamer
-
Creates a random UUID.
- RECORD - com.azure.common.test.TestMode
-
Record data from a live test.
- RecordedData - Class in com.azure.common.test.models
-
Keeps track of the network calls and variable names that were made in a test session.
- RecordedData() - Constructor for class com.azure.common.test.models.RecordedData
-
Creates a new instance of RecordedData to manage network calls and variables in a test session.
- RecordNetworkCallPolicy - Class in com.azure.common.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.common.test.policy.RecordNetworkCallPolicy
-
Creates a policy that records network calls into
recordedData. - removeVariable() - Method in class com.azure.common.test.models.RecordedData
-
Removes the first variable from the list and returns it.
- ResourceNamer - Class in com.azure.common.test.utils
-
A random string generator used in tests.
- ResourceNamer(String) - Constructor for class com.azure.common.test.utils.ResourceNamer
-
Creates a ResourceNameGenerator that prefixes its strings with the name.
- response() - Method in class com.azure.common.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.common.test.models.NetworkCallRecord
-
Sets the contents of the HTTP response as a map of its HTTP headers and response body.
S
- sdkContext - Variable in class com.azure.common.test.TestBase
- SdkContext - Class in com.azure.common.test.utils
-
The class to contain the common test methods for testing SDK.
- SdkContext(TestMode, RecordedData) - Constructor for class com.azure.common.test.utils.SdkContext
-
Creates an SDK context that keeps track of variable names for the recorded data.
- send(HttpRequest) - Method in class com.azure.common.test.http.PlaybackClient
- setupClass() - Static method in class com.azure.common.test.TestBase
-
Before tests are executed, determines the test mode by reading the
TestBase.AZURE_TEST_MODEenvironment variable. - setupTest() - Method in class com.azure.common.test.TestBase
-
Sets-up the
TestBase.sdkContextandTestBase.interceptorManagerbefore each test case is run. - statusCode() - Method in class com.azure.common.test.http.MockHttpResponse
T
- teardownTest() - Method in class com.azure.common.test.TestBase
-
Disposes of
InterceptorManagerand its inheriting class' resources. - TestBase - Class in com.azure.common.test
-
Base class for running live and playback tests using
InterceptorManager. - TestBase() - Constructor for class com.azure.common.test.TestBase
- TestMode - Enum in com.azure.common.test
-
The possible testing modes.
- testName() - Method in class com.azure.common.test.TestBase
-
Gets the name of the current test being run.
U
- uri() - Method in class com.azure.common.test.models.NetworkCallRecord
-
Gets the URL for this network call.
- uri(String) - Method in class com.azure.common.test.models.NetworkCallRecord
-
Sets the URL for this network call.
V
- valueOf(String) - Static method in enum com.azure.common.test.TestMode
-
Returns the enum constant of this type with the specified name.
- values() - Static method in enum com.azure.common.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.common.test.http.PlaybackClient
All Classes All Packages