Class NetworkCallRecord
- java.lang.Object
-
- com.azure.android.core.test.models.NetworkCallRecord
-
public class NetworkCallRecord extends java.lang.Object
Keeps track of network call records from each unit test session.
-
-
Constructor Summary
Constructors Constructor Description NetworkCallRecord()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description NetworkCallError
getException()
Gets the throwable thrown during evaluation of the network call.java.util.Map<java.lang.String,java.lang.String>
getHeaders()
Gets the HTTP headers for the network call.java.lang.String
getMethod()
Gets the HTTP method for with this network calljava.util.Map<java.lang.String,java.lang.String>
getResponse()
Gets the contents of the HTTP response as a map of its HTTP headers and response body.java.lang.String
getUri()
Gets the URL for this network call.void
setException(NetworkCallError exception)
Sets the throwable thrown during evaluation of the network call.void
setHeaders(java.util.Map<java.lang.String,java.lang.String> headers)
Sets the HTTP headers for the network call.void
setMethod(java.lang.String method)
Sets the HTTP method for with this network callvoid
setResponse(java.util.Map<java.lang.String,java.lang.String> response)
Sets the contents of the HTTP response as a map of its HTTP headers and response body.void
setUri(java.lang.String uri)
Sets the URL for this network call.
-
-
-
Method Detail
-
getMethod
public java.lang.String getMethod()
Gets the HTTP method for with this network call- Returns:
- The HTTP method.
-
setMethod
public void setMethod(java.lang.String method)
Sets the HTTP method for with this network call- Parameters:
method
- HTTP method for this network call.
-
getUri
public java.lang.String getUri()
Gets the URL for this network call.- Returns:
- The URL for this network call.
-
setUri
public void setUri(java.lang.String uri)
Sets the URL for this network call.- Parameters:
uri
- The URL for this network call.
-
getHeaders
public java.util.Map<java.lang.String,java.lang.String> getHeaders()
Gets the HTTP headers for the network call.- Returns:
- The HTTP headers for the network call.
-
setHeaders
public void setHeaders(java.util.Map<java.lang.String,java.lang.String> headers)
Sets the HTTP headers for the network call.- Parameters:
headers
- The HTTP headers for the network call.
-
getResponse
public java.util.Map<java.lang.String,java.lang.String> getResponse()
Gets the contents of the HTTP response as a map of its HTTP headers and response body. The HTTP response body is mapped under key "Body".- Returns:
- Contents of the HTTP response.
-
setResponse
public void setResponse(java.util.Map<java.lang.String,java.lang.String> response)
Sets the contents of the HTTP response as a map of its HTTP headers and response body. The HTTP response body is mapped under key "body".- Parameters:
response
- Contents of the HTTP response.
-
getException
public NetworkCallError getException()
Gets the throwable thrown during evaluation of the network call.- Returns:
- Throwable thrown during the network call.
-
setException
public void setException(NetworkCallError exception)
Sets the throwable thrown during evaluation of the network call.- Parameters:
exception
- Throwable thrown during the network call.
-
-