TestProxyPlaybackClient Class
- java.
lang. Object - com.
azure. core. test. http. TestProxyPlaybackClient
- com.
Implements
public class TestProxyPlaybackClient
implements HttpClient
A HttpClient that plays back test recordings from the external test proxy.
Constructor Summary
Constructor | Description |
---|---|
TestProxyPlaybackClient(HttpClient httpClient, boolean skipRecordingRequestBody) |
Create an instance of TestProxyPlaybackClient with a list of custom sanitizers. |
Method Summary
Modifier and Type | Method and Description |
---|---|
void |
addMatcherRequests(List<TestProxyRequestMatcher> matchers)
Add a list of TestProxyRequestMatcher to the current playback session. |
void |
addProxySanitization(List<TestProxySanitizer> sanitizers)
Add a list of TestProxySanitizer to the current playback session. |
String |
getRecordingFileLocation()
Get the recording file location in assets repo. |
void |
removeProxySanitization(List<String> sanitizers)
Removes the list of sanitizers from the current playback session. |
Mono<Http |
send(HttpRequest request)
Redirects the request to the test-proxy to retrieve the playback response. |
Http |
sendSync(HttpRequest request, Context context)
Redirects the request to the test-proxy to retrieve the playback response synchronously. |
Queue<String> |
startPlayback(File recordFile, Path testClassPath)
Starts playback of a test recording. |
void |
stopPlayback()
Stops playback of a test recording. |
Methods inherited from java.lang.Object
Constructor Details
TestProxyPlaybackClient
public TestProxyPlaybackClient(HttpClient httpClient, boolean skipRecordingRequestBody)
Create an instance of TestProxyPlaybackClient with a list of custom sanitizers.
Parameters:
Method Details
addMatcherRequests
public void addMatcherRequests(List
Add a list of TestProxyRequestMatcher to the current playback session.
Parameters:
addProxySanitization
public void addProxySanitization(List
Add a list of TestProxySanitizer to the current playback session.
Parameters:
getRecordingFileLocation
public String getRecordingFileLocation()
Get the recording file location in assets repo.
Returns:
removeProxySanitization
public void removeProxySanitization(List
Removes the list of sanitizers from the current playback session.
Parameters:
send
public Mono
Redirects the request to the test-proxy to retrieve the playback response.
Parameters:
Returns:
sendSync
public HttpResponse sendSync(HttpRequest request, Context context)
Redirects the request to the test-proxy to retrieve the playback response synchronously.
Parameters:
Returns:
startPlayback
public Queue
Starts playback of a test recording.
Parameters:
Returns:
stopPlayback
public void stopPlayback()
Stops playback of a test recording.