ObjectEnumerableAssert whose actual value type is
Collection.
| Modifier and Type | Field and Description |
|---|---|
| private static final String | |
| private TypeComparators | |
| private Map | |
| private TypeComparators | |
| protected Iterables |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public SELF | allMatch(Predicate<? super ELEMENT>
the given predicate)Predicate.Implements org. Predicate.
|
| public SELF | |
| public SELF | allSatisfy(Consumer<? super ELEMENT>
the given requirements)Consumer.Implements org. Consumer.
|
| public SELF | allSatisfy(ThrowingConsumer<? super ELEMENT>
the given requirements)ThrowingConsumer.Implements org. ThrowingConsumer.
|
| public SELF | anyMatch(Predicate<? super ELEMENT>
the given predicate)Predicate.Implements org. Predicate.
|
| public SELF | anySatisfy(Consumer<? super ELEMENT>
the given requirements)Consumer.Implements org. Consumer.
|
| public SELF | anySatisfy(ThrowingConsumer<? super ELEMENT>
the given requirements)ThrowingConsumer.Implements org. ThrowingConsumer.
|
| public SELF | are(Condition<? super ELEMENT>
the given condition. condition)Implements org. |
| public SELF | areAtLeast(int
the minimum number of times the condition should be verified. times, Condition<? super ELEMENT> the given condition. condition)Implements org. |
| public SELF | areAtLeastOne(Condition<? super ELEMENT>
the given condition. condition)Implements org. |
| public SELF | areAtMost(int
the number of times the condition should be at most verified. times, Condition<? super ELEMENT> the given condition. condition)Implements org. |
| public SELF | areExactly(int
the exact number of times the condition should be verified. times, Condition<? super ELEMENT> the given condition. condition)Implements org. |
| public SELF | areNot(Condition<? super ELEMENT>
the given condition. condition)Implements org. |
| public SELF | as(String
the new description to set. description, Object... optional parameter if description is a format String. args)Overrides default org. |
| public SELF | as(Description
the new description to set. description)Overrides default org. |
| private static void | |
| private static void | |
| private void | |
| public final SELF | contains(ELEMENT...
the given values. values)Implements org. |
| public SELF | containsAll(Iterable<? extends ELEMENT>
the given iterable)Iterable we will get elements from.Implements org. Iterable, in any order.
|
| public SELF | Returns: this assertion object.the iterable whose at least one element is expected to be in the iterable)Iterable under test.Implements org. Iterable under test contains at least one of the given Iterable elements.
|
| public final SELF | Returns: this assertion object.the values whose at least one which is expected to be in the values)Iterable under test.Implements org. Iterable contains at least one of the given values.
|
| protected SELF | |
| public final SELF | containsExactly(ELEMENT...
the given values. values)Implements org. |
| public SELF | containsExactlyElementsOf(Iterable<? extends ELEMENT>
the given iterable)Iterable we will get elements from.Implements org. containsExactly(Object. but handle the Iterable to array conversion : verifies that
actual contains exactly the elements of the given iterable and nothing else in the same order.
|
| protected SELF | |
| public final SELF | containsExactlyInAnyOrder(ELEMENT...
the given values. values)Implements org. |
| public SELF | containsExactlyInAnyOrderElementsOf(Iterable<? extends ELEMENT>
the given values. values)Implements org. |
| protected SELF | |
| protected SELF | |
| public SELF | containsNull()
Implements org. |
| public final SELF | containsOnly(ELEMENT...
the given values. values)Implements org. |
| public SELF | containsOnlyElementsOf(Iterable<? extends ELEMENT>
the given iterable)Iterable we will get elements from.Implements org.
Deprecated
Same semantic as containsOnly(Object[]) : verifies that actual contains all the elements of the given
iterable and nothing else, in any order and ignoring duplicates (i.e. once a value is found, its duplicates are also considered found).
|
| protected SELF | |
| public SELF | containsOnlyNulls()
Implements org. |
| public final SELF | containsOnlyOnce(ELEMENT...
the given values. values)Implements org. |
| public SELF | containsOnlyOnceElementsOf(Iterable<? extends ELEMENT>
the given iterable)Iterable we will get elements from.Implements org. containsOnlyOnce(Object. : verifies that the actual group contains the elements of
the given iterable only once.
|
| protected SELF | |
| public final SELF | containsSequence(ELEMENT...
the sequence of objects to look for. sequence)Implements org. |
| public SELF | containsSequence(Iterable<? extends ELEMENT>
the sequence of objects to look for. sequence)Implements org. |
| protected SELF | |
| public final SELF | containsSubsequence(ELEMENT...
the sequence of objects to look for. subsequence)Implements org. |
| public SELF | containsSubsequence(Iterable<? extends ELEMENT>
the sequence of objects to look for. subsequence)Implements org. |
| protected SELF | |
| public SELF | describedAs(Description
the new description to set. description)Overrides org. Implements org. |
| public SELF | describedAs(String
the new description to set. description, Object... optional parameter if description is a format String. args)Overrides default org. |
| public final SELF | doesNotContain(ELEMENT...
the given values. values)Implements org. |
| public SELF | doesNotContainAnyElementsOf(Iterable<? extends ELEMENT>
the iterable)Iterable whose elements must not be in the actual group.Implements org. Iterable (i.e. none).
|
| protected SELF | |
| public SELF | doesNotContainNull()
Implements org. |
| public final SELF | doesNotContainSequence(ELEMENT...
the sequence of objects to look for. sequence)Implements org. |
| public SELF | doesNotContainSequence(Iterable<? extends ELEMENT>
the sequence of objects to look for. sequence)Implements org. |
| protected SELF | |
| public final SELF | doesNotContainSubsequence(ELEMENT...
the sequence of objects to look for. subsequence)Implements org. |
| public SELF | doesNotContainSubsequence(Iterable<? extends ELEMENT>
the sequence of objects to look for. subsequence)Implements org. |
| protected SELF | |
| public SELF | doesNotHave(Condition<? super ACTUAL>
the given condition. condition)Overrides org. Implements org. |
| public SELF | Returns: this assertion object.the not expected types. unexpectedTypes)Implements org. Iterable do not have the specified types (including subclasses).
|
| public SELF | doesNotHaveDuplicates()
Implements org. |
| public SELF | doesNotHaveSameClassAs(Object
the object to check type against. other)Overrides org. Implements org. |
| private <V> AbstractListAssert | |
| public SELF | doNotHave(Condition<? super ELEMENT>
the given condition. condition)Implements org. |
| public ELEMENT_ASSERT | |
| public < the type of the resulting ASSERT extends AbstractAssertAssert | Returns: a new narrowedAssert instance for assertions chaining on the element at the given indexthe element's index index, InstanceOfAssertFactory<?, ASSERT> the factory which verifies the type and creates the new assertFactory)AssertNavigate and allow to perform assertions on the chosen element of the |
| public SELF | |
| public final SELF | endsWith(ELEMENT
the first element of the sequence of objects to look for. first, ELEMENT... the rest of the sequence of objects to look for. rest)Implements org. |
| public SELF | endsWith(ELEMENT[]
the sequence of objects to look for. sequence)Implements org. |
| protected SELF | |
| public AbstractListAssert | Returns: a new assertion object whose object under test is the list of extracted property/field values.the property/field to extract from the elements of the Iterable under test propertyOrField)Extract the values of the given field or property from the Iterable's elements under test into a new Iterable, this new Iterable becoming the Iterable under test. |
| public < the type of elements extracted. P> AbstractListAssert | Returns: a new assertion object whose object under test is the list of extracted property/field values.the property/field to extract from the Iterable under test propertyOrField, Class<P> type to return extractingType)Extract the values of given field or property from the Iterable's elements under test into a new Iterable, this new Iterable becoming the Iterable under test. |
| public AbstractListAssert | Returns: a new assertion object whose object under test is the list of Tuple with extracted properties/fields values as data.the properties/fields to extract from the elements of the Iterable under test propertiesOrFields)Extract the values of the given fields/properties from the Iterable's elements under test into a new Iterable composed of Tuples (a simple data structure), this new Iterable becoming the Iterable under test. |
| public < the type of elements extracted. V> AbstractListAssert | Returns: a new assertion object whose object under test is the list of values extractedthe object transforming input object to desired one extractor)Extract the values from Iterable's elements under test by applying an extracting function on them. |
| public < the type of elements extracted. V, the exception type of EXCEPTION extends Exception> AbstractListAssertThrowingExtractor | Returns: a new assertion object whose object under test is the list of values extractedthe object transforming input object to desired one extractor)Extract the values from Iterable's elements under test by applying an extracting function (which might throw an exception) on them. |
| public final AbstractListAssert | Returns: a new assertion object whose object under test is the list of Tuples containing the extracted values.the extractor functions to extract a value from an element of the Iterable under test. extractors)Use the given |
| protected AbstractListAssert | |
| public AbstractListAssert | Returns: a new assertion object whose object under test is the Iterable of extracted values.the name of the method which result is to be extracted from the array under test method)Extract the result of given method invocation on the Iterable's elements under test into a new Iterable, this new Iterable becoming the Iterable under test. |
| public < the type of elements extracted. P> AbstractListAssert | Returns: a new assertion object whose object under test is the Iterable of extracted values.the name of the method which result is to be extracted from the array under test method, Class<P> type of element of the extracted List extractedType)Extract the result of given method invocation on the Iterable's elements under test into a new list of the given class, this new List becoming the object under test. |
| public SELF | Returns: a new assertion object with the filtered iterable under testthe name of the property or field to read propertyOrFieldName, Object the value to compare element's property or field with expectedValue)Filters the iterable under test keeping only elements having a property or field equal to |
| public SELF | Returns: a new assertion object with the filtered iterable under testthe name of the property or field to read propertyOrFieldName, FilterOperator<?> the filter operator to apply filterOperator)Filters the iterable under test keeping only elements having a property or field matching the filter expressed with
the |
| public SELF | Returns: a new assertion object with the filtered iterable under testthe filter condition / predicate condition)Filters the iterable under test keeping only elements matching the given |
| public < result type of the filter function T> SELF | Returns: a new assertion object with the filtered iterable under testthe filter function function, T the expected value of the filter function expectedValue)Filters the iterable under test keeping only elements for which the result of the |
| public SELF | Returns: a new assertion object with the filtered iterable under testthe filter predicate predicate)Filters the iterable under test keeping only elements matching the given |
| public SELF | Returns: a new assertion object with the filtered iterable under testcontaining AssertJ assertions to filter on elementAssertions)Filters the iterable under test keeping only elements matching the given assertions specified with a |
| public SELF | Returns: a new assertion object with the filtered iterable under testcontaining AssertJ assertions to filter on elementAssertions)Filters the iterable under test keeping only elements matching the given assertions specified with a |
| public SELF | Returns: a new assertion object with the filtered iterable under testthe name of the property or field to read propertyOrFieldName)Filters the iterable under test keeping only elements whose property or field specified by
|
| public ELEMENT_ASSERT | |
| public < the type of the resulting ASSERT extends AbstractAssertAssert | Returns: a new narrowedAssert instance for assertions chaining on the first elementthe factory which verifies the type and creates the new assertFactory)AssertNavigate and allow to perform assertions on the first element of the |
| public < the type of extracted elements. V> AbstractListAssert | Returns: a new assertion object whose object under test is the list of values extractedthe extractor)Function transforming input object to an Iterable of desired onesExtracts Iterable elements values by applying a function and concatenates the result into a list that becomes the instance under test. |
| public < the type of extracted values. V, the exception type of EXCEPTION extends Exception> AbstractListAssertThrowingExtractor | Returns: a new assertion object whose object under test is the list of values extractedthe object transforming input object to an extractor)Iterable of desired onesExtracts Iterable elements values by applying a function (which might throw a checked exception) on them and concatenates/flattens the result into a single list that becomes the instance under test. |
| public final AbstractListAssert | Returns: a new assertion object whose object under test is a flattened list of all extracted values.all the extractors to apply on each actual extractors)Iterable's elementsExtracts multiple values from each |
| public final < the exception type of EXCEPTION extends Exception> AbstractListAssertThrowingExtractor | Returns: a new assertion object whose object under test is a flattened list of all extracted values.all the extractors to apply on each actual extractors)Iterable's elementsExtracts multiple values from each |
| public AbstractListAssert | Returns: a new assertion object whose object under test is the list of values extractedthe object transforming input object to an Iterable of desired ones fieldOrPropertyName)Extract Iterable's elements values corresponding to the given property/field name and concatenates them into a list becoming the new instance under test. |
| public AbstractListAssert | Returns: a new assertion object whose object under test is a flattened list of all extracted values.the field and/or property names to extract from each actual fieldOrPropertyNames)Iterable's elementExtract the given property/field values from each |
| protected AbstractListAssert | |
| public < the type of mapped elements. V> AbstractListAssert | Returns: a new assertion object whose object under test is the list of values extractedthe mapper)Function transforming input object to an Iterable of desired onesMaps the Iterable's elements under test by applying the given |
| public < the type of mapped values. V, the exception type of EXCEPTION extends Exception> AbstractListAssertThrowingExtractor | Returns: a new assertion object whose object under test is the list of values extractedthe object transforming input object to an mapper)Iterable of desired onesMaps the Iterable's elements under test by applying a mapping function (which might throw a checked exception) and concatenates/flattens the result into a single list that becomes the instance under test. |
| public final AbstractListAssert | Returns: a new assertion object whose object under test is a flattened list of all mapped values.all the mappers to apply on each actual mappers)Iterable's elementsMaps multiple values from each |
| public final < the exception type of EXCEPTION extends Exception> AbstractListAssertThrowingExtractor | Returns: a new assertion object whose object under test is a flattened list of all extracted values.all the mappers to apply on each actual mappers)Iterable's elementsMaps multiple values from each |
| protected TypeComparators | |
| protected TypeComparators | |
| public SELF | has(Condition<? super ACTUAL>
the given condition. condition)Overrides org. Implements org. |
| public SELF | Returns: this assertion object.the expected type. expectedType)Implements org. Iterable has the specified type (matching includes
subclasses of the given type).
|
| public SELF | hasExactlyElementsOfTypes(Class<?>...
the expected types types)Implements org. |
| public SELF | Returns: this assertion object.the expected type. expectedType)Implements org. Iterable have the specified type (matching includes
subclasses of the given type).
|
| public SELF | hasOnlyElementsOfTypes(Class<?>...
the expected types types)Implements org. |
| public SELF | hasOnlyOneElementSatisfying(Consumer<? super ELEMENT>
the assertions to perform on the unique element. elementAssertions)Implements org.
Deprecated
use
Verifies that the unique element of the singleElement() instead
Iterable satisfies the given assertions expressed as a Consumer,
if it does not, only the first error is reported, use SoftAssertions to get all the errors.
|
| public SELF | hasSameClassAs(Object
the object to check type against. other)Overrides org. Implements org. |
| public SELF | hasSameElementsAs(Iterable<? extends ELEMENT>
the Iterable whose elements we expect to be present iterable)Implements org. |
| public SELF | hasSameSizeAs(Object
the array to compare size with actual group. other)Implements org. |
| public SELF | hasSameSizeAs(Iterable<?>
the other)Iterable to compare size with actual group.Implements org. Iterable.
|
| public SELF | hasSize(int
the expected number of values in the actual group. expected)Implements org. |
| public SELF | Returns: this assertion object.the lower boundary compared to which actual size should be greater than or equal to. lowerBoundary, int the higher boundary compared to which actual size should be less than or equal to. higherBoundary)Implements org. |
| public SELF | Returns: this assertion object.the given value to compare the actual size to. boundary)Implements org. |
| public SELF | Returns: this assertion object.the given value to compare the actual size to. boundary)Implements org. |
| public SELF | Returns: this assertion object.the given value to compare the actual size to. boundary)Implements org. |
| public SELF | Returns: this assertion object.the given value to compare the actual size to. boundary)Implements org. |
| public SELF | hasToString(String
the expected String description of actual. expectedToString)Overrides org. Implements org. actual.toString() is equal to the given String.
|
| public SELF | have(Condition<? super ELEMENT>
the given condition. condition)Implements org. |
| public SELF | haveAtLeast(int
the minimum number of times the condition must hold. times, Condition<? super ELEMENT> the given condition. condition)Implements org. |
| public SELF | haveAtLeastOne(Condition<? super ELEMENT>
the given condition. condition)Implements org. |
| public SELF | haveAtMost(int
the maximum number of times the condition must hold. times, Condition<? super ELEMENT> the given condition. condition)Implements org. |
| public SELF | haveExactly(int
the exact number of times the condition must hold. times, Condition<? super ELEMENT> the given condition. condition)Implements org. |
| public SELF | Returns: this assertion object.Overrides org. |
| public SELF | Returns: this assertion object.Overrides org. |
| private SELF | |
| private SELF | |
| private ELEMENT_ASSERT | |
| private <V> AbstractListAssert | |
| private SELF | |
| private SELF | |
| private ELEMENT_ASSERT | |
| private ELEMENT_ASSERT | |
| private SELF | |
| private ELEMENT_ASSERT | |
| public SELF | is(Condition<? super ACTUAL>
the given condition. condition)Overrides org. Implements org. |
| public void | isEmpty()
Implements org. |
| public SELF | isEqualTo(Object
the given value to compare the actual value to. expected)Overrides org. Implements org. |
| public SELF | isExactlyInstanceOf(Class<?>
the type to check the actual value against. type)Overrides org. Implements org. |
| public SELF | isIn(Iterable<?>
the given iterable to search the actual value in. values)Overrides org. Implements org. |
| public SELF | isIn(Object...
the given array to search the actual value in. values)Overrides org. Implements org. |
| public SELF | isInstanceOf(Class<?>
the type to check the actual value against. type)Overrides org. Implements org. |
| public SELF | isInstanceOfAny(Class<?>...
the types to check the actual value against. types)Overrides org. Implements org. |
| public SELF | isNot(Condition<? super ACTUAL>
the given condition. condition)Overrides org. Implements org. |
| public SELF | isNotEmpty()
Implements org. |
| public SELF | isNotEqualTo(Object
the given value to compare the actual value to. other)Overrides org. Implements org. |
| public SELF | isNotExactlyInstanceOf(Class<?>
the type to check the actual value against. type)Overrides org. Implements org. |
| public SELF | isNotIn(Iterable<?>
the given iterable to search the actual value in. values)Overrides org. Implements org. |
| public SELF | isNotIn(Object...
the given array to search the actual value in. values)Overrides org. Implements org. |
| public SELF | isNotInstanceOf(Class<?>
the type to check the actual value against. type)Overrides org. Implements org. |
| public SELF | isNotInstanceOfAny(Class<?>...
the types to check the actual value against. types)Overrides org. Implements org. |
| public SELF | isNotNull()
Overrides org. Implements org. null.
|
| public SELF | isNotOfAnyClassIn(Class<?>...
the types to check the actual value against. types)Overrides org. Implements org. |
| public SELF | isNotSameAs(Object
the given value to compare the actual value to. other)Overrides org. Implements org. |
| public void | isNullOrEmpty()
Implements org. null or empty.
|
| public SELF | isOfAnyClassIn(Class<?>...
the types to check the actual value against. types)Overrides org. Implements org. |
| public SELF | isSameAs(Object
the given value to compare the actual value to. expected)Overrides org. Implements org. |
| public SELF | isSubsetOf(Iterable<? extends ELEMENT>
the values)Iterable that should contain all actual elements.Implements org. Iterable.
|
| public final SELF | isSubsetOf(ELEMENT...
the values that should be used for checking the elements of actual. values)Implements org. |
| protected SELF | |
| public ELEMENT_ASSERT | |
| public < the type of the resulting ASSERT extends AbstractAssertAssert | Returns: a new narrowedAssert instance for assertions chaining on the last elementthe factory which verifies the type and creates the new assertFactory)AssertNavigate and allow to perform assertions on the last element of the |
| private ELEMENT | |
| public < the type of elements resulting of the map operation. V> AbstractListAssert | Returns: a new assertion object whose object under test is the list of values extractedthe mapper)Function transforming input object to desired oneMaps the Iterable's elements under test by applying a mapping function, the resulting list becomes the instance under test. |
| public < the type of elements extracted. V, the exception type of EXCEPTION extends Exception> AbstractListAssertThrowingExtractor | Returns: a new assertion object whose object under test is the list of values extractedthe function transforming input object to desired one mapper)Maps the Iterable's elements by applying the given mapping function (which might throw an exception), the returned list becomes the instance under test. |
| public final AbstractListAssert | Returns: a new assertion object whose object under test is the list of Tuples containing the extracted values.the mapper functions to extract a value from an element of the Iterable under test. mappers)Use the given |
| protected String | |
| protected abstract SELF | Returns: concrete instance of AbstractIterableAssertthe iterable used to build the concrete instance of AbstractIterableAssert iterable)This methods is needed to build a new concrete instance of AbstractIterableAssert after a filtering operation is executed. |
| protected SELF | |
| private <V> AbstractListAssert | |
| public SELF | noneMatch(Predicate<? super ELEMENT>
the given predicate)Predicate.Implements org. Predicate.
|
| public SELF | noneSatisfy(Consumer<? super ELEMENT>
the given restrictions as restrictions)Consumer that no elements should met.Implements org. Consumer.
|
| public SELF | noneSatisfy(ThrowingConsumer<? super ELEMENT>
the given restrictions)ThrowingConsumer.Implements org. Consumer.
|
| public SELF | overridingErrorMessage(String
the error message that will replace the default one provided by Assertj. newErrorMessage, Object... the args used to fill error message as in args)String#format(String, Object..Overrides org. |
| private static String | |
| public final SELF | satisfiesExactly(Consumer<? super ELEMENT>...
the requirements to meet. requirements)Implements org. |
| public final SELF | satisfiesExactly(ThrowingConsumer<? super ELEMENT>...
the requirements to meet. requirements)Implements org. |
| protected SELF | |
| public final SELF | satisfiesExactlyInAnyOrder(Consumer<? super ELEMENT>...
the consumers that are expected to be satisfied by the elements of the given requirements)Iterable.Implements org. |
| public final SELF | satisfiesExactlyInAnyOrder(ThrowingConsumer<? super ELEMENT>...
the consumers that are expected to be satisfied by the elements of the given requirements)Iterable.Implements org. ThrowingConsumers in order (there must be as
many consumers as iterable elements and once a consumer is matched it cannot be reused to match other elements).
|
| protected SELF | |
| public SELF | satisfiesOnlyOnce(Consumer<? super ELEMENT>
the requirements)Consumer that is expected to be satisfied only once by the elements of the given Iterable.Implements org. Consumer.
|
| public SELF | satisfiesOnlyOnce(ThrowingConsumer<? super ELEMENT>
the requirements)ThrowingConsumer that is expected to be satisfied only once by the elements of the given Iterable.Implements org. ThrowingConsumer.
|
| protected SELF | |
| public ELEMENT_ASSERT | Returns: the assertion on the first elementVerifies that the |
| public < the type of the resulting ASSERT extends AbstractAssertAssert | Returns: a new narrowedAssert instance for assertions chaining on the single elementthe factory which verifies the type and creates the new assertFactory)AssertVerifies that the |
| public AbstractIterableSizeAssert | |
| public final SELF | startsWith(ELEMENT...
the sequence of objects to look for. sequence)Implements org. |
| protected SELF | |
| protected abstract ELEMENT_ASSERT | Returns: the assertion for the given elementthe element value value, String describes the element, ex: "check first element" for description)first(), used in assertion description.This method is used in navigating assertions like |
| public SELF | usingComparator(Comparator<? super ACTUAL>
the comparator to use for the incoming assertion checks. customComparator)Overrides org. Implements org. |
| public SELF | usingComparator(Comparator<? super ACTUAL>
the comparator to use for the incoming assertion checks. customComparator, String comparator description to be used in assertion error messages customComparatorDescription)Overrides org. Implements org. |
| public < the type of elements to compare. T> SELF | Returns: this assertions objectthe comparator, String... java. to usethe names of the properties and/or fields of the elements the comparator should be used for elementPropertyOrFieldNames)
Deprecated
This method is used with
Deprecated javadoc
usingFieldByFieldElementComparator() which is deprecated in favor of
usingRecursiveFieldByFieldElementComparator(RecursiveComparisonConfiguration) or usingRecursiveComparison().
Allows to set a comparator to compare properties or fields of elements with the given names. |
| public < the type of elements to compare. T> SELF | Returns: this assertions objectthe comparator, Class<T> java. to usethe type)java. of the type of the element fields the comparator should be used for
Deprecated
This method is used with
Deprecated javadoc
usingFieldByFieldElementComparator() which is deprecated in favor of
usingRecursiveFieldByFieldElementComparator(RecursiveComparisonConfiguration) or usingRecursiveComparison().
Allows to set a specific comparator to compare properties or fields of elements with the given type. |
| public < the type of elements to compare. T> SELF | Returns: this assertions objectthe comparator, Class<T> java. to usethe type)java. of the type of the element or element fields the comparator should be used forAllows to set a specific comparator for the given type of elements or their fields. |
| protected SELF | |
| public SELF | usingDefaultComparator()
Overrides org. Implements org. |
| public SELF | usingDefaultElementComparator()
Implements org. |
| public SELF | usingElementComparator(Comparator<? super ELEMENT>
the comparator to use for incoming assertion checks. elementComparator)Implements org. equals method to compare group
elements for incoming assertion checks.
|
| public SELF | Returns: this assertion object.the field names to exclude in the elements comparison. fields)
Deprecated
This method is deprecated because it performs a shallow field by field comparison, i.e. elements are
compared field by field but the fields are compared with equals, use
Deprecated javadoc
usingRecursiveFieldByFieldElementComparatorIgnoringFields(String. instead.
Use field/property by field/property comparison on all fields/properties except the given ones (including inherited
fields/properties) instead of relying on actual type A |
| public SELF | Returns: this assertion object.the fields/properties to compare using element comparators fields)
Deprecated
This method is deprecated because it performs a shallow field by field comparison, i.e. elements are
compared field by field but the fields are compared with equals, use
Deprecated javadoc
usingRecursiveFieldByFieldElementComparatorOnFields(String. instead.
Use field/property by field/property comparison on the given fields/properties only (including inherited
fields/properties) instead of relying on actual type A |
| private SELF | |
| public SELF | Returns: this assertion object.
Deprecated
This method is deprecated because it performs a shallow field by field comparison, i.e. elements are compared
field by field but the fields are compared with equals, use
Deprecated javadoc
usingRecursiveFieldByFieldElementComparator()
or usingRecursiveComparison() instead to perform a true recursive comparison.
Use field/property by field/property comparison (including inherited fields/properties) instead of relying on
actual type A |
| public RecursiveAssertionAssert | Returns: A new instance ofRecursiveAssertionAssert built with a default RecursiveAssertionConfiguration.Overrides org. Asserts that the given predicate is met for all fields of the object under test recursively (but not the object itself). |
| public RecursiveAssertionAssert | Returns: A new instance ofRecursiveAssertionAssert built with a default RecursiveAssertionConfiguration.The recursion configuration described above. recursiveAssertionConfiguration)Overrides org. The same as |
| public RecursiveComparisonAssert | Returns: a newRecursiveComparisonAssert instanceOverrides org. RecursiveComparisonAssert,
There are differences between this approach and
|
| public RecursiveComparisonAssert | Returns: a newRecursiveComparisonAssert instance built with the given RecursiveComparisonConfiguration.the recursiveComparisonConfiguration)RecursiveComparisonConfiguration used in the chained isEqualTo assertion.Overrides org. usingRecursiveComparison() but allows to specify your own RecursiveComparisonConfiguration.
|
| public SELF | Returns: this assertion object.Enable using a recursive field by field comparison strategy similar to |
| public SELF | Returns: this assertion object.the recursive comparison configuration. configuration)Enable using a recursive field by field comparison strategy similar to |
| public SELF | Returns: this assertion object.the field names to exclude in the elements comparison. fields)The assertions chained after this method will use a recursive field by field comparison on all fields (including inherited
fields) except the given ones instead of relying on the element |
| public SELF | Returns: this assertion object.the field names to exclude in the elements comparison. fields)The assertions chained after this method will use a recursive field by field comparison on the given fields (including
inherited fields) instead of relying on the element |
| pack-priv SELF | withAssertionState(AbstractAssert<SELF extends AbstractAssert<SELF, ACTUAL>, ACTUAL> assertInstance)
Overrides org. |
| pack-priv SELF | withComparatorsForElementPropertyOrFieldNames(Map<String, Comparator<?>> comparatorsForElementPropertyOrFieldNames)
|
| pack-priv SELF | withComparatorsForElementPropertyOrFieldTypes(TypeComparators comparatorsForElementPropertyOrFieldTypes)
|
| public SELF | withFailMessage(String
the error message that will replace the default one provided by Assertj. newErrorMessage, Object... the args used to fill error message as in args)String#format(String, Object..Overrides org. AbstractAssert#overridingErrorMessage
You must set it before calling the assertion otherwise it is ignored as the failing assertion breaks the chained call by throwing an AssertionError. |
| pack-priv SELF | |
| public SELF | withThreadDumpOnError()
Overrides org. Implements org. System#err.
|
| pack-priv SELF | |
| public < the type of the other iterable elements. OTHER_ELEMENT> SELF | Returns: this assertion object.the iterable to zip actual with. other, BiConsumer<? super ELEMENT, OTHER_ELEMENT> the given requirements that each pair must satisfy. zipRequirements)Verifies that the zipped pairs of actual and other elements, i.e: (actual 1st element, other 1st element), (actual 2nd element, other 2nd element), ... |