public static interface WebTestClient.ResponseSpec| 修飾子と型 | メソッドと説明 |
|---|---|
WebTestClient.BodyContentSpec | expectBody()byte[] のレスポンス本文を使用してデコードし、生のコンテンツにアサーションを適用します(例: |
<B> WebTestClient.BodySpec<B,?> | expectBody(ClassSE<B> bodyType) レスポンス本文を使用して型 <B> の単一オブジェクトにデコードし、アサーションを適用します。 |
<B> WebTestClient.BodySpec<B,?> | expectBody(ParameterizedTypeReference<B> bodyType) ジェネリクスを持つターゲット型に関する情報を受け入れる expectBody(Class) の代替。 |
<E> WebTestClient.ListBodySpec<E> | expectBodyList(ClassSE<E> elementType) レスポンス本体を消費して List<E> にデコードし、リスト固有のアサーションを適用します。 |
<E> WebTestClient.ListBodySpec<E> | expectBodyList(ParameterizedTypeReference<E> elementType) ジェネリクスを持つターゲット型に関する情報を受け入れる expectBodyList(Class) の代替。 |
CookieAssertions | expectCookie() レスポンスの Cookie に関するアサーション。 |
HeaderAssertions | expectHeader() レスポンスのヘッダーのアサーション。 |
StatusAssertions | expectStatus() レスポンスステータスに関するアサーション。 |
<T> FluxExchangeResult<T> | returnResult(ClassSE<T> elementClass) レスポンス本体を外部で消費するために、連鎖フローを終了します。 |
<T> FluxExchangeResult<T> | returnResult(ParameterizedTypeReference<T> elementTypeRef) ジェネリクスを持つターゲット型に関する情報を受け入れる returnResult(Class) の代替。 |
StatusAssertions expectStatus()
HeaderAssertions expectHeader()
CookieAssertions expectCookie()
<B> WebTestClient.BodySpec<B,?> expectBody(ClassSE<B> bodyType)
<B> の単一オブジェクトにデコードし、アサーションを適用します。bodyType - 予想されるボディ型 <B> WebTestClient.BodySpec<B,?> expectBody(ParameterizedTypeReference<B> bodyType)
expectBody(Class) の代替。<E> WebTestClient.ListBodySpec<E> expectBodyList(ClassSE<E> elementType)
List<E> にデコードし、リスト固有のアサーションを適用します。elementType - 期待されるリスト要素型 <E> WebTestClient.ListBodySpec<E> expectBodyList(ParameterizedTypeReference<E> elementType)
expectBodyList(Class) の代替。WebTestClient.BodyContentSpec expectBody()
byte[] にデコードし、未加工コンテンツにアサーションを適用します (例: isEmpty、JSONPath など。)<T> FluxExchangeResult<T> returnResult(ClassSE<T> elementClass)
StepVerifier 経由。Void.class が渡されると、レスポンス本体が消費されて解放されることに注意してください。コンテンツが予想されない場合は、代わりに .expectBody().isEmpty() を使用することを検討してください。これにより、コンテンツがないと主張されます。
<T> FluxExchangeResult<T> returnResult(ParameterizedTypeReference<T> elementTypeRef)
returnResult(Class) の代替。