Package net.serenitybdd.rest.stubs
Class ValidatableResponseStub
- java.lang.Object
-
- net.serenitybdd.rest.stubs.ValidatableResponseStub
-
- All Implemented Interfaces:
io.restassured.response.ValidatableResponse
,io.restassured.response.ValidatableResponseOptions<io.restassured.response.ValidatableResponse,io.restassured.response.Response>
public class ValidatableResponseStub extends Object implements io.restassured.response.ValidatableResponse
Created by john on 23/07/2015.
-
-
Constructor Summary
Constructors Constructor Description ValidatableResponseStub()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description io.restassured.response.ValidatableResponse
and()
io.restassured.response.ValidatableResponse
appendRoot(String pathToAppend)
io.restassured.response.ValidatableResponse
appendRoot(String pathToAppend, List<io.restassured.specification.Argument> arguments)
io.restassured.response.ValidatableResponse
appendRootPath(String pathToAppend)
io.restassured.response.ValidatableResponse
appendRootPath(String pathToAppend, List<io.restassured.specification.Argument> arguments)
io.restassured.response.ValidatableResponse
assertThat()
io.restassured.response.ValidatableResponse
body(String path, io.restassured.matcher.ResponseAwareMatcher<io.restassured.response.Response> responseAwareMatcher)
io.restassured.response.ValidatableResponse
body(String path, List<io.restassured.specification.Argument> arguments, io.restassured.matcher.ResponseAwareMatcher<io.restassured.response.Response> responseAwareMatcher)
io.restassured.response.ValidatableResponse
body(String path, List<io.restassured.specification.Argument> arguments, org.hamcrest.Matcher matcher, Object... additionalKeyMatcherPairs)
io.restassured.response.ValidatableResponse
body(String path, org.hamcrest.Matcher<?> matcher, Object... additionalKeyMatcherPairs)
io.restassured.response.ValidatableResponse
body(List<io.restassured.specification.Argument> arguments, io.restassured.matcher.ResponseAwareMatcher<io.restassured.response.Response> responseAwareMatcher)
io.restassured.response.ValidatableResponse
body(List<io.restassured.specification.Argument> arguments, org.hamcrest.Matcher matcher, Object... additionalKeyMatcherPairs)
io.restassured.response.ValidatableResponse
body(org.hamcrest.Matcher<?> matcher, org.hamcrest.Matcher<?>... additionalMatchers)
io.restassured.response.ValidatableResponse
contentType(io.restassured.http.ContentType contentType)
io.restassured.response.ValidatableResponse
contentType(String contentType)
io.restassured.response.ValidatableResponse
contentType(org.hamcrest.Matcher<? super String> contentType)
io.restassured.response.ValidatableResponse
cookie(String cookieName)
io.restassured.response.ValidatableResponse
cookie(String cookieName, io.restassured.matcher.DetailedCookieMatcher detailedCookieMatcher)
io.restassured.response.ValidatableResponse
cookie(String cookieName, Object expectedValue)
io.restassured.response.ValidatableResponse
cookie(String cookieName, org.hamcrest.Matcher<?> expectedValueMatcher)
io.restassured.response.ValidatableResponse
cookies(String firstExpectedCookieName, Object firstExpectedCookieValue, Object... expectedCookieNameValuePairs)
io.restassured.response.ValidatableResponse
cookies(Map<String,?> expectedCookies)
io.restassured.response.ValidatableResponse
defaultParser(io.restassured.parsing.Parser parser)
io.restassured.response.ValidatableResponse
detachRoot(String pathToDetach)
io.restassured.response.ValidatableResponse
detachRootPath(String pathToDetach)
io.restassured.response.ExtractableResponse<io.restassured.response.Response>
extract()
io.restassured.response.ValidatableResponse
header(String s, io.restassured.matcher.ResponseAwareMatcher<io.restassured.response.Response> responseAwareMatcher)
io.restassured.response.ValidatableResponse
header(String headerName, String expectedValue)
<V> io.restassured.response.ValidatableResponse
header(String s, Function<String,V> restAssuredFunction, org.hamcrest.Matcher<? super V> matcher)
io.restassured.response.ValidatableResponse
header(String headerName, org.hamcrest.Matcher<?> expectedValueMatcher)
io.restassured.response.ValidatableResponse
headers(String firstExpectedHeaderName, Object firstExpectedHeaderValue, Object... expectedHeaders)
io.restassured.response.ValidatableResponse
headers(Map<String,?> expectedHeaders)
io.restassured.response.ValidatableResponseLogSpec<io.restassured.response.ValidatableResponse,io.restassured.response.Response>
log()
io.restassured.response.ValidatableResponse
noRoot()
io.restassured.response.ValidatableResponse
noRootPath()
io.restassured.response.ValidatableResponse
parser(String contentType, io.restassured.parsing.Parser parser)
io.restassured.response.ValidatableResponse
root(String rootPath)
io.restassured.response.ValidatableResponse
root(String rootPath, List<io.restassured.specification.Argument> arguments)
io.restassured.response.ValidatableResponse
rootPath(String rootPath)
io.restassured.response.ValidatableResponse
rootPath(String rootPath, List<io.restassured.specification.Argument> arguments)
io.restassured.response.ValidatableResponse
spec(io.restassured.specification.ResponseSpecification responseSpecificationToMerge)
io.restassured.response.ValidatableResponse
statusCode(int expectedStatusCode)
io.restassured.response.ValidatableResponse
statusCode(org.hamcrest.Matcher<? super Integer> expectedStatusCode)
io.restassured.response.ValidatableResponse
statusLine(String expectedStatusLine)
io.restassured.response.ValidatableResponse
statusLine(org.hamcrest.Matcher<? super String> expectedStatusLine)
io.restassured.response.ValidatableResponse
time(org.hamcrest.Matcher<Long> matcher)
io.restassured.response.ValidatableResponse
time(org.hamcrest.Matcher<Long> matcher, TimeUnit timeUnit)
io.restassured.response.ValidatableResponse
using()
-
-
-
Method Detail
-
body
public io.restassured.response.ValidatableResponse body(String path, List<io.restassured.specification.Argument> arguments, org.hamcrest.Matcher matcher, Object... additionalKeyMatcherPairs)
- Specified by:
body
in interfaceio.restassured.response.ValidatableResponseOptions<io.restassured.response.ValidatableResponse,io.restassured.response.Response>
-
body
public io.restassured.response.ValidatableResponse body(List<io.restassured.specification.Argument> arguments, org.hamcrest.Matcher matcher, Object... additionalKeyMatcherPairs)
- Specified by:
body
in interfaceio.restassured.response.ValidatableResponseOptions<io.restassured.response.ValidatableResponse,io.restassured.response.Response>
-
body
public io.restassured.response.ValidatableResponse body(List<io.restassured.specification.Argument> arguments, io.restassured.matcher.ResponseAwareMatcher<io.restassured.response.Response> responseAwareMatcher)
- Specified by:
body
in interfaceio.restassured.response.ValidatableResponseOptions<io.restassured.response.ValidatableResponse,io.restassured.response.Response>
-
statusCode
public io.restassured.response.ValidatableResponse statusCode(org.hamcrest.Matcher<? super Integer> expectedStatusCode)
- Specified by:
statusCode
in interfaceio.restassured.response.ValidatableResponseOptions<io.restassured.response.ValidatableResponse,io.restassured.response.Response>
-
statusCode
public io.restassured.response.ValidatableResponse statusCode(int expectedStatusCode)
- Specified by:
statusCode
in interfaceio.restassured.response.ValidatableResponseOptions<io.restassured.response.ValidatableResponse,io.restassured.response.Response>
-
statusLine
public io.restassured.response.ValidatableResponse statusLine(org.hamcrest.Matcher<? super String> expectedStatusLine)
- Specified by:
statusLine
in interfaceio.restassured.response.ValidatableResponseOptions<io.restassured.response.ValidatableResponse,io.restassured.response.Response>
-
statusLine
public io.restassured.response.ValidatableResponse statusLine(String expectedStatusLine)
- Specified by:
statusLine
in interfaceio.restassured.response.ValidatableResponseOptions<io.restassured.response.ValidatableResponse,io.restassured.response.Response>
-
headers
public io.restassured.response.ValidatableResponse headers(Map<String,?> expectedHeaders)
- Specified by:
headers
in interfaceio.restassured.response.ValidatableResponseOptions<io.restassured.response.ValidatableResponse,io.restassured.response.Response>
-
headers
public io.restassured.response.ValidatableResponse headers(String firstExpectedHeaderName, Object firstExpectedHeaderValue, Object... expectedHeaders)
- Specified by:
headers
in interfaceio.restassured.response.ValidatableResponseOptions<io.restassured.response.ValidatableResponse,io.restassured.response.Response>
-
header
public io.restassured.response.ValidatableResponse header(String headerName, org.hamcrest.Matcher<?> expectedValueMatcher)
- Specified by:
header
in interfaceio.restassured.response.ValidatableResponseOptions<io.restassured.response.ValidatableResponse,io.restassured.response.Response>
-
header
public io.restassured.response.ValidatableResponse header(String s, io.restassured.matcher.ResponseAwareMatcher<io.restassured.response.Response> responseAwareMatcher)
- Specified by:
header
in interfaceio.restassured.response.ValidatableResponseOptions<io.restassured.response.ValidatableResponse,io.restassured.response.Response>
-
header
public <V> io.restassured.response.ValidatableResponse header(String s, Function<String,V> restAssuredFunction, org.hamcrest.Matcher<? super V> matcher)
- Specified by:
header
in interfaceio.restassured.response.ValidatableResponseOptions<io.restassured.response.ValidatableResponse,io.restassured.response.Response>
-
header
public io.restassured.response.ValidatableResponse header(String headerName, String expectedValue)
- Specified by:
header
in interfaceio.restassured.response.ValidatableResponseOptions<io.restassured.response.ValidatableResponse,io.restassured.response.Response>
-
cookies
public io.restassured.response.ValidatableResponse cookies(Map<String,?> expectedCookies)
- Specified by:
cookies
in interfaceio.restassured.response.ValidatableResponseOptions<io.restassured.response.ValidatableResponse,io.restassured.response.Response>
-
cookie
public io.restassured.response.ValidatableResponse cookie(String cookieName)
- Specified by:
cookie
in interfaceio.restassured.response.ValidatableResponseOptions<io.restassured.response.ValidatableResponse,io.restassured.response.Response>
-
cookies
public io.restassured.response.ValidatableResponse cookies(String firstExpectedCookieName, Object firstExpectedCookieValue, Object... expectedCookieNameValuePairs)
- Specified by:
cookies
in interfaceio.restassured.response.ValidatableResponseOptions<io.restassured.response.ValidatableResponse,io.restassured.response.Response>
-
cookie
public io.restassured.response.ValidatableResponse cookie(String cookieName, org.hamcrest.Matcher<?> expectedValueMatcher)
- Specified by:
cookie
in interfaceio.restassured.response.ValidatableResponseOptions<io.restassured.response.ValidatableResponse,io.restassured.response.Response>
-
cookie
public io.restassured.response.ValidatableResponse cookie(String cookieName, io.restassured.matcher.DetailedCookieMatcher detailedCookieMatcher)
- Specified by:
cookie
in interfaceio.restassured.response.ValidatableResponseOptions<io.restassured.response.ValidatableResponse,io.restassured.response.Response>
-
cookie
public io.restassured.response.ValidatableResponse cookie(String cookieName, Object expectedValue)
- Specified by:
cookie
in interfaceio.restassured.response.ValidatableResponseOptions<io.restassured.response.ValidatableResponse,io.restassured.response.Response>
-
rootPath
public io.restassured.response.ValidatableResponse rootPath(String rootPath)
- Specified by:
rootPath
in interfaceio.restassured.response.ValidatableResponseOptions<io.restassured.response.ValidatableResponse,io.restassured.response.Response>
-
rootPath
public io.restassured.response.ValidatableResponse rootPath(String rootPath, List<io.restassured.specification.Argument> arguments)
- Specified by:
rootPath
in interfaceio.restassured.response.ValidatableResponseOptions<io.restassured.response.ValidatableResponse,io.restassured.response.Response>
-
root
public io.restassured.response.ValidatableResponse root(String rootPath, List<io.restassured.specification.Argument> arguments)
- Specified by:
root
in interfaceio.restassured.response.ValidatableResponseOptions<io.restassured.response.ValidatableResponse,io.restassured.response.Response>
-
root
public io.restassured.response.ValidatableResponse root(String rootPath)
- Specified by:
root
in interfaceio.restassured.response.ValidatableResponseOptions<io.restassured.response.ValidatableResponse,io.restassured.response.Response>
-
noRoot
public io.restassured.response.ValidatableResponse noRoot()
- Specified by:
noRoot
in interfaceio.restassured.response.ValidatableResponseOptions<io.restassured.response.ValidatableResponse,io.restassured.response.Response>
-
noRootPath
public io.restassured.response.ValidatableResponse noRootPath()
- Specified by:
noRootPath
in interfaceio.restassured.response.ValidatableResponseOptions<io.restassured.response.ValidatableResponse,io.restassured.response.Response>
-
appendRootPath
public io.restassured.response.ValidatableResponse appendRootPath(String pathToAppend)
- Specified by:
appendRootPath
in interfaceio.restassured.response.ValidatableResponseOptions<io.restassured.response.ValidatableResponse,io.restassured.response.Response>
-
appendRoot
public io.restassured.response.ValidatableResponse appendRoot(String pathToAppend)
- Specified by:
appendRoot
in interfaceio.restassured.response.ValidatableResponseOptions<io.restassured.response.ValidatableResponse,io.restassured.response.Response>
-
appendRootPath
public io.restassured.response.ValidatableResponse appendRootPath(String pathToAppend, List<io.restassured.specification.Argument> arguments)
- Specified by:
appendRootPath
in interfaceio.restassured.response.ValidatableResponseOptions<io.restassured.response.ValidatableResponse,io.restassured.response.Response>
-
appendRoot
public io.restassured.response.ValidatableResponse appendRoot(String pathToAppend, List<io.restassured.specification.Argument> arguments)
- Specified by:
appendRoot
in interfaceio.restassured.response.ValidatableResponseOptions<io.restassured.response.ValidatableResponse,io.restassured.response.Response>
-
detachRootPath
public io.restassured.response.ValidatableResponse detachRootPath(String pathToDetach)
- Specified by:
detachRootPath
in interfaceio.restassured.response.ValidatableResponseOptions<io.restassured.response.ValidatableResponse,io.restassured.response.Response>
-
detachRoot
public io.restassured.response.ValidatableResponse detachRoot(String pathToDetach)
- Specified by:
detachRoot
in interfaceio.restassured.response.ValidatableResponseOptions<io.restassured.response.ValidatableResponse,io.restassured.response.Response>
-
contentType
public io.restassured.response.ValidatableResponse contentType(io.restassured.http.ContentType contentType)
- Specified by:
contentType
in interfaceio.restassured.response.ValidatableResponseOptions<io.restassured.response.ValidatableResponse,io.restassured.response.Response>
-
contentType
public io.restassured.response.ValidatableResponse contentType(String contentType)
- Specified by:
contentType
in interfaceio.restassured.response.ValidatableResponseOptions<io.restassured.response.ValidatableResponse,io.restassured.response.Response>
-
contentType
public io.restassured.response.ValidatableResponse contentType(org.hamcrest.Matcher<? super String> contentType)
- Specified by:
contentType
in interfaceio.restassured.response.ValidatableResponseOptions<io.restassured.response.ValidatableResponse,io.restassured.response.Response>
-
body
public io.restassured.response.ValidatableResponse body(org.hamcrest.Matcher<?> matcher, org.hamcrest.Matcher<?>... additionalMatchers)
- Specified by:
body
in interfaceio.restassured.response.ValidatableResponseOptions<io.restassured.response.ValidatableResponse,io.restassured.response.Response>
-
body
public io.restassured.response.ValidatableResponse body(String path, List<io.restassured.specification.Argument> arguments, io.restassured.matcher.ResponseAwareMatcher<io.restassured.response.Response> responseAwareMatcher)
- Specified by:
body
in interfaceio.restassured.response.ValidatableResponseOptions<io.restassured.response.ValidatableResponse,io.restassured.response.Response>
-
body
public io.restassured.response.ValidatableResponse body(String path, io.restassured.matcher.ResponseAwareMatcher<io.restassured.response.Response> responseAwareMatcher)
- Specified by:
body
in interfaceio.restassured.response.ValidatableResponseOptions<io.restassured.response.ValidatableResponse,io.restassured.response.Response>
-
body
public io.restassured.response.ValidatableResponse body(String path, org.hamcrest.Matcher<?> matcher, Object... additionalKeyMatcherPairs)
- Specified by:
body
in interfaceio.restassured.response.ValidatableResponseOptions<io.restassured.response.ValidatableResponse,io.restassured.response.Response>
-
and
public io.restassured.response.ValidatableResponse and()
- Specified by:
and
in interfaceio.restassured.response.ValidatableResponseOptions<io.restassured.response.ValidatableResponse,io.restassured.response.Response>
-
using
public io.restassured.response.ValidatableResponse using()
- Specified by:
using
in interfaceio.restassured.response.ValidatableResponseOptions<io.restassured.response.ValidatableResponse,io.restassured.response.Response>
-
assertThat
public io.restassured.response.ValidatableResponse assertThat()
- Specified by:
assertThat
in interfaceio.restassured.response.ValidatableResponseOptions<io.restassured.response.ValidatableResponse,io.restassured.response.Response>
-
spec
public io.restassured.response.ValidatableResponse spec(io.restassured.specification.ResponseSpecification responseSpecificationToMerge)
- Specified by:
spec
in interfaceio.restassured.response.ValidatableResponseOptions<io.restassured.response.ValidatableResponse,io.restassured.response.Response>
-
parser
public io.restassured.response.ValidatableResponse parser(String contentType, io.restassured.parsing.Parser parser)
- Specified by:
parser
in interfaceio.restassured.response.ValidatableResponseOptions<io.restassured.response.ValidatableResponse,io.restassured.response.Response>
-
defaultParser
public io.restassured.response.ValidatableResponse defaultParser(io.restassured.parsing.Parser parser)
- Specified by:
defaultParser
in interfaceio.restassured.response.ValidatableResponseOptions<io.restassured.response.ValidatableResponse,io.restassured.response.Response>
-
extract
public io.restassured.response.ExtractableResponse<io.restassured.response.Response> extract()
- Specified by:
extract
in interfaceio.restassured.response.ValidatableResponseOptions<io.restassured.response.ValidatableResponse,io.restassured.response.Response>
-
log
public io.restassured.response.ValidatableResponseLogSpec<io.restassured.response.ValidatableResponse,io.restassured.response.Response> log()
- Specified by:
log
in interfaceio.restassured.response.ValidatableResponseOptions<io.restassured.response.ValidatableResponse,io.restassured.response.Response>
-
time
public io.restassured.response.ValidatableResponse time(org.hamcrest.Matcher<Long> matcher)
- Specified by:
time
in interfaceio.restassured.response.ValidatableResponseOptions<io.restassured.response.ValidatableResponse,io.restassured.response.Response>
-
-