Package net.serenitybdd.rest.decorators
Class ResponseDecorated
- java.lang.Object
-
- io.restassured.internal.RestAssuredResponseOptionsImpl<io.restassured.response.Response>
-
- net.serenitybdd.rest.decorators.ResponseDecorated
-
- All Implemented Interfaces:
io.restassured.response.ExtractableResponse<io.restassured.response.Response>
,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 ResponseDecorated extends io.restassured.internal.RestAssuredResponseOptionsImpl<io.restassured.response.Response> implements io.restassured.response.Response
User: YamStranger Date: 3/22/16 Time: 10:30 PM
-
-
Constructor Summary
Constructors Constructor Description ResponseDecorated(io.restassured.response.Response core)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description io.restassured.response.Response
andReturn()
<T> T
as(io.restassured.common.mapper.TypeRef<T> typeRef)
<T> T
as(Class<T> cls)
<T> T
as(Class<T> cls, io.restassured.mapper.ObjectMapper mapper)
<T> T
as(Class<T> cls, io.restassured.mapper.ObjectMapperType mapperType)
<T> T
as(Type cls)
<T> T
as(Type cls, io.restassured.mapper.ObjectMapper mapper)
<T> T
as(Type cls, io.restassured.mapper.ObjectMapperType mapperType)
byte[]
asByteArray()
InputStream
asInputStream()
String
asString()
io.restassured.response.ResponseBody
body()
String
contentType()
String
cookie(String name)
Map<String,String>
cookies()
io.restassured.http.Cookie
detailedCookie(String name)
io.restassured.http.Cookies
detailedCookies()
io.restassured.response.ResponseBody
getBody()
String
getContentType()
String
getCookie(String name)
Map<String,String>
getCookies()
io.restassured.http.Cookie
getDetailedCookie(String name)
io.restassured.http.Cookies
getDetailedCookies()
String
getHeader(String name)
io.restassured.http.Headers
getHeaders()
String
getSessionId()
int
getStatusCode()
String
getStatusLine()
long
getTime()
long
getTimeIn(TimeUnit timeUnit)
String
header(String name)
io.restassured.http.Headers
headers()
io.restassured.path.xml.XmlPath
htmlPath()
io.restassured.path.json.JsonPath
jsonPath()
io.restassured.path.json.JsonPath
jsonPath(io.restassured.path.json.config.JsonPathConfig config)
<T> T
path(String path, String... arguments)
io.restassured.response.Response
peek()
io.restassured.response.Response
prettyPeek()
String
prettyPrint()
String
print()
String
sessionId()
int
statusCode()
String
statusLine()
io.restassured.response.ValidatableResponse
then()
io.restassured.response.Response
thenReturn()
long
time()
long
timeIn(TimeUnit timeUnit)
io.restassured.path.xml.XmlPath
xmlPath()
io.restassured.path.xml.XmlPath
xmlPath(io.restassured.path.xml.config.XmlPathConfig config)
io.restassured.path.xml.XmlPath
xmlPath(io.restassured.path.xml.XmlPath.CompatibilityMode compatibilityMode)
-
Methods inherited from class io.restassured.internal.RestAssuredResponseOptionsImpl
asPrettyString, asString, getConfig, getConnectionManager, getContent, getDecoderConfig, getDefaultContentType, getFilterContextProperties, getGroovyResponse, getHasExpectations, getLogRepository, getResponseHeaders, getRpr, getSessionIdName, isInputStream, response, setConfig, setConnectionManager, setContent, setContentType, setCookies, setDecoderConfig, setDefaultContentType, setFilterContextProperties, setGroovyResponse, setHasExpectations, setLogRepository, setResponseHeaders, setRpr, setSessionIdName, setStatusCode, setStatusLine
-
-
-
-
Method Detail
-
then
public io.restassured.response.ValidatableResponse then()
- Specified by:
then
in interfaceio.restassured.response.Validatable<io.restassured.response.ValidatableResponse,io.restassured.response.Response>
-
print
public String print()
- Specified by:
print
in interfaceio.restassured.response.ResponseBody<io.restassured.response.Response>
- Overrides:
print
in classio.restassured.internal.RestAssuredResponseOptionsImpl<io.restassured.response.Response>
-
prettyPrint
public String prettyPrint()
- Specified by:
prettyPrint
in interfaceio.restassured.response.ResponseBody<io.restassured.response.Response>
- Overrides:
prettyPrint
in classio.restassured.internal.RestAssuredResponseOptionsImpl<io.restassured.response.Response>
-
peek
public io.restassured.response.Response peek()
- Specified by:
peek
in interfaceio.restassured.response.ResponseBody<io.restassured.response.Response>
- Overrides:
peek
in classio.restassured.internal.RestAssuredResponseOptionsImpl<io.restassured.response.Response>
-
prettyPeek
public io.restassured.response.Response prettyPeek()
- Specified by:
prettyPeek
in interfaceio.restassured.response.ResponseBody<io.restassured.response.Response>
- Overrides:
prettyPeek
in classio.restassured.internal.RestAssuredResponseOptionsImpl<io.restassured.response.Response>
-
as
public <T> T as(Class<T> cls)
- Specified by:
as
in interfaceio.restassured.response.ResponseBodyExtractionOptions
- Overrides:
as
in classio.restassured.internal.RestAssuredResponseOptionsImpl<io.restassured.response.Response>
-
as
public <T> T as(Class<T> cls, io.restassured.mapper.ObjectMapperType mapperType)
- Specified by:
as
in interfaceio.restassured.response.ResponseBodyExtractionOptions
- Overrides:
as
in classio.restassured.internal.RestAssuredResponseOptionsImpl<io.restassured.response.Response>
-
as
public <T> T as(Class<T> cls, io.restassured.mapper.ObjectMapper mapper)
- Specified by:
as
in interfaceio.restassured.response.ResponseBodyExtractionOptions
- Overrides:
as
in classio.restassured.internal.RestAssuredResponseOptionsImpl<io.restassured.response.Response>
-
as
public <T> T as(io.restassured.common.mapper.TypeRef<T> typeRef)
- Specified by:
as
in interfaceio.restassured.response.ResponseBodyExtractionOptions
- Overrides:
as
in classio.restassured.internal.RestAssuredResponseOptionsImpl<io.restassured.response.Response>
-
as
public <T> T as(Type cls)
- Specified by:
as
in interfaceio.restassured.response.ResponseBodyExtractionOptions
- Overrides:
as
in classio.restassured.internal.RestAssuredResponseOptionsImpl<io.restassured.response.Response>
-
as
public <T> T as(Type cls, io.restassured.mapper.ObjectMapperType mapperType)
- Specified by:
as
in interfaceio.restassured.response.ResponseBodyExtractionOptions
- Overrides:
as
in classio.restassured.internal.RestAssuredResponseOptionsImpl<io.restassured.response.Response>
-
as
public <T> T as(Type cls, io.restassured.mapper.ObjectMapper mapper)
- Specified by:
as
in interfaceio.restassured.response.ResponseBodyExtractionOptions
- Overrides:
as
in classio.restassured.internal.RestAssuredResponseOptionsImpl<io.restassured.response.Response>
-
jsonPath
public io.restassured.path.json.JsonPath jsonPath()
- Specified by:
jsonPath
in interfaceio.restassured.response.ResponseBodyExtractionOptions
- Overrides:
jsonPath
in classio.restassured.internal.RestAssuredResponseOptionsImpl<io.restassured.response.Response>
-
jsonPath
public io.restassured.path.json.JsonPath jsonPath(io.restassured.path.json.config.JsonPathConfig config)
- Specified by:
jsonPath
in interfaceio.restassured.response.ResponseBodyExtractionOptions
- Overrides:
jsonPath
in classio.restassured.internal.RestAssuredResponseOptionsImpl<io.restassured.response.Response>
-
xmlPath
public io.restassured.path.xml.XmlPath xmlPath()
- Specified by:
xmlPath
in interfaceio.restassured.response.ResponseBodyExtractionOptions
- Overrides:
xmlPath
in classio.restassured.internal.RestAssuredResponseOptionsImpl<io.restassured.response.Response>
-
xmlPath
public io.restassured.path.xml.XmlPath xmlPath(io.restassured.path.xml.config.XmlPathConfig config)
- Specified by:
xmlPath
in interfaceio.restassured.response.ResponseBodyExtractionOptions
- Overrides:
xmlPath
in classio.restassured.internal.RestAssuredResponseOptionsImpl<io.restassured.response.Response>
-
xmlPath
public io.restassured.path.xml.XmlPath xmlPath(io.restassured.path.xml.XmlPath.CompatibilityMode compatibilityMode)
- Specified by:
xmlPath
in interfaceio.restassured.response.ResponseBodyExtractionOptions
- Overrides:
xmlPath
in classio.restassured.internal.RestAssuredResponseOptionsImpl<io.restassured.response.Response>
-
htmlPath
public io.restassured.path.xml.XmlPath htmlPath()
- Specified by:
htmlPath
in interfaceio.restassured.response.ResponseBodyExtractionOptions
- Overrides:
htmlPath
in classio.restassured.internal.RestAssuredResponseOptionsImpl<io.restassured.response.Response>
-
path
public <T> T path(String path, String... arguments)
- Specified by:
path
in interfaceio.restassured.response.ResponseBodyExtractionOptions
- Overrides:
path
in classio.restassured.internal.RestAssuredResponseOptionsImpl<io.restassured.response.Response>
-
asString
public String asString()
- Specified by:
asString
in interfaceio.restassured.response.ResponseBodyData
- Overrides:
asString
in classio.restassured.internal.RestAssuredResponseOptionsImpl<io.restassured.response.Response>
-
asByteArray
public byte[] asByteArray()
- Specified by:
asByteArray
in interfaceio.restassured.response.ResponseBodyData
- Overrides:
asByteArray
in classio.restassured.internal.RestAssuredResponseOptionsImpl<io.restassured.response.Response>
-
asInputStream
public InputStream asInputStream()
- Specified by:
asInputStream
in interfaceio.restassured.response.ResponseBodyData
- Overrides:
asInputStream
in classio.restassured.internal.RestAssuredResponseOptionsImpl<io.restassured.response.Response>
-
andReturn
public io.restassured.response.Response andReturn()
- Specified by:
andReturn
in interfaceio.restassured.response.ResponseOptions<io.restassured.response.Response>
- Overrides:
andReturn
in classio.restassured.internal.RestAssuredResponseOptionsImpl<io.restassured.response.Response>
-
thenReturn
public io.restassured.response.Response thenReturn()
- Specified by:
thenReturn
in interfaceio.restassured.response.ResponseOptions<io.restassured.response.Response>
- Overrides:
thenReturn
in classio.restassured.internal.RestAssuredResponseOptionsImpl<io.restassured.response.Response>
-
body
public io.restassured.response.ResponseBody body()
- Specified by:
body
in interfaceio.restassured.response.ExtractableResponse<io.restassured.response.Response>
- Specified by:
body
in interfaceio.restassured.response.ResponseOptions<io.restassured.response.Response>
- Overrides:
body
in classio.restassured.internal.RestAssuredResponseOptionsImpl<io.restassured.response.Response>
-
getBody
public io.restassured.response.ResponseBody getBody()
- Specified by:
getBody
in interfaceio.restassured.response.ResponseOptions<io.restassured.response.Response>
- Overrides:
getBody
in classio.restassured.internal.RestAssuredResponseOptionsImpl<io.restassured.response.Response>
-
headers
public io.restassured.http.Headers headers()
- Specified by:
headers
in interfaceio.restassured.response.ExtractableResponse<io.restassured.response.Response>
- Specified by:
headers
in interfaceio.restassured.response.ResponseOptions<io.restassured.response.Response>
- Overrides:
headers
in classio.restassured.internal.RestAssuredResponseOptionsImpl<io.restassured.response.Response>
-
getHeaders
public io.restassured.http.Headers getHeaders()
- Specified by:
getHeaders
in interfaceio.restassured.response.ResponseOptions<io.restassured.response.Response>
- Overrides:
getHeaders
in classio.restassured.internal.RestAssuredResponseOptionsImpl<io.restassured.response.Response>
-
header
public String header(String name)
- Specified by:
header
in interfaceio.restassured.response.ExtractableResponse<io.restassured.response.Response>
- Specified by:
header
in interfaceio.restassured.response.ResponseOptions<io.restassured.response.Response>
- Overrides:
header
in classio.restassured.internal.RestAssuredResponseOptionsImpl<io.restassured.response.Response>
-
getHeader
public String getHeader(String name)
- Specified by:
getHeader
in interfaceio.restassured.response.ResponseOptions<io.restassured.response.Response>
- Overrides:
getHeader
in classio.restassured.internal.RestAssuredResponseOptionsImpl<io.restassured.response.Response>
-
cookies
public Map<String,String> cookies()
- Specified by:
cookies
in interfaceio.restassured.response.ExtractableResponse<io.restassured.response.Response>
- Specified by:
cookies
in interfaceio.restassured.response.ResponseOptions<io.restassured.response.Response>
- Overrides:
cookies
in classio.restassured.internal.RestAssuredResponseOptionsImpl<io.restassured.response.Response>
-
detailedCookies
public io.restassured.http.Cookies detailedCookies()
- Specified by:
detailedCookies
in interfaceio.restassured.response.ExtractableResponse<io.restassured.response.Response>
- Specified by:
detailedCookies
in interfaceio.restassured.response.ResponseOptions<io.restassured.response.Response>
- Overrides:
detailedCookies
in classio.restassured.internal.RestAssuredResponseOptionsImpl<io.restassured.response.Response>
-
getCookies
public Map<String,String> getCookies()
- Specified by:
getCookies
in interfaceio.restassured.response.ResponseOptions<io.restassured.response.Response>
- Overrides:
getCookies
in classio.restassured.internal.RestAssuredResponseOptionsImpl<io.restassured.response.Response>
-
getDetailedCookies
public io.restassured.http.Cookies getDetailedCookies()
- Specified by:
getDetailedCookies
in interfaceio.restassured.response.ResponseOptions<io.restassured.response.Response>
- Overrides:
getDetailedCookies
in classio.restassured.internal.RestAssuredResponseOptionsImpl<io.restassured.response.Response>
-
cookie
public String cookie(String name)
- Specified by:
cookie
in interfaceio.restassured.response.ExtractableResponse<io.restassured.response.Response>
- Specified by:
cookie
in interfaceio.restassured.response.ResponseOptions<io.restassured.response.Response>
- Overrides:
cookie
in classio.restassured.internal.RestAssuredResponseOptionsImpl<io.restassured.response.Response>
-
getCookie
public String getCookie(String name)
- Specified by:
getCookie
in interfaceio.restassured.response.ResponseOptions<io.restassured.response.Response>
- Overrides:
getCookie
in classio.restassured.internal.RestAssuredResponseOptionsImpl<io.restassured.response.Response>
-
detailedCookie
public io.restassured.http.Cookie detailedCookie(String name)
- Specified by:
detailedCookie
in interfaceio.restassured.response.ExtractableResponse<io.restassured.response.Response>
- Specified by:
detailedCookie
in interfaceio.restassured.response.ResponseOptions<io.restassured.response.Response>
- Overrides:
detailedCookie
in classio.restassured.internal.RestAssuredResponseOptionsImpl<io.restassured.response.Response>
-
getDetailedCookie
public io.restassured.http.Cookie getDetailedCookie(String name)
- Specified by:
getDetailedCookie
in interfaceio.restassured.response.ResponseOptions<io.restassured.response.Response>
- Overrides:
getDetailedCookie
in classio.restassured.internal.RestAssuredResponseOptionsImpl<io.restassured.response.Response>
-
contentType
public String contentType()
- Specified by:
contentType
in interfaceio.restassured.response.ExtractableResponse<io.restassured.response.Response>
- Specified by:
contentType
in interfaceio.restassured.response.ResponseOptions<io.restassured.response.Response>
- Overrides:
contentType
in classio.restassured.internal.RestAssuredResponseOptionsImpl<io.restassured.response.Response>
-
getContentType
public String getContentType()
- Specified by:
getContentType
in interfaceio.restassured.response.ResponseOptions<io.restassured.response.Response>
- Overrides:
getContentType
in classio.restassured.internal.RestAssuredResponseOptionsImpl<io.restassured.response.Response>
-
statusLine
public String statusLine()
- Specified by:
statusLine
in interfaceio.restassured.response.ExtractableResponse<io.restassured.response.Response>
- Specified by:
statusLine
in interfaceio.restassured.response.ResponseOptions<io.restassured.response.Response>
- Overrides:
statusLine
in classio.restassured.internal.RestAssuredResponseOptionsImpl<io.restassured.response.Response>
-
getStatusLine
public String getStatusLine()
- Specified by:
getStatusLine
in interfaceio.restassured.response.ResponseOptions<io.restassured.response.Response>
- Overrides:
getStatusLine
in classio.restassured.internal.RestAssuredResponseOptionsImpl<io.restassured.response.Response>
-
sessionId
public String sessionId()
- Specified by:
sessionId
in interfaceio.restassured.response.ExtractableResponse<io.restassured.response.Response>
- Specified by:
sessionId
in interfaceio.restassured.response.ResponseOptions<io.restassured.response.Response>
- Overrides:
sessionId
in classio.restassured.internal.RestAssuredResponseOptionsImpl<io.restassured.response.Response>
-
getSessionId
public String getSessionId()
- Specified by:
getSessionId
in interfaceio.restassured.response.ResponseOptions<io.restassured.response.Response>
- Overrides:
getSessionId
in classio.restassured.internal.RestAssuredResponseOptionsImpl<io.restassured.response.Response>
-
statusCode
public int statusCode()
- Specified by:
statusCode
in interfaceio.restassured.response.ExtractableResponse<io.restassured.response.Response>
- Specified by:
statusCode
in interfaceio.restassured.response.ResponseOptions<io.restassured.response.Response>
- Overrides:
statusCode
in classio.restassured.internal.RestAssuredResponseOptionsImpl<io.restassured.response.Response>
-
getStatusCode
public int getStatusCode()
- Specified by:
getStatusCode
in interfaceio.restassured.response.ResponseOptions<io.restassured.response.Response>
- Overrides:
getStatusCode
in classio.restassured.internal.RestAssuredResponseOptionsImpl<io.restassured.response.Response>
-
time
public long time()
- Specified by:
time
in interfaceio.restassured.response.ExtractableResponse<io.restassured.response.Response>
- Specified by:
time
in interfaceio.restassured.response.ResponseOptions<io.restassured.response.Response>
- Overrides:
time
in classio.restassured.internal.RestAssuredResponseOptionsImpl<io.restassured.response.Response>
-
timeIn
public long timeIn(TimeUnit timeUnit)
- Specified by:
timeIn
in interfaceio.restassured.response.ExtractableResponse<io.restassured.response.Response>
- Specified by:
timeIn
in interfaceio.restassured.response.ResponseOptions<io.restassured.response.Response>
- Overrides:
timeIn
in classio.restassured.internal.RestAssuredResponseOptionsImpl<io.restassured.response.Response>
-
getTime
public long getTime()
- Specified by:
getTime
in interfaceio.restassured.response.ResponseOptions<io.restassured.response.Response>
- Overrides:
getTime
in classio.restassured.internal.RestAssuredResponseOptionsImpl<io.restassured.response.Response>
-
getTimeIn
public long getTimeIn(TimeUnit timeUnit)
- Specified by:
getTimeIn
in interfaceio.restassured.response.ResponseOptions<io.restassured.response.Response>
- Overrides:
getTimeIn
in classio.restassured.internal.RestAssuredResponseOptionsImpl<io.restassured.response.Response>
-
-