クラス AbstractHttpServletResponseAssert<R extends HttpServletResponseEE, SELF extends AbstractHttpServletResponseAssert<R,SELF,ACTUAL>, ACTUAL>
java.lang.ObjectSE
org.assertj.core.api.AbstractAssert<SELF,ACTUAL>
org.assertj.core.api.AbstractObjectAssert<SELF,ACTUAL>
org.springframework.test.web.servlet.assertj.AbstractHttpServletResponseAssert<R,SELF,ACTUAL>
- 型パラメーター:
R
-HttpServletResponse
EE の型SELF
- アサーションの種類ACTUAL
- アサートするオブジェクトの型
- 実装されたすべてのインターフェース:
org.assertj.core.api.Assert<SELF,
、ACTUAL> org.assertj.core.api.Descriptable<SELF>
、org.assertj.core.api.ExtensionPoints<SELF,
ACTUAL>
- 既知の直属サブクラス
AbstractMockHttpServletResponseAssert
public abstract class AbstractHttpServletResponseAssert<R extends HttpServletResponseEE, SELF extends AbstractHttpServletResponseAssert<R,SELF,ACTUAL>, ACTUAL>
extends org.assertj.core.api.AbstractObjectAssert<SELF,ACTUAL>
HttpServletResponse
EE を提供する任意のオブジェクトに適用できる基本 AssertJ アサーション。これにより、レスポンスアサーションへの直接アクセスが可能になると同時に、別のトップレベルオブジェクトへのアクセスも可能になります。- 導入:
- 6.2
- 作成者:
- Stephane Nicoll
フィールドのサマリー
クラス org.assertj.core.api.AbstractAssert から継承されたフィールド
actual, info, myself, objects, throwUnsupportedExceptionOnEquals
コンストラクターの概要
コンストラクターメソッドのサマリー
修飾子と型メソッド説明containsHeader
(StringSE name) レスポンスに指定されたname
のヘッダーが含まれていることを確認します。doesNotContainHeader
(StringSE name) レスポンスに指定されたname
のヘッダーが含まれていないことを確認します。protected abstract R
使用可能な場合は、使用するレスポンスを提供します。hasContentType
(StringSE contentType) レスポンスのContent-Type
が指定された文字列表現と等しいことを確認します。hasContentType
(MediaType contentType) レスポンスのContent-Type
が指定された値と等しいことを確認します。hasContentTypeCompatibleWith
(StringSE contentType) レスポンスのContent-Type
が指定された文字列表現と互換性があることを確認します。hasContentTypeCompatibleWith
(MediaType contentType) レスポンスのContent-Type
が指定された値と互換性があることを確認します。レスポンスに、指定されたname
とプライマリvalue
を含むヘッダーが含まれていることを確認します。hasStatus
(int status) HTTP ステータスが指定されたステータスコードと等しいことを確認します。hasStatus
(HttpStatus status) HTTP ステータスが指定されたステータスと等しいことを確認します。HTTP ステータスコードが 1xx の範囲内にあることを確認します。HTTP ステータスコードが 2xx の範囲内であることを確認します。HTTP ステータスコードが 3xx の範囲内にあることを確認します。HTTP ステータスコードが 4xx の範囲内にあることを確認します。HTTP ステータスコードが 5xx の範囲内にあることを確認します。HTTP ステータスがHttpStatus.OK
と等しいことを確認します。headers()
HttpHeaders
をテスト対象オブジェクトとして使用する新しいアサーションオブジェクトを返します。クラス org.assertj.core.api.AbstractObjectAssert から継承されたメソッド
as, as, doesNotReturn, extracting, extracting, extracting, extracting, extracting, extracting, extractingForProxy, getComparatorsByType, hasAllNullFieldsOrProperties, hasAllNullFieldsOrPropertiesExcept, hasFieldOrProperty, hasFieldOrPropertyWithValue, hasNoNullFieldsOrProperties, hasNoNullFieldsOrPropertiesExcept, hasOnlyFields, isEqualToComparingFieldByField, isEqualToComparingFieldByFieldRecursively, isEqualToComparingOnlyGivenFields, isEqualToIgnoringGivenFields, isEqualToIgnoringNullFields, newObjectAssert, returns, usingComparatorForFields, usingComparatorForType, usingRecursiveAssertion, usingRecursiveAssertion, usingRecursiveComparison, usingRecursiveComparison
クラス org.assertj.core.api.AbstractAssert から継承されたメソッド
actual, areEqual, asInstanceOf, asList, assertionError, asString, describedAs, descriptionText, doesNotHave, doesNotHaveSameClassAs, doesNotHaveSameHashCodeAs, doesNotHaveToString, doesNotHaveToString, doesNotMatch, doesNotMatch, equals, extracting, extracting, failure, failureWithActualExpected, failWithActualExpectedAndMessage, failWithMessage, getWritableAssertionInfo, has, hashCode, hasSameClassAs, hasSameHashCodeAs, hasToString, hasToString, inBinary, inHexadecimal, is, isElementOfCustomAssert, isEqualTo, isExactlyInstanceOf, isIn, isIn, isInstanceOf, isInstanceOfAny, isInstanceOfSatisfying, isNot, isNotEqualTo, isNotExactlyInstanceOf, isNotIn, isNotIn, isNotInstanceOf, isNotInstanceOfAny, isNotNull, isNotOfAnyClassIn, isNotSameAs, isNull, isOfAnyClassIn, isSameAs, matches, matches, newListAssertInstance, overridingErrorMessage, overridingErrorMessage, satisfies, satisfies, satisfies, satisfiesAnyOf, satisfiesAnyOf, satisfiesAnyOfForProxy, satisfiesForProxy, setCustomRepresentation, setDescriptionConsumer, setPrintAssertionsDescription, throwAssertionError, usingComparator, usingComparator, usingDefaultComparator, usingEquals, usingEquals, withFailMessage, withFailMessage, withRepresentation, withThreadDumpOnError
クラス java.lang.ObjectSE から継承されたメソッド
clone, finalize, getClass, notify, notifyAll, toString, wait, waitSE, waitSE
インターフェース org.assertj.core.api.Descriptable から継承されたメソッド
as, describedAs, describedAs
コンストラクターの詳細
AbstractHttpServletResponseAssert
メソッドの詳細
getResponse
使用可能な場合は、使用するレスポンスを提供します。リクエストの処理に失敗し、レスポンスが得られない場合は、
AssertionError
SE をスローします。- 戻り値:
- 使用するためのレスポンス
contentType
headers
テストするオブジェクトとしてHttpHeaders
を使用する新しいアサーションオブジェクトを返します。返されたアサーションオブジェクトは、ヘッダー名によってマップされたヘッダーを含む、すべての通常のマップアサーションを提供します。例:// Check for the presence of the Accept header: assertThat(response).headers().containsHeader(HttpHeaders.ACCEPT); // Check for the absence of the Content-Length header: assertThat(response).headers().doesNotContainsHeader(HttpHeaders.CONTENT_LENGTH);
hasContentType
hasContentType
hasContentTypeCompatibleWith
hasContentTypeCompatibleWith
containsHeader
doesNotContainHeader
hasHeader
hasStatus
HTTP ステータスが指定されたステータスコードと等しいことを確認します。- パラメーター:
status
- 予期される HTTP ステータスコード
hasStatus
HTTP ステータスが指定されたステータスと等しいことを確認します。- パラメーター:
status
- 予期される HTTP ステータスコード
hasStatusOk
hasStatus1xxInformational
hasStatus2xxSuccessful
hasStatus3xxRedirection
hasStatus4xxClientError
hasStatus5xxServerError