Modifier and Type | Field and Description |
---|---|
static int |
ALWAYS_THROW_EXCEPTIONS |
Request<?> |
requestHandled |
Constructor and Description |
---|
MockNetwork() |
Modifier and Type | Method and Description |
---|---|
NetworkResponse |
performRequest(Request<?> request)
Performs the specified request.
|
void |
setDataToReturn(byte[] data) |
void |
setNumExceptionsToThrow(int numExceptionsToThrow) |
public static final int ALWAYS_THROW_EXCEPTIONS
public Request<?> requestHandled
public void setNumExceptionsToThrow(int numExceptionsToThrow)
numExceptionsToThrow
- number of times to throw an exception or
ALWAYS_THROW_EXCEPTIONS
public void setDataToReturn(byte[] data)
public NetworkResponse performRequest(Request<?> request) throws VolleyError
Network
performRequest
in interface Network
request
- Request to processNetworkResponse
with data and caching metadata; will never be nullVolleyError
- on errors