类 StatusAssertions
java.lang.Object
cn.taketoday.test.web.reactive.server.StatusAssertions
Assertions on the response status.
- 从以下版本开始:
- 4.0
- 作者:
- Rossen Stoyanchev
- 另请参阅:
-
字段概要
字段 -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明private WebTestClient.ResponseSpecassertSeriesAndReturn(cn.taketoday.http.HttpStatus.Series expected) private WebTestClient.ResponseSpecassertStatusAndReturn(cn.taketoday.http.HttpStatusCode expected) private static StringgetReasonPhrase(cn.taketoday.http.HttpStatusCode statusCode) Assert 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(cn.taketoday.http.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.
-
字段详细资料
-
exchangeResult
-
responseSpec
-
-
构造器详细资料
-
StatusAssertions
StatusAssertions(ExchangeResult result, WebTestClient.ResponseSpec spec)
-
-
方法详细资料
-
isEqualTo
Assert the response status as anHttpStatusCode. -
isEqualTo
Assert the response status as an integer. -
isOk
Assert the response status code isHttpStatus.OK(200). -
isCreated
Assert the response status code isHttpStatus.CREATED(201). -
isAccepted
Assert the response status code isHttpStatus.ACCEPTED(202). -
isNoContent
Assert the response status code isHttpStatus.NO_CONTENT(204). -
isFound
Assert the response status code isHttpStatus.FOUND(302). -
isSeeOther
Assert the response status code isHttpStatus.SEE_OTHER(303). -
isNotModified
Assert the response status code isHttpStatus.NOT_MODIFIED(304). -
isTemporaryRedirect
Assert the response status code isHttpStatus.TEMPORARY_REDIRECT(307). -
isPermanentRedirect
Assert the response status code isHttpStatus.PERMANENT_REDIRECT(308). -
isBadRequest
Assert the response status code isHttpStatus.BAD_REQUEST(400). -
isUnauthorized
Assert the response status code isHttpStatus.UNAUTHORIZED(401). -
isForbidden
Assert the response status code isHttpStatus.FORBIDDEN(403). -
isNotFound
Assert the response status code isHttpStatus.NOT_FOUND(404). -
reasonEquals
Assert the response error message. -
getReasonPhrase
-
is1xxInformational
Assert the response status code is in the 1xx range. -
is2xxSuccessful
Assert the response status code is in the 2xx range. -
is3xxRedirection
Assert the response status code is in the 3xx range. -
is4xxClientError
Assert the response status code is in the 4xx range. -
is5xxServerError
Assert the response status code is in the 5xx range. -
value
Match the response status value with a Hamcrest matcher.- 参数:
matcher- the matcher to use
-
value
Consume the response status value as an integer.- 参数:
consumer- the consumer to use- 从以下版本开始:
- 4.0
-
assertStatusAndReturn
-
assertSeriesAndReturn
private WebTestClient.ResponseSpec assertSeriesAndReturn(cn.taketoday.http.HttpStatus.Series expected)
-