Class ModelAssert
- All Implemented Interfaces:
- org.assertj.core.api.Assert<ModelAssert,,- Map<String, - Object>> - org.assertj.core.api.Descriptable<ModelAssert>,- org.assertj.core.api.EnumerableAssert<ModelAssert,,- Map.Entry<? extends String, - ? extends Object>> - org.assertj.core.api.ExtensionPoints<ModelAssert,- Map<String, - Object>> 
public class ModelAssert
extends org.assertj.core.api.AbstractMapAssert<ModelAssert,Map<String,Object>,String,Object>    
AssertJ assertions that can be applied
 to a model.
- Since:
- 6.2
- Author:
- Stephane Nicoll
- 
Field SummaryFields inherited from class org.assertj.core.api.AbstractAssertactual, info, myself, objects, throwUnsupportedExceptionOnEquals
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptiondoesNotHaveAttributeErrors(String... names) Verify that the actual model contains the attributes with the givennames, and that none of these attributes has an error.Verify that the actual model does not have any errors.Return a new assertion object that uses theBindingResultwith the givennameas the object to test.hasAttributeErrors(String... names) Verify that the actual model contains the attributes with the givennames, and that each of these attributes has each at least one error.Verify that the actual model has at least one error.Methods inherited from class org.assertj.core.api.AbstractMapAssertallSatisfy, 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, withThreadDumpOnErrorMethods inherited from class org.assertj.core.api.AbstractObjectAssertdoesNotReturn, extracting, extracting, extracting, extracting, extracting, extracting, extractingForProxy, getComparatorsByType, hasAllNullFieldsOrProperties, hasAllNullFieldsOrPropertiesExcept, hasFieldOrProperty, hasFieldOrPropertyWithValue, hasNoNullFieldsOrProperties, hasNoNullFieldsOrPropertiesExcept, hasOnlyFields, isEqualToComparingFieldByField, isEqualToComparingFieldByFieldRecursively, isEqualToComparingOnlyGivenFields, isEqualToIgnoringGivenFields, isEqualToIgnoringNullFields, newObjectAssert, returns, usingComparatorForFields, usingComparatorForTypeMethods inherited from class org.assertj.core.api.AbstractAssertactual, 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, withRepresentationMethods inherited from class java.lang.Objectclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.assertj.core.api.Descriptableas, describedAs
- 
Constructor Details- 
ModelAssert
 
- 
- 
Method Details- 
extractingBindingResultReturn a new assertion object that uses theBindingResultwith the givennameas the object to test.Example: // Check that the "person" attribute in the model has 2 errors: assertThat(...).model().extractingBindingResult("person").hasErrorsCount(2);
- 
hasErrorsVerify that the actual model has at least one error.
- 
doesNotHaveErrorsVerify that the actual model does not have any errors.
- 
hasAttributeErrorsVerify that the actual model contains the attributes with the givennames, and that each of these attributes has each at least one error.- Parameters:
- names- the expected names of attributes with errors
 
- 
doesNotHaveAttributeErrorsVerify that the actual model contains the attributes with the givennames, and that none of these attributes has an error.- Parameters:
- names- the expected names of attributes without errors
 
 
-