public class ValidatableMockMvcResponseImpl extends io.restassured.internal.ValidatableResponseOptionsImpl<ValidatableMockMvcResponse,MockMvcResponse> implements ValidatableMockMvcResponse
Constructor and Description |
---|
ValidatableMockMvcResponseImpl(org.springframework.test.web.servlet.ResultActions resultActions,
String contentType,
io.restassured.internal.ResponseParserRegistrar rpr,
io.restassured.config.RestAssuredConfig config,
MockMvcResponse response,
io.restassured.response.ExtractableResponse<MockMvcResponse> extractableResponse,
io.restassured.internal.log.LogRepository logRepository) |
Modifier and Type | Method and Description |
---|---|
ValidatableMockMvcResponse |
apply(org.springframework.test.web.servlet.ResultHandler resultHandler,
org.springframework.test.web.servlet.ResultHandler... resultHandlers)
Apply one or more result handlers.
|
ValidatableMockMvcResponse |
assertThat(org.springframework.test.web.servlet.ResultMatcher resultMatcher)
Assert that a
ResultMatcher matches the response. |
ValidatableMockMvcResponse |
expect(org.springframework.test.web.servlet.ResultMatcher resultMatcher)
Expect a
ResultMatcher to match the response. |
MockMvcResponse |
originalResponse() |
ValidatableMockMvcResponse |
status(org.springframework.http.HttpStatus expectedStatus)
Validate that the response status matches an Spring-Framework HttpStatus.
|
all, all, and, appendRootPath, appendRootPath, assertThat, body, body, body, body, body, body, body, body, body, content, contentType, contentType, contentType, cookie, cookie, cookie, cookie, cookies, cookies, cookies, defaultParser, detachRootPath, everything, everything, extract, header, header, header, header, headers, headers, headers, ifError, ifStatusCodeIsEqualTo, ifStatusCodeMatches, ifValidationFails, ifValidationFails, ifValidationFails, log, noRoot, noRootPath, parser, root, root, rootPath, rootPath, spec, status, statusCode, statusCode, statusLine, statusLine, time, time, using
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
and, appendRoot, appendRoot, appendRootPath, appendRootPath, assertThat, body, body, body, body, body, body, body, contentType, contentType, contentType, cookie, cookie, cookie, cookie, cookies, cookies, defaultParser, detachRoot, detachRootPath, extract, header, header, header, header, headers, headers, log, noRoot, noRootPath, parser, root, root, rootPath, rootPath, spec, statusCode, statusCode, statusLine, statusLine, time, time, using
public ValidatableMockMvcResponseImpl(org.springframework.test.web.servlet.ResultActions resultActions, String contentType, io.restassured.internal.ResponseParserRegistrar rpr, io.restassured.config.RestAssuredConfig config, MockMvcResponse response, io.restassured.response.ExtractableResponse<MockMvcResponse> extractableResponse, io.restassured.internal.log.LogRepository logRepository)
public ValidatableMockMvcResponse expect(org.springframework.test.web.servlet.ResultMatcher resultMatcher)
ValidatableMockMvcResponse
ResultMatcher
to match the response.
Note same as ValidatableMockMvcResponse.assertThat(org.springframework.test.web.servlet.ResultMatcher)
but a different syntax.
expect
in interface ValidatableMockMvcResponse
resultMatcher
- The result matcherValidatableMockMvcResponse
instance.public ValidatableMockMvcResponse assertThat(org.springframework.test.web.servlet.ResultMatcher resultMatcher)
ValidatableMockMvcResponse
ResultMatcher
matches the response.
Note same as ValidatableMockMvcResponse.expect(org.springframework.test.web.servlet.ResultMatcher)
but a different syntax.
assertThat
in interface ValidatableMockMvcResponse
resultMatcher
- The result matcherValidatableMockMvcResponse
instance.public ValidatableMockMvcResponse apply(org.springframework.test.web.servlet.ResultHandler resultHandler, org.springframework.test.web.servlet.ResultHandler... resultHandlers)
ValidatableMockMvcResponse
apply
in interface ValidatableMockMvcResponse
resultHandler
- The first result handlerresultHandlers
- Additional result handlers to add (optional)ValidatableMockMvcResponse
instance.public ValidatableMockMvcResponse status(org.springframework.http.HttpStatus expectedStatus)
ValidatableMockMvcResponse
get("/something").then().assertThat().status(HttpStatus.OK);
status
in interface ValidatableMockMvcResponse
expectedStatus
- The expected status.public MockMvcResponse originalResponse()
originalResponse
in class io.restassured.internal.ValidatableResponseOptionsImpl<ValidatableMockMvcResponse,MockMvcResponse>
Copyright © 2010–2019. All rights reserved.