クラス ModelAssert

java.lang.ObjectSE
org.assertj.core.api.AbstractAssert<SELF,ACTUAL>
org.assertj.core.api.AbstractObjectAssert<SELF,ACTUAL>
org.assertj.core.api.AbstractMapAssert< ModelAssertマップSE<文字列SEオブジェクトSE>、文字列SEオブジェクトSE>
org.springframework.test.web.servlet.assertj.ModelAssert
実装されたすべてのインターフェース:
org.assertj.core.api.Assert<ModelAssert,MapSE<StringSE,ObjectSE>>org.assertj.core.api.Descriptable<ModelAssert>org.assertj.core.api.EnumerableAssert<ModelAssert,Map.EntrySE<? extends StringSE,? extends ObjectSE>>org.assertj.core.api.ExtensionPoints<ModelAssert,MapSE<StringSE,ObjectSE>>

public class ModelAssert extends org.assertj.core.api.AbstractMapAssert<ModelAssert,MapSE<StringSE,ObjectSE>,StringSE,ObjectSE>
モデルに適用できる AssertJ アサーション。
導入:
6.2
作成者:
Stephane Nicoll
  • フィールドサマリー

    クラス org.assertj.core.api.AbstractAssert から継承されたフィールド

    actual, info, myself, objects, throwUnsupportedExceptionOnEquals
  • コンストラクターのサマリー

    コンストラクター
    コンストラクター
    説明
  • 方法の概要

    修飾子と型
    メソッド
    説明
    実際のモデルに指定された names の属性が含まれていること、およびこれらの属性にエラーがないことを確認します。
    実際のモデルにエラーがないことを確認します。
    指定された name をテスト対象オブジェクトとして BindingResult を使用する新しいアサーションオブジェクトを返します。
    実際のモデルに指定された names を持つ属性が含まれていること、およびこれらの各属性にそれぞれ少なくとも 1 つのエラーがあることを確認します。
    実際のモデルに少なくとも 1 つのエラーがあることを確認します。

    クラス org.assertj.core.api.AbstractMapAssert から継承されたメソッド

    allSatisfy, anySatisfy, as, as, contains, containsAllEntriesOf, containsAnyOf, containsAnyOfForProxy, containsEntry, containsExactly, containsExactlyEntriesOf, containsExactlyForProxy, containsExactlyInAnyOrderEntriesOf, containsForProxy, containsKey, containsKeys, containsKeysForProxy, containsOnly, containsOnlyForProxy, containsOnlyKeys, containsOnlyKeys, containsOnlyKeysForProxy, containsValue, containsValues, containsValuesForProxy, describedAs, describedAs, doesNotContain, doesNotContainEntry, doesNotContainForProxy, doesNotContainKey, doesNotContainKeys, doesNotContainKeysForProxy, doesNotContainValue, doesNotHave, doesNotHaveSameClassAs, extracting, extracting, extractingByKey, extractingByKey, extractingByKeys, extractingByKeysForProxy, extractingFromEntries, extractingFromEntries, extractingFromEntriesForProxy, flatExtracting, has, hasEntrySatisfying, hasEntrySatisfying, hasEntrySatisfying, hasEntrySatisfying, hasKeySatisfying, hasSameClassAs, hasSameSizeAs, hasSameSizeAs, hasSameSizeAs, hasSize, hasSizeBetween, hasSizeGreaterThan, hasSizeGreaterThanOrEqualTo, hasSizeLessThan, hasSizeLessThanOrEqualTo, hasToString, hasValueSatisfying, is, isEmpty, isEqualTo, isExactlyInstanceOf, isIn, isIn, isInstanceOf, isInstanceOfAny, isNot, isNotEmpty, isNotEqualTo, isNotExactlyInstanceOf, isNotIn, isNotIn, isNotInstanceOf, isNotInstanceOfAny, isNotNull, isNotOfAnyClassIn, isNotSameAs, isNullOrEmpty, isOfAnyClassIn, isSameAs, isUnmodifiable, noneSatisfy, overridingErrorMessage, size, usingComparator, usingComparator, usingDefaultComparator, usingDefaultElementComparator, usingElementComparator, usingRecursiveAssertion, usingRecursiveAssertion, usingRecursiveComparison, usingRecursiveComparison, values, withFailMessage, withThreadDumpOnError

    クラス org.assertj.core.api.AbstractObjectAssert から継承されたメソッド

    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

    クラス org.assertj.core.api.AbstractAssert から継承されたメソッド

    actual, areEqual, asInstanceOf, asList, assertionError, asString, descriptionText, doesNotHaveSameHashCodeAs, doesNotHaveToString, doesNotHaveToString, doesNotMatch, doesNotMatch, equals, extracting, extracting, failure, failureWithActualExpected, failWithActualExpectedAndMessage, failWithMessage, getWritableAssertionInfo, hashCode, hasSameHashCodeAs, hasToString, inBinary, inHexadecimal, isElementOfCustomAssert, isInstanceOfSatisfying, isNull, matches, matches, newListAssertInstance, overridingErrorMessage, satisfies, satisfies, satisfies, satisfiesAnyOf, satisfiesAnyOf, satisfiesAnyOfForProxy, satisfiesForProxy, setCustomRepresentation, setDescriptionConsumer, setPrintAssertionsDescription, throwAssertionError, usingEquals, usingEquals, withFailMessage, withRepresentation

    クラス java.lang.ObjectSE から継承されたメソッド

    clone, finalize, getClass, notify, notifyAll, toString, wait, waitSE, waitSE

    インターフェース org.assertj.core.api.Descriptable から継承されたメソッド

    as, describedAs
  • コンストラクターの詳細

  • メソッドの詳細

    • extractingBindingResult

      public AbstractBindingResultAssert<?> extractingBindingResult(StringSE name)
      指定された name をテスト対象オブジェクトとして BindingResult を使用する新しいアサーションオブジェクトを返します。

      例:

      
       // Check that the "person" attribute in the model has 2 errors:
       assertThat(...).model().extractingBindingResult("person").hasErrorsCount(2);
       
    • hasErrors

      public ModelAssert hasErrors()
      実際のモデルに少なくとも 1 つのエラーがあることを確認します。
    • doesNotHaveErrors

      public ModelAssert doesNotHaveErrors()
      実際のモデルにエラーがないことを確認します。
    • hasAttributeErrors

      public ModelAssert hasAttributeErrors(StringSE... names)
      実際のモデルに指定された names を持つ属性が含まれていること、およびこれらの各属性にそれぞれ少なくとも 1 つのエラーがあることを確認します。
      パラメーター:
      names - エラーのある属性の予想される名前
    • doesNotHaveAttributeErrors

      public ModelAssert doesNotHaveAttributeErrors(StringSE... names)
      実際のモデルに指定された names の属性が含まれていること、およびこれらの属性にエラーがないことを確認します。
      パラメーター:
      names - エラーのない属性の期待される名前