Class StatusAssertions
java.lang.Object
org.springframework.test.web.reactive.server.StatusAssertions
Assertions on the response status.
- Since:
- 5.0
- Author:
- Rossen Stoyanchev
- See Also:
- 
Method SummaryModifier and TypeMethodDescriptionAssert the response status code is in the 1xx range.Assert the response status code is in the 2xx range.Assert the response status code is in the 3xx range.Assert the response status code is in the 4xx range.Assert the response status code is in the 5xx range.Assert the response status code isHttpStatus.ACCEPTED(202).Assert the response status code isHttpStatus.BAD_REQUEST(400).Assert the response status code isHttpStatus.CREATED(201).isEqualTo(int status) Assert the response status as an integer.isEqualTo(HttpStatusCode status) Assert the response status as anHttpStatusCode.Assert the response status code isHttpStatus.FORBIDDEN(403).isFound()Assert the response status code isHttpStatus.FOUND(302).Assert the response status code isHttpStatus.NO_CONTENT(204).Assert the response status code isHttpStatus.NOT_FOUND(404).Assert the response status code isHttpStatus.NOT_MODIFIED(304).isOk()Assert the response status code isHttpStatus.OK(200).Assert the response status code isHttpStatus.PERMANENT_REDIRECT(308).Assert the response status code isHttpStatus.SEE_OTHER(303).Assert the response status code isHttpStatus.TEMPORARY_REDIRECT(307).Assert the response status code isHttpStatus.UNAUTHORIZED(401).reasonEquals(String reason) Assert the response error message.Consume the response status value as an integer.Match the response status value with a Hamcrest matcher.
- 
Method Details- 
isEqualToAssert the response status as anHttpStatusCode.
- 
isEqualToAssert the response status as an integer.
- 
isOkAssert the response status code isHttpStatus.OK(200).
- 
isCreatedAssert the response status code isHttpStatus.CREATED(201).
- 
isAcceptedAssert the response status code isHttpStatus.ACCEPTED(202).
- 
isNoContentAssert the response status code isHttpStatus.NO_CONTENT(204).
- 
isFoundAssert the response status code isHttpStatus.FOUND(302).
- 
isSeeOtherAssert the response status code isHttpStatus.SEE_OTHER(303).
- 
isNotModifiedAssert the response status code isHttpStatus.NOT_MODIFIED(304).
- 
isTemporaryRedirectAssert the response status code isHttpStatus.TEMPORARY_REDIRECT(307).
- 
isPermanentRedirectAssert the response status code isHttpStatus.PERMANENT_REDIRECT(308).
- 
isBadRequestAssert the response status code isHttpStatus.BAD_REQUEST(400).
- 
isUnauthorizedAssert the response status code isHttpStatus.UNAUTHORIZED(401).
- 
isForbiddenAssert the response status code isHttpStatus.FORBIDDEN(403).- Since:
- 5.0.2
 
- 
isNotFoundAssert the response status code isHttpStatus.NOT_FOUND(404).
- 
reasonEqualsAssert the response error message.
- 
is1xxInformationalAssert the response status code is in the 1xx range.
- 
is2xxSuccessfulAssert the response status code is in the 2xx range.
- 
is3xxRedirectionAssert the response status code is in the 3xx range.
- 
is4xxClientErrorAssert the response status code is in the 4xx range.
- 
is5xxServerErrorAssert the response status code is in the 5xx range.
- 
valueMatch the response status value with a Hamcrest matcher.- Parameters:
- matcher- the matcher to use
- Since:
- 5.1
 
- 
valueConsume the response status value as an integer.- Parameters:
- consumer- the consumer to use
- Since:
- 5.1
 
 
-