Package net.serenitybdd.rest.stubs
Class ResponseStub
java.lang.Object
net.serenitybdd.rest.stubs.ResponseStub
- All Implemented Interfaces:
io.restassured.response.Response,io.restassured.response.ResponseBody<io.restassured.response.Response>,io.restassured.response.ResponseBodyData,io.restassured.response.ResponseBodyExtractionOptions,io.restassured.response.ResponseOptions<io.restassured.response.Response>,io.restassured.response.Validatable<io.restassured.response.ValidatableResponse,io.restassured.response.Response>
public class ResponseStub
extends java.lang.Object
implements io.restassured.response.Response
Created by john on 23/07/2015.
-
Constructor Summary
Constructors Constructor Description ResponseStub() -
Method Summary
Modifier and Type Method Description io.restassured.response.ResponseandReturn()<T> Tas(io.restassured.common.mapper.TypeRef<T> typeRef)<T> Tas(java.lang.Class<T> cls)<T> Tas(java.lang.Class<T> cls, io.restassured.mapper.ObjectMapper mapper)<T> Tas(java.lang.Class<T> cls, io.restassured.mapper.ObjectMapperType mapperType)<T> Tas(java.lang.reflect.Type cls)<T> Tas(java.lang.reflect.Type cls, io.restassured.mapper.ObjectMapper mapper)<T> Tas(java.lang.reflect.Type cls, io.restassured.mapper.ObjectMapperType mapperType)byte[]asByteArray()java.io.InputStreamasInputStream()java.lang.StringasPrettyString()java.lang.StringasString()io.restassured.response.ResponseBodybody()java.lang.StringcontentType()java.lang.Stringcookie(java.lang.String name)java.util.Map<java.lang.String,java.lang.String>cookies()io.restassured.http.CookiedetailedCookie(java.lang.String name)io.restassured.http.CookiesdetailedCookies()io.restassured.response.ResponseBodygetBody()java.lang.StringgetContentType()java.lang.StringgetCookie(java.lang.String name)java.util.Map<java.lang.String,java.lang.String>getCookies()io.restassured.http.CookiegetDetailedCookie(java.lang.String name)io.restassured.http.CookiesgetDetailedCookies()java.lang.StringgetHeader(java.lang.String name)io.restassured.http.HeadersgetHeaders()java.lang.StringgetSessionId()intgetStatusCode()java.lang.StringgetStatusLine()longgetTime()longgetTimeIn(java.util.concurrent.TimeUnit timeUnit)java.lang.Stringheader(java.lang.String name)io.restassured.http.Headersheaders()io.restassured.path.xml.XmlPathhtmlPath()io.restassured.path.json.JsonPathjsonPath()io.restassured.path.json.JsonPathjsonPath(io.restassured.path.json.config.JsonPathConfig config)<T> Tpath(java.lang.String path, java.lang.String... arguments)io.restassured.response.Responsepeek()io.restassured.response.ResponseprettyPeek()java.lang.StringprettyPrint()java.lang.Stringprint()java.lang.StringsessionId()intstatusCode()java.lang.StringstatusLine()io.restassured.response.ValidatableResponsethen()io.restassured.response.ResponsethenReturn()longtime()longtimeIn(java.util.concurrent.TimeUnit timeUnit)io.restassured.path.xml.XmlPathxmlPath()io.restassured.path.xml.XmlPathxmlPath(io.restassured.path.xml.config.XmlPathConfig config)io.restassured.path.xml.XmlPathxmlPath(io.restassured.path.xml.XmlPath.CompatibilityMode compatibilityMode)Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
ResponseStub
public ResponseStub()
-
-
Method Details
-
then
public io.restassured.response.ValidatableResponse then()- Specified by:
thenin interfaceio.restassured.response.Validatable<io.restassured.response.ValidatableResponse,io.restassured.response.Response>
-
print
public java.lang.String print()- Specified by:
printin interfaceio.restassured.response.ResponseBody<io.restassured.response.Response>
-
prettyPrint
public java.lang.String prettyPrint()- Specified by:
prettyPrintin interfaceio.restassured.response.ResponseBody<io.restassured.response.Response>
-
peek
public io.restassured.response.Response peek()- Specified by:
peekin interfaceio.restassured.response.ResponseBody<io.restassured.response.Response>
-
prettyPeek
public io.restassured.response.Response prettyPeek()- Specified by:
prettyPeekin interfaceio.restassured.response.ResponseBody<io.restassured.response.Response>
-
as
public <T> T as(java.lang.Class<T> cls)- Specified by:
asin interfaceio.restassured.response.ResponseBodyExtractionOptions
-
as
public <T> T as(java.lang.Class<T> cls, io.restassured.mapper.ObjectMapperType mapperType)- Specified by:
asin interfaceio.restassured.response.ResponseBodyExtractionOptions
-
as
public <T> T as(java.lang.Class<T> cls, io.restassured.mapper.ObjectMapper mapper)- Specified by:
asin interfaceio.restassured.response.ResponseBodyExtractionOptions
-
as
public <T> T as(io.restassured.common.mapper.TypeRef<T> typeRef)- Specified by:
asin interfaceio.restassured.response.ResponseBodyExtractionOptions
-
as
public <T> T as(java.lang.reflect.Type cls)- Specified by:
asin interfaceio.restassured.response.ResponseBodyExtractionOptions
-
as
public <T> T as(java.lang.reflect.Type cls, io.restassured.mapper.ObjectMapperType mapperType)- Specified by:
asin interfaceio.restassured.response.ResponseBodyExtractionOptions
-
as
public <T> T as(java.lang.reflect.Type cls, io.restassured.mapper.ObjectMapper mapper)- Specified by:
asin interfaceio.restassured.response.ResponseBodyExtractionOptions
-
jsonPath
public io.restassured.path.json.JsonPath jsonPath()- Specified by:
jsonPathin interfaceio.restassured.response.ResponseBodyExtractionOptions
-
jsonPath
public io.restassured.path.json.JsonPath jsonPath(io.restassured.path.json.config.JsonPathConfig config)- Specified by:
jsonPathin interfaceio.restassured.response.ResponseBodyExtractionOptions
-
xmlPath
public io.restassured.path.xml.XmlPath xmlPath()- Specified by:
xmlPathin interfaceio.restassured.response.ResponseBodyExtractionOptions
-
xmlPath
public io.restassured.path.xml.XmlPath xmlPath(io.restassured.path.xml.config.XmlPathConfig config)- Specified by:
xmlPathin interfaceio.restassured.response.ResponseBodyExtractionOptions
-
xmlPath
public io.restassured.path.xml.XmlPath xmlPath(io.restassured.path.xml.XmlPath.CompatibilityMode compatibilityMode)- Specified by:
xmlPathin interfaceio.restassured.response.ResponseBodyExtractionOptions
-
htmlPath
public io.restassured.path.xml.XmlPath htmlPath()- Specified by:
htmlPathin interfaceio.restassured.response.ResponseBodyExtractionOptions
-
path
public <T> T path(java.lang.String path, java.lang.String... arguments)- Specified by:
pathin interfaceio.restassured.response.ResponseBodyExtractionOptions
-
asString
public java.lang.String asString()- Specified by:
asStringin interfaceio.restassured.response.ResponseBodyData
-
asPrettyString
public java.lang.String asPrettyString()- Specified by:
asPrettyStringin interfaceio.restassured.response.ResponseBodyData
-
asByteArray
public byte[] asByteArray()- Specified by:
asByteArrayin interfaceio.restassured.response.ResponseBodyData
-
asInputStream
public java.io.InputStream asInputStream()- Specified by:
asInputStreamin interfaceio.restassured.response.ResponseBodyData
-
andReturn
public io.restassured.response.Response andReturn()- Specified by:
andReturnin interfaceio.restassured.response.ResponseOptions<io.restassured.response.Response>
-
thenReturn
public io.restassured.response.Response thenReturn()- Specified by:
thenReturnin interfaceio.restassured.response.ResponseOptions<io.restassured.response.Response>
-
body
public io.restassured.response.ResponseBody body()- Specified by:
bodyin interfaceio.restassured.response.ResponseOptions<io.restassured.response.Response>
-
getBody
public io.restassured.response.ResponseBody getBody()- Specified by:
getBodyin interfaceio.restassured.response.ResponseOptions<io.restassured.response.Response>
-
headers
public io.restassured.http.Headers headers()- Specified by:
headersin interfaceio.restassured.response.ResponseOptions<io.restassured.response.Response>
-
getHeaders
public io.restassured.http.Headers getHeaders()- Specified by:
getHeadersin interfaceio.restassured.response.ResponseOptions<io.restassured.response.Response>
-
header
public java.lang.String header(java.lang.String name)- Specified by:
headerin interfaceio.restassured.response.ResponseOptions<io.restassured.response.Response>
-
getHeader
public java.lang.String getHeader(java.lang.String name)- Specified by:
getHeaderin interfaceio.restassured.response.ResponseOptions<io.restassured.response.Response>
-
cookies
public java.util.Map<java.lang.String,java.lang.String> cookies()- Specified by:
cookiesin interfaceio.restassured.response.ResponseOptions<io.restassured.response.Response>
-
detailedCookies
public io.restassured.http.Cookies detailedCookies()- Specified by:
detailedCookiesin interfaceio.restassured.response.ResponseOptions<io.restassured.response.Response>
-
getCookies
public java.util.Map<java.lang.String,java.lang.String> getCookies()- Specified by:
getCookiesin interfaceio.restassured.response.ResponseOptions<io.restassured.response.Response>
-
getDetailedCookies
public io.restassured.http.Cookies getDetailedCookies()- Specified by:
getDetailedCookiesin interfaceio.restassured.response.ResponseOptions<io.restassured.response.Response>
-
cookie
public java.lang.String cookie(java.lang.String name)- Specified by:
cookiein interfaceio.restassured.response.ResponseOptions<io.restassured.response.Response>
-
getCookie
public java.lang.String getCookie(java.lang.String name)- Specified by:
getCookiein interfaceio.restassured.response.ResponseOptions<io.restassured.response.Response>
-
detailedCookie
public io.restassured.http.Cookie detailedCookie(java.lang.String name)- Specified by:
detailedCookiein interfaceio.restassured.response.ResponseOptions<io.restassured.response.Response>
-
getDetailedCookie
public io.restassured.http.Cookie getDetailedCookie(java.lang.String name)- Specified by:
getDetailedCookiein interfaceio.restassured.response.ResponseOptions<io.restassured.response.Response>
-
contentType
public java.lang.String contentType()- Specified by:
contentTypein interfaceio.restassured.response.ResponseOptions<io.restassured.response.Response>
-
getContentType
public java.lang.String getContentType()- Specified by:
getContentTypein interfaceio.restassured.response.ResponseOptions<io.restassured.response.Response>
-
statusLine
public java.lang.String statusLine()- Specified by:
statusLinein interfaceio.restassured.response.ResponseOptions<io.restassured.response.Response>
-
getStatusLine
public java.lang.String getStatusLine()- Specified by:
getStatusLinein interfaceio.restassured.response.ResponseOptions<io.restassured.response.Response>
-
sessionId
public java.lang.String sessionId()- Specified by:
sessionIdin interfaceio.restassured.response.ResponseOptions<io.restassured.response.Response>
-
getSessionId
public java.lang.String getSessionId()- Specified by:
getSessionIdin interfaceio.restassured.response.ResponseOptions<io.restassured.response.Response>
-
statusCode
public int statusCode()- Specified by:
statusCodein interfaceio.restassured.response.ResponseOptions<io.restassured.response.Response>
-
getStatusCode
public int getStatusCode()- Specified by:
getStatusCodein interfaceio.restassured.response.ResponseOptions<io.restassured.response.Response>
-
time
public long time()- Specified by:
timein interfaceio.restassured.response.ResponseOptions<io.restassured.response.Response>
-
timeIn
public long timeIn(java.util.concurrent.TimeUnit timeUnit)- Specified by:
timeInin interfaceio.restassured.response.ResponseOptions<io.restassured.response.Response>
-
getTime
public long getTime()- Specified by:
getTimein interfaceio.restassured.response.ResponseOptions<io.restassured.response.Response>
-
getTimeIn
public long getTimeIn(java.util.concurrent.TimeUnit timeUnit)- Specified by:
getTimeInin interfaceio.restassured.response.ResponseOptions<io.restassured.response.Response>
-