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, onFailMessage, parser, root, root, rootPath, rootPath, spec, status, statusCode, statusCode, statusLine, statusLine, time, time, usingclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitand, 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, onFailMessage, parser, root, root, rootPath, rootPath, spec, statusCode, statusCode, statusLine, statusLine, time, time, usingpublic 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)
ValidatableMockMvcResponseResultMatcher to match the response.
Note same as ValidatableMockMvcResponse.assertThat(org.springframework.test.web.servlet.ResultMatcher) but a different syntax.
expect in interface ValidatableMockMvcResponseresultMatcher - The result matcherValidatableMockMvcResponse instance.public ValidatableMockMvcResponse assertThat(org.springframework.test.web.servlet.ResultMatcher resultMatcher)
ValidatableMockMvcResponseResultMatcher matches the response.
Note same as ValidatableMockMvcResponse.expect(org.springframework.test.web.servlet.ResultMatcher) but a different syntax.
assertThat in interface ValidatableMockMvcResponseresultMatcher - The result matcherValidatableMockMvcResponse instance.public ValidatableMockMvcResponse apply(org.springframework.test.web.servlet.ResultHandler resultHandler, org.springframework.test.web.servlet.ResultHandler... resultHandlers)
ValidatableMockMvcResponseapply in interface ValidatableMockMvcResponseresultHandler - 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 ValidatableMockMvcResponseexpectedStatus - The expected status.public MockMvcResponse originalResponse()
originalResponse in class io.restassured.internal.ValidatableResponseOptionsImpl<ValidatableMockMvcResponse,MockMvcResponse>Copyright © 2010–2025. All rights reserved.