RecordedData Class
- java.
lang. Object - com.
azure. core. test. models. RecordedData
- com.
public class RecordedData
Keeps track of the network calls and variable names that were made in a test session.
Constructor Summary
Constructor | Description |
---|---|
RecordedData() |
Creates a new instance of Recorded |
Method Summary
Modifier and Type | Method and Description |
---|---|
void |
addNetworkCall(NetworkCallRecord record)
Adds a network call to the end of the list. |
void |
addVariable(String variable)
Adds a variable to the end of the list. |
Network |
findFirstAndRemoveNetworkCall(Predicate<NetworkCallRecord> isMatch)
Finds the first matching NetworkCallRecord based on the predicate, removes it from the current network calls, and returns it. |
String |
removeVariable()
Removes the first variable from the list and returns it. |
Methods inherited from java.lang.Object
Constructor Details
RecordedData
public RecordedData()
Creates a new instance of RecordedData to manage network calls and variables in a test session.
Method Details
addNetworkCall
public void addNetworkCall(NetworkCallRecord record)
Adds a network call to the end of the list.
Parameters:
addVariable
public void addVariable(String variable)
Adds a variable to the end of the list.
Parameters:
findFirstAndRemoveNetworkCall
public NetworkCallRecord findFirstAndRemoveNetworkCall(Predicate
Finds the first matching NetworkCallRecord based on the predicate, removes it from the current network calls, and returns it. null
is returned if network call could not be matched.
Parameters:
Returns:
isMatch
, otherwise null
if no network
call could be matched.removeVariable
public String removeVariable()
Removes the first variable from the list and returns it.
Returns:
Applies to
Azure SDK for Java