com.atlassian.sal.testresources.net
Class MockResponse
java.lang.Object
com.atlassian.sal.testresources.net.MockResponse
- All Implemented Interfaces:
- Response
public class MockResponse
- extends Object
- implements Response
Mock response that provides setters for all properties
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MockResponse
public MockResponse()
getHeader
public String getHeader(String name)
- Specified by:
getHeader in interface Response
getStatusCode
public int getStatusCode()
- Specified by:
getStatusCode in interface Response
setStatusCode
public void setStatusCode(int statusCode)
getResponseBodyAsString
public String getResponseBodyAsString()
- Specified by:
getResponseBodyAsString in interface Response
setResponseBodyAsString
public void setResponseBodyAsString(String responseBodyAsString)
getResponseBodyAsStream
public InputStream getResponseBodyAsStream()
- Specified by:
getResponseBodyAsStream in interface Response
setResponseBodyAsStream
public void setResponseBodyAsStream(InputStream responseBodyAsStream)
getEntity
public <T> T getEntity(Class<T> entityClass)
throws ResponseException
- Specified by:
getEntity in interface Response
- Throws:
ResponseException
getStatusText
public String getStatusText()
- Specified by:
getStatusText in interface Response
setStatusText
public void setStatusText(String statusText)
isSuccessful
public boolean isSuccessful()
- Specified by:
isSuccessful in interface Response
setSuccessful
public void setSuccessful(boolean successful)
getHeaders
public Map<String,String> getHeaders()
- Specified by:
getHeaders in interface Response
setHeaders
public void setHeaders(Map<String,String> headers)
Copyright © 2011 Atlassian. All Rights Reserved.