| Package | Description |
|---|---|
| org.assertj.core.api |
| Modifier and Type | Class and Description |
|---|---|
class |
Assertions
Entry point for assertion methods for different types.
|
class |
AssertionsForClassTypes
Java 8 is picky when choosing the right
assertThat method if the object under test is generic and bounded,
for example if foo is instance of T that extends Exception, java 8 will complain that it can't resolve
the proper assertThat method (normally assertThat(Throwable) as foo might implement an interface like List,
if that occurred assertThat(List) would also be a possible choice - thus confusing java 8. |
class |
AssertionsForInterfaceTypes
Entry point for assertion methods for different data types.
|
class |
Assumptions
Entry point for assumption methods for different types, which allow to skip test execution on failed assumptions.
|
class |
BDDAssertions
Behavior-driven development style entry point for assertion methods for different types.
|
class |
BDDAssumptions
Behavior-driven development style entry point for assumption methods for different types, which allow to skip test execution when assumptions are not met.
|
interface |
BDDSoftAssertionsProvider |
class |
Java6Assertions
Deprecated.
For Android compatible assertions use the latest assertj 2.x version which is based on Java 7 only.
Assertions compatible with Android. Duplicated from |
class |
Java6BDDAssertions
Deprecated.
For Android compatible assertions use the latest assertj 2.x version which is based on Java 7 only.
Android-compatible BDD-style assertions duplicated from |
interface |
Java6BDDSoftAssertionsProvider
AbstractBDDSoftAssertions compatible with Android.
|
interface |
Java6StandardSoftAssertionsProvider
AbstractStandardSoftAssertions compatible with Android.
|
interface |
StandardSoftAssertionsProvider |
interface |
WithAssertions
A unified entry point to all non-deprecated assertions from both the new Java 8 core API and the pre-Java 8 core API.
|
interface |
WithAssumptions
A unified entry point to all assumptions from both the new Java 8 core API and the pre-Java 8 core API.
|
| Modifier and Type | Method and Description |
|---|---|
AtomicReferenceArrayAssert<T> |
AtomicReferenceArrayAssert.as(Description description) |
SELF |
AbstractObjectAssert.as(Description description) |
SELF |
AbstractMapAssert.as(Description description) |
SELF |
AbstractListAssert.as(Description description) |
SELF |
AbstractIterableAssert.as(Description description) |
AtomicReferenceArrayAssert<T> |
AtomicReferenceArrayAssert.as(String description,
Object... args) |
SELF |
AbstractObjectAssert.as(String description,
Object... args) |
SELF |
AbstractMapAssert.as(String description,
Object... args) |
SELF |
AbstractListAssert.as(String description,
Object... args) |
SELF |
AbstractIterableAssert.as(String description,
Object... args) |
AbstractByteArrayAssert<?> |
AbstractStringAssert.asBase64Decoded()
Decodes the actual value as a Base64 encoded string, the decoded bytes becoming the new array under test.
|
AbstractStringAssert<?> |
AbstractByteArrayAssert.asBase64Encoded()
Encodes the actual array into a Base64 string, the encoded string becoming the new object under test.
|
AbstractStringAssert<?> |
AbstractByteArrayAssert.asHexString()
Converts the actual byte array under test to an hexadecimal String and returns assertions for the computed String
allowing String specific assertions from this call.
|
<ASSERT extends AbstractAssert<?,?>> |
AbstractAssert.asInstanceOf(InstanceOfAssertFactory<?,ASSERT> instanceOfAssertFactory)
Uses an
InstanceOfAssertFactory to verify that the actual value is an instance of a given type and to produce
a new Assert narrowed to that type. |
AbstractListAssert<?,List<?>,Object,ObjectAssert<Object>> |
AbstractAssert.asList()
Verifies that the actual value is an instance of List,
and returns a list assertion, to allow chaining of list-specific
assertions from this call.
|
AbstractStringAssert<?> |
AbstractByteArrayAssert.asString()
Converts the actual byte[] under test to a String and returns assertions for the computed String
allowing String specific assertions from this call.
|
AbstractStringAssert<?> |
AbstractAssert.asString()
Returns a String assertion for the
toString() of the actual
value, to allow chaining of String-specific assertions from this call. |
AbstractStringAssert<?> |
AbstractInputStreamAssert.asString(Charset charset)
Converts the content of the actual
InputStream to a String by decoding its bytes using the given charset
and returns assertions for the computed String allowing String specific assertions from this call. |
AbstractStringAssert<?> |
AbstractByteArrayAssert.asString(Charset charset)
Converts the actual byte[] under test to a String by decoding the specified bytes using the given charset
and returns assertions for the computed String
allowing String specific assertions from this call.
|
AbstractByteArrayAssert<?> |
AbstractStringAssert.decodedAsBase64()
Deprecated.
use
AbstractStringAssert.asBase64Decoded() instead.
Decodes the actual value as a Base64 encoded string, the decoded bytes becoming the new array under test. Examples: |
ThrowableTypeAssert<T> |
ThrowableTypeAssert.describedAs(Description description)
Sets the description of the assertion that is going to be called after.
|
ThrowableAssertAlternative<ACTUAL> |
ThrowableAssertAlternative.describedAs(Description description)
Sets the description of the assertion that is going to be called after.
|
SoftThrowableTypeAssert<T> |
SoftThrowableTypeAssert.describedAs(Description description) |
NotThrownAssert |
NotThrownAssert.describedAs(Description description)
Sets the description of the assertion that is going to be called after.
|
SELF |
AbstractMapAssert.describedAs(Description description) |
SELF |
AbstractListAssert.describedAs(Description description) |
SELF |
AbstractIterableAssert.describedAs(Description description) |
SELF |
AbstractAssert.describedAs(Description description)
Sets the description of the assertion that is going to be called after.
|
ThrowableAssertAlternative<ACTUAL> |
ThrowableAssertAlternative.describedAs(String description,
Object... args)
Sets the description of the assertion that is going to be called after.
|
SELF |
AbstractMapAssert.describedAs(String description,
Object... args) |
SELF |
AbstractListAssert.describedAs(String description,
Object... args) |
SELF |
AbstractIterableAssert.describedAs(String description,
Object... args) |
ELEMENT_ASSERT |
AbstractIterableAssert.element(int index)
Navigate and allow to perform assertions on the chosen element of the
Iterable under test. |
<ASSERT extends AbstractAssert<?,?>> |
AbstractIterableAssert.element(int index,
InstanceOfAssertFactory<?,ASSERT> assertFactory)
Navigate and allow to perform assertions on the chosen element of the
Iterable under test. |
SELF |
AbstractIterableAssert.elements(int... indices)
Allow to perform assertions on the elements corresponding to the given indices
(the iterable
Iterable under test is changed to an iterable with the selected elements). |
AbstractStringAssert<?> |
AbstractByteArrayAssert.encodedAsBase64()
Deprecated.
use
AbstractByteArrayAssert.asBase64Encoded() instead.
Encodes the actual array into a Base64 string, the encoded string becoming the new object under test. Examples: |
AbstractListAssert<?,List<?>,Object,ObjectAssert<Object>> |
AbstractObjectAssert.extracting(Function<? super ACTUAL,?>... extractors)
Uses the given
Functions to extract the values from the object under test into a list, this new list becoming
the object under test. |
protected <T,ASSERT extends AbstractAssert<?,?>> |
AbstractAssert.extracting(Function<? super ACTUAL,? extends T> extractor,
AssertFactory<T,ASSERT> assertFactory)
Uses the given
Function to extract a value from the object under test and creates a new assertion object
using the given assert factory. |
<T> AbstractObjectAssert<?,T> |
AbstractObjectAssert.extracting(Function<? super ACTUAL,T> extractor)
Uses the given
Function to extract a value from the object under test, the extracted value becoming the new object under test. |
<T,ASSERT extends AbstractAssert<?,?>> |
AbstractObjectAssert.extracting(Function<? super ACTUAL,T> extractor,
InstanceOfAssertFactory<?,ASSERT> assertFactory)
Uses the given
Function to extract a value from the object under test, the extracted value becoming the new object under test. |
AbstractListAssert<?,List<? extends Tuple>,Tuple,ObjectAssert<Tuple>> |
AbstractObjectArrayAssert.extracting(Function<? super ELEMENT,?>... extractors)
|
AbstractListAssert<?,List<? extends Tuple>,Tuple,ObjectAssert<Tuple>> |
AbstractIterableAssert.extracting(Function<? super ELEMENT,?>... extractors)
|
<U> AbstractListAssert<?,List<? extends U>,U,ObjectAssert<U>> |
AbstractObjectArrayAssert.extracting(Function<? super ELEMENT,U> extractor)
Extract the values from the array's elements by applying an extracting function on them, the resulting list becomes
the new object under test.
|
<V> AbstractListAssert<?,List<? extends V>,V,ObjectAssert<V>> |
AbstractIterableAssert.extracting(Function<? super ELEMENT,V> extractor)
Extract the values from Iterable's elements under test by applying an extracting function on them.
|
<U> ObjectArrayAssert<U> |
AtomicReferenceArrayAssert.extracting(Function<? super T,U> extractor)
Extract the values from the array's elements by applying an extracting function on them.
|
AbstractListAssert<?,List<?>,Object,ObjectAssert<Object>> |
AbstractMapAssert.extracting(Object... keys)
Deprecated.
use
AbstractMapAssert.extractingByKeys(Object[]) instead |
AbstractObjectAssert<?,?> |
AbstractMapAssert.extracting(Object key)
Deprecated.
use
AbstractMapAssert.extractingByKey(Object) instead |
ObjectArrayAssert<Tuple> |
AtomicReferenceArrayAssert.extracting(String... propertiesOrFields)
Extract the values of given fields/properties from the array's elements under test into a new array composed of
Tuple (a simple data structure), this new array becoming the array under test.
|
AbstractListAssert<?,List<?>,Object,ObjectAssert<Object>> |
AbstractObjectAssert.extracting(String... propertiesOrFields)
Extracts the values of given fields/properties from the object under test into a list, this new list becoming
the object under test.
|
AbstractListAssert<?,List<? extends Tuple>,Tuple,ObjectAssert<Tuple>> |
AbstractObjectArrayAssert.extracting(String... propertiesOrFields)
Extract the values of given fields/properties from the array's elements under test into a list composed of
Tuple (a simple data structure), this new list becoming the object under test.
|
AbstractListAssert<?,List<? extends Tuple>,Tuple,ObjectAssert<Tuple>> |
AbstractIterableAssert.extracting(String... 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.
|
ObjectArrayAssert<Object> |
AtomicReferenceArrayAssert.extracting(String fieldOrProperty)
Extract the values of given field or property from the array's elements under test into a new array, this new array
becoming the array under test.
|
AbstractObjectAssert<?,?> |
AbstractObjectAssert.extracting(String propertyOrField)
Extracts the value of given field/property from the object under test, the extracted value becoming the new object under test.
|
AbstractListAssert<?,List<? extends Object>,Object,ObjectAssert<Object>> |
AbstractObjectArrayAssert.extracting(String fieldOrProperty)
Extract the values of given field or property from the array's elements under test into a new list, this new list
becoming the object under test.
|
AbstractListAssert<?,List<? extends Object>,Object,ObjectAssert<Object>> |
AbstractIterableAssert.extracting(String 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.
|
protected <ASSERT extends AbstractAssert<?,?>> |
AbstractAssert.extracting(String propertyOrField,
AssertFactory<Object,ASSERT> assertFactory)
Extracts the value of given field/property from the object under test and creates a new assertion object using the
given assert factory.
|
<P> ObjectArrayAssert<P> |
AtomicReferenceArrayAssert.extracting(String fieldOrProperty,
Class<P> extractingType)
Extract the values of given field or property from the array's elements under test into a new array, this new array
becoming the array under test with type.
|
<P> AbstractListAssert<?,List<? extends P>,P,ObjectAssert<P>> |
AbstractObjectArrayAssert.extracting(String fieldOrProperty,
Class<P> extractingType)
Extract the values of given field or property from the array's elements under test into a new list, this new list of the provided type
becoming the object under test.
|
<P> AbstractListAssert<?,List<? extends P>,P,ObjectAssert<P>> |
AbstractIterableAssert.extracting(String propertyOrField,
Class<P> 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.
|
<ASSERT extends AbstractAssert<?,?>> |
AbstractObjectAssert.extracting(String propertyOrField,
InstanceOfAssertFactory<?,ASSERT> assertFactory)
Extracts the value of given field/property from the object under test, the extracted value becoming the new object under test.
|
<V,EXCEPTION extends Exception> |
AbstractObjectArrayAssert.extracting(ThrowingExtractor<? super ELEMENT,V,EXCEPTION> extractor)
Extract the values from the array's elements by applying an extracting function (which might throw an exception)
on them, the resulting list of extracted values becomes a new object under test.
|
<V,EXCEPTION extends Exception> |
AbstractIterableAssert.extracting(ThrowingExtractor<? super ELEMENT,V,EXCEPTION> extractor)
Extract the values from Iterable's elements under test by applying an extracting function (which might throw an
exception) on them.
|
<U,EXCEPTION extends Exception> |
AtomicReferenceArrayAssert.extracting(ThrowingExtractor<? super T,U,EXCEPTION> extractor)
Extract the values from the array's elements by applying an extracting function (which might throw an
exception) on them.
|
AbstractObjectAssert<?,V> |
AbstractMapAssert.extractingByKey(K key)
Extract the value of given key from the map under test, the extracted value becoming the new object under test.
|
<ASSERT extends AbstractAssert<?,?>> |
AbstractMapAssert.extractingByKey(K key,
InstanceOfAssertFactory<?,ASSERT> assertFactory)
Extract the value of given key from the map under test, the extracted value becoming the new object under test.
|
AbstractListAssert<?,List<? extends V>,V,ObjectAssert<V>> |
AbstractMapAssert.extractingByKeys(K... keys)
Extract the values of given keys from the map under test into an array, this new array becoming
the object under test.
|
AbstractListAssert<?,List<? extends Tuple>,Tuple,ObjectAssert<Tuple>> |
AbstractMapAssert.extractingFromEntries(Function<? super Map.Entry<K,V>,Object>... extractors)
|
AbstractListAssert<?,List<?>,Object,ObjectAssert<Object>> |
AbstractMapAssert.extractingFromEntries(Function<? super Map.Entry<K,V>,Object> extractor)
|
ObjectArrayAssert<Object> |
AtomicReferenceArrayAssert.extractingResultOf(String method)
Extract the result of given method invocation from the array's elements under test into a new array, this new array
becoming the array under test.
|
AbstractListAssert<?,List<? extends Object>,Object,ObjectAssert<Object>> |
AbstractObjectArrayAssert.extractingResultOf(String method)
Extract the result of given method invocation from the array's elements under test into a list, this list becoming
the object under test.
|
AbstractListAssert<?,List<? extends Object>,Object,ObjectAssert<Object>> |
AbstractIterableAssert.extractingResultOf(String 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.
|
<P> ObjectArrayAssert<P> |
AtomicReferenceArrayAssert.extractingResultOf(String method,
Class<P> extractingType)
Extract the result of given method invocation from the array's elements under test into a new array, this new array
becoming the array under test.
|
<P> AbstractListAssert<?,List<? extends P>,P,ObjectAssert<P>> |
AbstractObjectArrayAssert.extractingResultOf(String method,
Class<P> extractingType)
Extract the result of given method invocation from the array's elements under test into a list, this list becoming
the object under test.
|
<P> AbstractListAssert<?,List<? extends P>,P,ObjectAssert<P>> |
AbstractIterableAssert.extractingResultOf(String method,
Class<P> 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.
|
SELF |
AbstractObjectArrayAssert.filteredOn(Condition<? super ELEMENT> condition)
Filter the array under test into a list composed of the elements matching the given
Condition,
allowing to perform assertions on the filtered list. |
SELF |
AbstractIterableAssert.filteredOn(Condition<? super ELEMENT> condition)
Filters the iterable under test keeping only elements matching the given
Condition. |
AtomicReferenceArrayAssert<T> |
AtomicReferenceArrayAssert.filteredOn(Condition<? super T> condition)
Filter the array under test keeping only elements matching the given
Condition. |
<T> SELF |
AbstractObjectArrayAssert.filteredOn(Function<? super ELEMENT,T> function,
T expectedValue)
Filter the array under test into a list composed of the elements for which the result of the
function is equal to expectedValue. |
<T> SELF |
AbstractIterableAssert.filteredOn(Function<? super ELEMENT,T> function,
T expectedValue)
Filters the iterable under test keeping only elements for which the result of the
function is equal to expectedValue. |
<U> AtomicReferenceArrayAssert<T> |
AtomicReferenceArrayAssert.filteredOn(Function<? super T,U> function,
U expectedValue)
Filter the array under test into a list composed of the elements for which the result of the
function is equal to expectedValue. |
AtomicReferenceArrayAssert<T> |
AtomicReferenceArrayAssert.filteredOn(String propertyOrFieldName,
FilterOperator<?> filterOperator)
Filter the array under test keeping only elements having a property or field matching the filter expressed with
the
FilterOperator, the property/field is specified by propertyOrFieldName parameter. |
SELF |
AbstractObjectArrayAssert.filteredOn(String propertyOrFieldName,
FilterOperator<?> filterOperator)
Filter the array under test into a list composed of elements having a property or field matching the filter expressed with
the
FilterOperator, the property/field is specified by propertyOrFieldName parameter. |
SELF |
AbstractIterableAssert.filteredOn(String propertyOrFieldName,
FilterOperator<?> filterOperator)
Filters the iterable under test keeping only elements having a property or field matching the filter expressed with
the
FilterOperator, the property/field is specified by propertyOrFieldName parameter. |
AtomicReferenceArrayAssert<T> |
AtomicReferenceArrayAssert.filteredOn(String propertyOrFieldName,
Object expectedValue)
Filter the array under test keeping only elements having a property or field equal to
expectedValue, the
property/field is specified by propertyOrFieldName parameter. |
SELF |
AbstractObjectArrayAssert.filteredOn(String propertyOrFieldName,
Object expectedValue)
Filter the array under test into a list composed of the elements elements having a property or field equal to
expectedValue, the property/field is specified by propertyOrFieldName parameter. |
SELF |
AbstractIterableAssert.filteredOn(String propertyOrFieldName,
Object expectedValue)
Filters the iterable under test keeping only elements having a property or field equal to
expectedValue, the
property/field is specified by propertyOrFieldName parameter. |
AtomicReferenceArrayAssert<T> |
AtomicReferenceArrayAssert.filteredOnNull(String propertyOrFieldName)
Filter the array under test keeping only elements whose property or field specified by
propertyOrFieldName
is null. |
SELF |
AbstractObjectArrayAssert.filteredOnNull(String propertyOrFieldName)
Filter the array under test into a list composed of the elements whose property or field specified
by
propertyOrFieldName are null. |
SELF |
AbstractIterableAssert.filteredOnNull(String propertyOrFieldName)
Filters the iterable under test keeping only elements whose property or field specified by
propertyOrFieldName is null. |
ELEMENT_ASSERT |
AbstractIterableAssert.first()
Navigate and allow to perform assertions on the first element of the
Iterable under test. |
<ASSERT extends AbstractAssert<?,?>> |
AbstractIterableAssert.first(InstanceOfAssertFactory<?,ASSERT> assertFactory)
Navigate and allow to perform assertions on the first element of the
Iterable under test. |
AbstractListAssert<?,List<? extends Object>,Object,ObjectAssert<Object>> |
AbstractIterableAssert.flatExtracting(Function<? super ELEMENT,?>... extractors)
Extracts multiple values from each
Iterable's element according to the given Functions and
concatenates/flattens them in a list that becomes the instance under test. |
<V> AbstractListAssert<?,List<? extends V>,V,ObjectAssert<V>> |
AbstractIterableAssert.flatExtracting(Function<? super ELEMENT,? extends Collection<V>> extractor)
Extracts Iterable elements values by applying a function and concatenates the result into a list that becomes the instance
under test.
|
<V,C extends Collection<V>> |
AbstractObjectArrayAssert.flatExtracting(Function<? super ELEMENT,C> extractor)
Extract the Iterable values from arrays elements under test by applying an Iterable extracting function on them
and concatenating the result lists into an array which becomes the new object under test.
|
<U,C extends Collection<U>> |
AtomicReferenceArrayAssert.flatExtracting(Function<? super T,C> extractor)
Extract the Iterable values from the array's elements by applying an Iterable extracting function on them
and concatenating the result lists into an array which becomes the new object under test.
|
AbstractListAssert<?,List<?>,Object,ObjectAssert<Object>> |
AbstractMapAssert.flatExtracting(String... keys)
Flatten the values of the given keys from the actual map under test into a new array, this new array becoming the object under test.
|
AbstractListAssert<?,List<? extends Object>,Object,ObjectAssert<Object>> |
AbstractIterableAssert.flatExtracting(String... fieldOrPropertyNames)
Extract the given property/field values from each
Iterable's element and
flatten the extracted values in a list that is used as the new object under test. |
ObjectArrayAssert<Object> |
AtomicReferenceArrayAssert.flatExtracting(String propertyName)
Extract from array's elements the Iterable/Array values corresponding to the given property/field name and
concatenate them into a single array becoming the new object under test.
|
AbstractListAssert<?,List<? extends Object>,Object,ObjectAssert<Object>> |
AbstractObjectArrayAssert.flatExtracting(String propertyName)
Extract from array's elements the Iterable/Array values corresponding to the given property/field name and
concatenate them into a single array becoming the new object under test.
|
AbstractListAssert<?,List<? extends Object>,Object,ObjectAssert<Object>> |
AbstractIterableAssert.flatExtracting(String 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.
|
<EXCEPTION extends Exception> |
AbstractIterableAssert.flatExtracting(ThrowingExtractor<? super ELEMENT,?,EXCEPTION>... extractors)
Extracts multiple values from each
Iterable's element according to the given ThrowingExtractors
and concatenates/flattens them in a list that becomes the object under test. |
<V,EXCEPTION extends Exception> |
AbstractIterableAssert.flatExtracting(ThrowingExtractor<? super ELEMENT,? extends Collection<V>,EXCEPTION> extractor)
Extracts 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.
|
<V,C extends Collection<V>,EXCEPTION extends Exception> |
AbstractObjectArrayAssert.flatExtracting(ThrowingExtractor<? super ELEMENT,C,EXCEPTION> extractor)
Extract the Iterable values from arrays elements under test by applying an Iterable extracting function (which
might throw an exception) on them and concatenating the result lists into an array which becomes the new object
under test.
|
<U,C extends Collection<U>,EXCEPTION extends Exception> |
AtomicReferenceArrayAssert.flatExtracting(ThrowingExtractor<? super T,C,EXCEPTION> extractor)
Extract the Iterable values from the array's elements by applying an Iterable extracting function (which might
throw an exception) on them and concatenating the result lists into an array which becomes the new object under
test.
|
AbstractListAssert<?,List<? extends Object>,Object,ObjectAssert<Object>> |
AbstractIterableAssert.flatMap(Function<? super ELEMENT,?>... mappers)
Maps multiple values from each
Iterable's element according to the given Functions
and concatenates/flattens them in a list that becomes the instance under test. |
<V> AbstractListAssert<?,List<? extends V>,V,ObjectAssert<V>> |
AbstractIterableAssert.flatMap(Function<? super ELEMENT,? extends Collection<V>> mapper)
Maps the Iterable's elements under test by applying the given
Function and flattens the resulting collections in a
list becoming the object under test. |
<U> AbstractOptionalAssert<?,U> |
AbstractOptionalAssert.flatMap(Function<? super VALUE,Optional<U>> mapper)
Call
flatMap on the Optional under test, assertions chained afterwards are performed on the Optional resulting from the flatMap call. |
<EXCEPTION extends Exception> |
AbstractIterableAssert.flatMap(ThrowingExtractor<? super ELEMENT,?,EXCEPTION>... mappers)
Maps multiple values from each
Iterable's element according to the given ThrowingExtractors and
concatenates/flattens them in a list that becomes the object under test. |
<V,EXCEPTION extends Exception> |
AbstractIterableAssert.flatMap(ThrowingExtractor<? super ELEMENT,? extends Collection<V>,EXCEPTION> mapper)
Maps 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.
|
AbstractObjectAssert<?,VALUE> |
AbstractOptionalAssert.get()
Verifies that the actual
Optional is not null and not empty and returns an Object assertion
that allows chaining (object) assertions on the optional value. |
<ASSERT extends AbstractAssert<?,?>> |
AbstractOptionalAssert.get(InstanceOfAssertFactory<?,ASSERT> assertFactory)
Verifies that the actual
Optional is not null and not empty and returns an new assertion instance
to chain assertions on the optional value. |
SELF |
RecursiveComparisonAssert.ignoringActualEmptyOptionalFields()
Makes the recursive comparison to ignore all actual empty optional fields (including
Optional, OptionalInt, OptionalLong and OptionalDouble),
note that the expected object empty optional fields are not ignored, this only applies to actual's fields. |
SELF |
RecursiveComparisonAssert.ignoringActualNullFields()
Makes the recursive comparison to ignore all actual null fields (but note that the expected object null fields are used in the comparison).
|
SELF |
RecursiveComparisonAssert.ignoringCollectionOrder()
Makes the recursive comparison to ignore collection order in all fields in the object under test.
|
SELF |
RecursiveComparisonAssert.ignoringCollectionOrderInFields(String... fieldsToIgnoreCollectionOrder)
Makes the recursive comparison to ignore collection order in the object under test specified fields.
|
SELF |
RecursiveComparisonAssert.ignoringCollectionOrderInFieldsMatchingRegexes(String... regexes)
Makes the recursive comparison to ignore collection order in the object under test fields matching the specified regexes.
|
SELF |
RecursiveComparisonAssert.ignoringExpectedNullFields()
Makes the recursive comparison to ignore all expected null fields.
|
SELF |
RecursiveComparisonAssert.ignoringFields(String... fieldNamesToIgnore)
Makes the recursive comparison to ignore the given object under test fields.
|
SELF |
RecursiveComparisonAssert.ignoringFieldsMatchingRegexes(String... regexes)
Makes the recursive comparison to ignore the object under test fields whose name matche the given regexes.
|
SELF |
RecursiveComparisonAssert.ignoringOverriddenEqualsForFields(String... fields)
In case you have instructed the recursive to use overridden
equals with RecursiveComparisonAssert.usingOverriddenEquals(),
this method allows to ignore overridden equals for the given fields (it adds them to the already registered ones). |
SELF |
RecursiveComparisonAssert.ignoringOverriddenEqualsForFieldsMatchingRegexes(String... regexes)
In case you have instructed the recursive to use overridden
equals with RecursiveComparisonAssert.usingOverriddenEquals(),
this method allows to force a recursive comparison for the fields matching the given regexes (it adds them to the already registered ones). |
SELF |
RecursiveComparisonAssert.ignoringOverriddenEqualsForTypes(Class<?>... types)
By default the recursive comparison uses overridden
equals methods to compare fields,
this method allows to force a recursive comparison for all fields of the given types (it adds them to the already registered ones). |
AtomicReferenceArrayAssert<T> |
AtomicReferenceArrayAssert.inBinary() |
SELF |
AbstractUniversalComparableAssert.inBinary()
Use binary object representation instead of standard representation in error messages.
|
SELF |
AbstractObjectArrayAssert.inBinary() |
SELF |
AbstractIterableAssert.inBinary()
Enable binary representation of Iterable elements instead of standard representation in error messages.
|
SELF |
AbstractEnumerableAssert.inBinary() |
SELF |
AbstractComparableAssert.inBinary() |
protected SELF |
AbstractAssert.inBinary()
Use binary object representation instead of standard representation in error messages.
|
AtomicReferenceArrayAssert<T> |
AtomicReferenceArrayAssert.inHexadecimal()
Enable hexadecimal object representation of Iterable elements instead of standard java representation in error
messages.
|
SELF |
AbstractUniversalComparableAssert.inHexadecimal()
Use hexadecimal object representation instead of standard representation in error messages.
|
SELF |
AbstractObjectArrayAssert.inHexadecimal()
Enable hexadecimal object representation of Iterable elements instead of standard java representation in error
messages.
|
SELF |
AbstractIterableAssert.inHexadecimal()
Enable hexadecimal representation of Iterable elements instead of standard representation in error messages.
|
SELF |
AbstractEnumerableAssert.inHexadecimal()
Enable hexadecimal object representation of Iterable elements instead of standard java representation in error messages.
|
SELF |
AbstractComparableAssert.inHexadecimal() |
SELF |
AbstractCharSequenceAssert.inHexadecimal() |
protected SELF |
AbstractAssert.inHexadecimal()
Use hexadecimal object representation instead of standard representation in error messages.
|
Char2DArrayAssert |
Char2DArrayAssert.inUnicode()
Use unicode character representation instead of standard representation in error messages.
|
SELF |
AbstractCharacterAssert.inUnicode()
Use unicode character representation instead of standard representation in error messages.
|
SELF |
AbstractCharSequenceAssert.inUnicode()
Use unicode character representation instead of standard representation in error messages.
|
SELF |
AbstractCharArrayAssert.inUnicode()
Use unicode character representation instead of standard representation in error messages.
|
ELEMENT_ASSERT |
AbstractIterableAssert.last()
Navigate and allow to perform assertions on the last element of the
Iterable under test. |
<ASSERT extends AbstractAssert<?,?>> |
AbstractIterableAssert.last(InstanceOfAssertFactory<?,ASSERT> assertFactory)
Navigate and allow to perform assertions on the last element of the
Iterable under test. |
AbstractListAssert<?,List<? extends Tuple>,Tuple,ObjectAssert<Tuple>> |
AbstractIterableAssert.map(Function<? super ELEMENT,?>... mappers)
|
<U> AbstractOptionalAssert<?,U> |
AbstractOptionalAssert.map(Function<? super VALUE,? extends U> mapper)
Call
map on the Optional under test, assertions chained afterwards are performed on the Optional resulting from the map call. |
<V,EXCEPTION extends Exception> |
AbstractIterableAssert.map(ThrowingExtractor<? super ELEMENT,V,EXCEPTION> 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.
|
SELF |
AbstractMapAssert.overridingErrorMessage(String newErrorMessage,
Object... args) |
SELF |
AbstractListAssert.overridingErrorMessage(String newErrorMessage,
Object... args) |
SELF |
AbstractIterableAssert.overridingErrorMessage(String newErrorMessage,
Object... args) |
SELF |
AbstractAssert.overridingErrorMessage(String newErrorMessage,
Object... args)
Overrides AssertJ default error message by the given one.
|
SELF |
AbstractAssert.overridingErrorMessage(Supplier<String> supplier)
Overrides AssertJ default error message by the given one.
|
AbstractFileAssert<FileAssert> |
FileSizeAssert.returnToFile() |
AbstractIterableAssert<IterableAssert<T>,Iterable<? extends T>,T,ObjectAssert<T>> |
IterableSizeAssert.returnToIterable() |
AbstractMapAssert<MapAssert<KEY,VALUE>,Map<KEY,VALUE>,KEY,VALUE> |
MapSizeAssert.returnToMap() |
ObjectAssert<ELEMENT> |
AbstractObjectArrayAssert.singleElement()
Verifies that the array under test contains a single element and allows to perform assertions on that element.
|
ELEMENT_ASSERT |
AbstractIterableAssert.singleElement()
Verifies that the
Iterable under test contains a single element and allows to perform assertions on that element. |
<ASSERT extends AbstractAssert<?,?>> |
AbstractObjectArrayAssert.singleElement(InstanceOfAssertFactory<?,ASSERT> assertFactory)
Verifies that the array under test contains a single element and allows to perform assertions on that element,
the assertions are strongly typed according to the given
AssertFactory parameter. |
<ASSERT extends AbstractAssert<?,?>> |
AbstractIterableAssert.singleElement(InstanceOfAssertFactory<?,ASSERT> assertFactory)
Verifies that the
Iterable under test contains a single element and allows to perform assertions on that element,
the assertions are strongly typed according to the given AssertFactory parameter. |
AbstractMapSizeAssert<SELF,ACTUAL,K,V> |
AbstractMapAssert.size()
Returns an
Assert object that allows performing assertions on the size of the Map under test. |
AbstractIterableSizeAssert<SELF,ACTUAL,ELEMENT,ELEMENT_ASSERT> |
AbstractIterableAssert.size()
Returns an
Assert object that allows performing assertions on the size of the Iterable under test. |
AbstractFileSizeAssert<SELF> |
AbstractFileAssert.size()
Returns an
Assert object that allows performing assertions on the size of the File under test. |
default MatcherAssert |
BDDSoftAssertionsProvider.then(Matcher actual)
Create assertion for
Matcher. |
SELF |
AbstractPathAssert.usingCharset(Charset charset)
Specifies the charset to use for text-based assertions on the path's contents (path must be a readable file).
|
SELF |
AbstractFileAssert.usingCharset(Charset charset)
Specifies the charset to use for text-based assertions on the file's contents.
|
SELF |
AbstractPathAssert.usingCharset(String charsetName)
Specifies the name of the charset to use for text-based assertions on the path's contents (path must be a readable
file).
|
SELF |
AbstractFileAssert.usingCharset(String charsetName)
Specifies the name of the charset to use for text-based assertions on the file's contents.
|
SELF |
AbstractMapAssert.usingComparator(Comparator<? super ACTUAL> customComparator) |
SELF |
AbstractListAssert.usingComparator(Comparator<? super ACTUAL> customComparator) |
SELF |
AbstractIterableAssert.usingComparator(Comparator<? super ACTUAL> customComparator) |
SELF |
AbstractComparableAssert.usingComparator(Comparator<? super ACTUAL> customComparator) |
SELF |
AbstractCharSequenceAssert.usingComparator(Comparator<? super ACTUAL> customComparator) |
SELF |
AbstractAssert.usingComparator(Comparator<? super ACTUAL> customComparator)
Use the given custom comparator instead of relying on actual type A equals method for incoming assertion checks.
|
SELF |
AbstractMapAssert.usingComparator(Comparator<? super ACTUAL> customComparator,
String customComparatorDescription) |
SELF |
AbstractListAssert.usingComparator(Comparator<? super ACTUAL> customComparator,
String customComparatorDescription) |
SELF |
AbstractIterableAssert.usingComparator(Comparator<? super ACTUAL> customComparator,
String customComparatorDescription) |
SELF |
AbstractComparableAssert.usingComparator(Comparator<? super ACTUAL> customComparator,
String customComparatorDescription) |
SELF |
AbstractCharSequenceAssert.usingComparator(Comparator<? super ACTUAL> customComparator,
String customComparatorDescription) |
SELF |
AbstractAssert.usingComparator(Comparator<? super ACTUAL> customComparator,
String customComparatorDescription)
Use the given custom comparator instead of relying on actual type A equals method for incoming assertion checks.
|
AtomicIntegerAssert |
AtomicIntegerAssert.usingComparator(Comparator<? super AtomicInteger> customComparator) |
AtomicIntegerAssert |
AtomicIntegerAssert.usingComparator(Comparator<? super AtomicInteger> customComparator,
String customComparatorDescription) |
AtomicLongAssert |
AtomicLongAssert.usingComparator(Comparator<? super AtomicLong> customComparator) |
AtomicLongAssert |
AtomicLongAssert.usingComparator(Comparator<? super AtomicLong> customComparator,
String customComparatorDescription) |
SELF |
AbstractBigDecimalAssert.usingComparator(Comparator<? super BigDecimal> customComparator) |
SELF |
AbstractBigDecimalAssert.usingComparator(Comparator<? super BigDecimal> customComparator,
String customComparatorDescription) |
SELF |
AbstractBigIntegerAssert.usingComparator(Comparator<? super BigInteger> customComparator) |
SELF |
AbstractBigIntegerAssert.usingComparator(Comparator<? super BigInteger> customComparator,
String customComparatorDescription) |
SELF |
AbstractByteAssert.usingComparator(Comparator<? super Byte> customComparator) |
SELF |
AbstractByteAssert.usingComparator(Comparator<? super Byte> customComparator,
String customComparatorDescription) |
SELF |
AbstractCharacterAssert.usingComparator(Comparator<? super Character> customComparator) |
SELF |
AbstractCharacterAssert.usingComparator(Comparator<? super Character> customComparator,
String customComparatorDescription) |
SELF |
AbstractUniversalComparableAssert.usingComparator(Comparator<? super Comparable<T>> customComparator)
Use the given custom comparator instead of relying on actual type A equals method for incoming assertion checks.
|
SELF |
AbstractUniversalComparableAssert.usingComparator(Comparator<? super Comparable<T>> customComparator,
String customComparatorDescription)
Use the given custom comparator instead of relying on actual type A equals method for incoming assertion checks.
|
SELF |
AbstractDateAssert.usingComparator(Comparator<? super Date> customComparator) |
SELF |
AbstractDateAssert.usingComparator(Comparator<? super Date> customComparator,
String customComparatorDescription) |
SELF |
AbstractDoubleAssert.usingComparator(Comparator<? super Double> customComparator) |
SELF |
AbstractDoubleAssert.usingComparator(Comparator<? super Double> customComparator,
String customComparatorDescription) |
SELF |
AbstractFloatAssert.usingComparator(Comparator<? super Float> customComparator) |
SELF |
AbstractFloatAssert.usingComparator(Comparator<? super Float> customComparator,
String customComparatorDescription) |
SELF |
AbstractIntegerAssert.usingComparator(Comparator<? super Integer> customComparator) |
SELF |
AbstractIntegerAssert.usingComparator(Comparator<? super Integer> customComparator,
String customComparatorDescription) |
SELF |
AbstractLongAssert.usingComparator(Comparator<? super Long> customComparator) |
SELF |
AbstractLongAssert.usingComparator(Comparator<? super Long> customComparator,
String customComparatorDescription) |
SELF |
AbstractLongAdderAssert.usingComparator(Comparator<? super LongAdder> customComparator) |
SELF |
AbstractLongAdderAssert.usingComparator(Comparator<? super LongAdder> customComparator,
String customComparatorDescription) |
SELF |
AbstractShortAssert.usingComparator(Comparator<? super Short> customComparator) |
SELF |
AbstractShortAssert.usingComparator(Comparator<? super Short> customComparator,
String customComparatorDescription) |
SELF |
AbstractStringAssert.usingComparator(Comparator<? super String> customComparator)
Use the given custom comparator instead of relying on
String natural comparator for the incoming assertions. |
SELF |
AbstractStringAssert.usingComparator(Comparator<? super String> customComparator,
String customComparatorDescription)
Use the given custom comparator instead of relying on
String natural comparator for the incoming assertions. |
SELF |
AbstractTemporalAssert.usingComparator(Comparator<? super TEMPORAL> customComparator)
Use the given custom comparator instead of relying on actual type A equals method for incoming assertion checks.
|
SELF |
AbstractTemporalAssert.usingComparator(Comparator<? super TEMPORAL> customComparator,
String customComparatorDescription)
Use the given custom comparator instead of relying on actual type A equals method for incoming assertion checks.
|
<C> AtomicReferenceArrayAssert<T> |
AtomicReferenceArrayAssert.usingComparatorForElementFieldsWithNames(Comparator<C> comparator,
String... elementPropertyOrFieldNames)
Deprecated.
This method is used with
AtomicReferenceArrayAssert.usingFieldByFieldElementComparator() which is deprecated in favor of
AtomicReferenceArrayAssert.usingRecursiveFieldByFieldElementComparator(RecursiveComparisonConfiguration) or AbstractAssert.usingRecursiveComparison().
When using
and when using
|
<C> SELF |
AbstractObjectArrayAssert.usingComparatorForElementFieldsWithNames(Comparator<C> comparator,
String... elementPropertyOrFieldNames)
Deprecated.
This method is used with
AbstractObjectArrayAssert.usingFieldByFieldElementComparator() which is deprecated in favor of
AbstractObjectArrayAssert.usingRecursiveFieldByFieldElementComparator(RecursiveComparisonConfiguration) or AbstractObjectArrayAssert.usingRecursiveComparison().
When using
and when using
|
<T> SELF |
AbstractIterableAssert.usingComparatorForElementFieldsWithNames(Comparator<T> comparator,
String... elementPropertyOrFieldNames)
Deprecated.
This method is used with
AbstractIterableAssert.usingFieldByFieldElementComparator() which is deprecated in favor of
AbstractIterableAssert.usingRecursiveFieldByFieldElementComparator(RecursiveComparisonConfiguration) or AbstractIterableAssert.usingRecursiveComparison().
When using
and when using
|
<C> AtomicReferenceArrayAssert<T> |
AtomicReferenceArrayAssert.usingComparatorForElementFieldsWithType(Comparator<C> comparator,
Class<C> type)
Deprecated.
This method is used with
AtomicReferenceArrayAssert.usingFieldByFieldElementComparator() which is deprecated in favor of
AtomicReferenceArrayAssert.usingRecursiveFieldByFieldElementComparator(RecursiveComparisonConfiguration) or AbstractAssert.usingRecursiveComparison().
When using
and when using
|
<C> SELF |
AbstractObjectArrayAssert.usingComparatorForElementFieldsWithType(Comparator<C> comparator,
Class<C> type)
Deprecated.
This method is used with
AbstractObjectArrayAssert.usingFieldByFieldElementComparator() which is deprecated in favor of
AbstractObjectArrayAssert.usingRecursiveFieldByFieldElementComparator(RecursiveComparisonConfiguration) or AbstractObjectArrayAssert.usingRecursiveComparison().
When using
and when using
|
<T> SELF |
AbstractIterableAssert.usingComparatorForElementFieldsWithType(Comparator<T> comparator,
Class<T> type)
Deprecated.
This method is used with
AbstractIterableAssert.usingFieldByFieldElementComparator() which is deprecated in favor of
AbstractIterableAssert.usingRecursiveFieldByFieldElementComparator(RecursiveComparisonConfiguration) or AbstractIterableAssert.usingRecursiveComparison().
When using
and when using
|
<T> SELF |
AbstractObjectAssert.usingComparatorForFields(Comparator<T> comparator,
String... propertiesOrFields)
Allows to set a specific comparator to compare properties or fields with the given names.
|
<T> SELF |
AbstractObjectAssert.usingComparatorForType(Comparator<? super T> comparator,
Class<T> type)
Allows to set a specific comparator to compare properties or fields with the given type.
|
<C> AtomicReferenceArrayAssert<T> |
AtomicReferenceArrayAssert.usingComparatorForType(Comparator<C> comparator,
Class<C> type)
Allows to set a specific comparator for the given type of elements or their fields.
|
<C> SELF |
AbstractObjectArrayAssert.usingComparatorForType(Comparator<C> comparator,
Class<C> type)
Allows to set a specific comparator for the given type of elements or their fields.
|
<T> SELF |
AbstractIterableAssert.usingComparatorForType(Comparator<T> comparator,
Class<T> type)
Allows to set a specific comparator for the given type of elements or their fields.
|
SELF |
AbstractDoubleArrayAssert.usingComparatorWithPrecision(Double precision)
Create a
Double comparator which compares double at the given precision and pass it to AbstractDoubleArrayAssert.usingElementComparator(Comparator). |
SELF |
AbstractFloatArrayAssert.usingComparatorWithPrecision(Float precision)
Create a
Float comparator which compares floats at the given precision and pass it to AbstractFloatArrayAssert.usingElementComparator(Comparator). |
AtomicLongAssert |
AtomicLongAssert.usingDefaultComparator() |
AtomicIntegerAssert |
AtomicIntegerAssert.usingDefaultComparator() |
SELF |
AbstractZonedDateTimeAssert.usingDefaultComparator()
Revert to standard comparison for the incoming assertion checks.
|
SELF |
AbstractUniversalComparableAssert.usingDefaultComparator()
Revert to standard comparison for the incoming assertion checks.
|
SELF |
AbstractTemporalAssert.usingDefaultComparator()
Revert to standard comparison for the incoming assertion checks.
|
SELF |
AbstractStringAssert.usingDefaultComparator() |
SELF |
AbstractShortAssert.usingDefaultComparator() |
SELF |
AbstractOffsetDateTimeAssert.usingDefaultComparator()
Revert to standard comparison for the incoming assertion checks.
|
SELF |
AbstractMapAssert.usingDefaultComparator() |
SELF |
AbstractLongAssert.usingDefaultComparator() |
SELF |
AbstractLongAdderAssert.usingDefaultComparator() |
SELF |
AbstractLocalDateTimeAssert.usingDefaultComparator()
Revert to standard comparison for the incoming assertion checks.
|
SELF |
AbstractListAssert.usingDefaultComparator() |
SELF |
AbstractIterableAssert.usingDefaultComparator() |
SELF |
AbstractIntegerAssert.usingDefaultComparator() |
SELF |
AbstractFloatAssert.usingDefaultComparator() |
SELF |
AbstractDoubleAssert.usingDefaultComparator() |
SELF |
AbstractDateAssert.usingDefaultComparator() |
SELF |
AbstractComparableAssert.usingDefaultComparator() |
SELF |
AbstractCharacterAssert.usingDefaultComparator() |
SELF |
AbstractCharSequenceAssert.usingDefaultComparator() |
SELF |
AbstractByteAssert.usingDefaultComparator() |
SELF |
AbstractBigIntegerAssert.usingDefaultComparator() |
SELF |
AbstractBigDecimalAssert.usingDefaultComparator() |
SELF |
AbstractAssert.usingDefaultComparator()
Revert to standard comparison for the incoming assertion checks.
|
AtomicReferenceArrayAssert<T> |
AtomicReferenceArrayAssert.usingDefaultElementComparator()
Revert to standard comparison for incoming assertion group element checks.
|
AtomicIntegerArrayAssert |
AtomicIntegerArrayAssert.usingDefaultElementComparator()
Revert to standard comparison for incoming assertion group element checks.
|
SELF |
AbstractShortArrayAssert.usingDefaultElementComparator()
Revert to standard comparison for incoming assertion group element checks.
|
SELF |
AbstractObjectArrayAssert.usingDefaultElementComparator()
Revert to standard comparison for incoming assertion group element checks.
|
SELF |
AbstractLongArrayAssert.usingDefaultElementComparator()
Revert to standard comparison for incoming assertion group element checks.
|
SELF |
AbstractListAssert.usingDefaultElementComparator() |
SELF |
AbstractIterableAssert.usingDefaultElementComparator()
Revert to standard comparison for incoming assertion group element checks.
|
SELF |
AbstractIntArrayAssert.usingDefaultElementComparator()
Revert to standard comparison for incoming assertion group element checks.
|
SELF |
AbstractFloatArrayAssert.usingDefaultElementComparator()
Revert to standard comparison for incoming assertion group element checks.
|
SELF |
AbstractDoubleArrayAssert.usingDefaultElementComparator()
Revert to standard comparison for incoming assertion group element checks.
|
SELF |
AbstractCharArrayAssert.usingDefaultElementComparator()
Revert to standard comparison for incoming assertion group element checks.
|
SELF |
AbstractByteArrayAssert.usingDefaultElementComparator()
Revert to standard comparison for incoming assertion group element checks.
|
SELF |
AbstractOptionalAssert.usingDefaultValueComparator()
Revert to standard comparison for incoming assertion
Optional value checks. |
SELF |
AbstractByteArrayAssert.usingElementComparator(Comparator<? super Byte> customComparator)
Use given custom comparator instead of relying on actual type A
equals method to compare group
elements for incoming assertion checks. |
SELF |
AbstractCharArrayAssert.usingElementComparator(Comparator<? super Character> customComparator)
Use given custom comparator instead of relying on actual type A
equals method to compare group
elements for incoming assertion checks. |
SELF |
AbstractDoubleArrayAssert.usingElementComparator(Comparator<? super Double> customComparator)
Use given custom comparator instead of relying on actual type A
equals method to compare group
elements for incoming assertion checks. |
SELF |
AbstractObjectArrayAssert.usingElementComparator(Comparator<? super ELEMENT> elementComparator)
Use given custom comparator instead of relying on actual type A
equals method to compare group
elements for incoming assertion checks. |
SELF |
AbstractListAssert.usingElementComparator(Comparator<? super ELEMENT> customComparator) |
SELF |
AbstractIterableAssert.usingElementComparator(Comparator<? super ELEMENT> elementComparator)
Use given custom comparator instead of relying on actual type A
equals method to compare group
elements for incoming assertion checks. |
SELF |
AbstractFloatArrayAssert.usingElementComparator(Comparator<? super Float> customComparator)
Use given custom comparator instead of relying on actual type A
equals method to compare group
elements for incoming assertion checks. |
AtomicIntegerArrayAssert |
AtomicIntegerArrayAssert.usingElementComparator(Comparator<? super Integer> customComparator)
Use given custom comparator instead of relying on Integer
equals method to compare elements for incoming assertion checks. |
SELF |
AbstractIntArrayAssert.usingElementComparator(Comparator<? super Integer> customComparator)
Use given custom comparator instead of relying on actual type A
equals method to compare group
elements for incoming assertion checks. |
AtomicLongArrayAssert |
AtomicLongArrayAssert.usingElementComparator(Comparator<? super Long> customComparator)
Use given custom comparator instead of relying on Long
equals method to compare elements for incoming assertion checks. |
SELF |
AbstractLongArrayAssert.usingElementComparator(Comparator<? super Long> customComparator)
Use given custom comparator instead of relying on actual type A
equals method to compare group
elements for incoming assertion checks. |
SELF |
AbstractShortArrayAssert.usingElementComparator(Comparator<? super Short> customComparator)
Use given custom comparator instead of relying on actual type A
equals method to compare group
elements for incoming assertion checks. |
AtomicReferenceArrayAssert<T> |
AtomicReferenceArrayAssert.usingElementComparator(Comparator<? super T> elementComparator)
Use given custom comparator instead of relying on actual element type
equals method to compare AtomicReferenceArray
elements for incoming assertion checks. |
AtomicReferenceArrayAssert<T> |
AtomicReferenceArrayAssert.usingElementComparatorIgnoringFields(String... 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
AtomicReferenceArrayAssert.usingRecursiveFieldByFieldElementComparatorIgnoringFields(String...) instead.
See https://assertj.github.io/doc/#assertj-core-recursive-comparison |
SELF |
AbstractObjectArrayAssert.usingElementComparatorIgnoringFields(String... 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
AbstractObjectArrayAssert.usingRecursiveFieldByFieldElementComparatorIgnoringFields(String...) instead.
See https://assertj.github.io/doc/#assertj-core-recursive-comparison |
SELF |
AbstractIterableAssert.usingElementComparatorIgnoringFields(String... 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
AbstractIterableAssert.usingRecursiveFieldByFieldElementComparatorIgnoringFields(String...) instead.
See https://assertj.github.io/doc/#assertj-core-recursive-comparison |
AtomicReferenceArrayAssert<T> |
AtomicReferenceArrayAssert.usingElementComparatorOnFields(String... 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
AtomicReferenceArrayAssert.usingRecursiveFieldByFieldElementComparatorOnFields(String...) instead.
See https://assertj.github.io/doc/#assertj-core-recursive-comparison |
SELF |
AbstractObjectArrayAssert.usingElementComparatorOnFields(String... 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
AbstractObjectArrayAssert.usingRecursiveFieldByFieldElementComparatorOnFields(String...) instead.
See https://assertj.github.io/doc/#assertj-core-recursive-comparison |
SELF |
AbstractIterableAssert.usingElementComparatorOnFields(String... 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
AbstractIterableAssert.usingRecursiveFieldByFieldElementComparatorOnFields(String...) instead.
See https://assertj.github.io/doc/#assertj-core-recursive-comparison |
AtomicReferenceArrayAssert<T> |
AtomicReferenceArrayAssert.usingFieldByFieldElementComparator()
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
AtomicReferenceArrayAssert.usingRecursiveFieldByFieldElementComparator()
or AbstractAssert.usingRecursiveComparison() instead to perform a true recursive comparison.
See https://assertj.github.io/doc/#assertj-core-recursive-comparison |
SELF |
AbstractObjectArrayAssert.usingFieldByFieldElementComparator()
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
AbstractObjectArrayAssert.usingRecursiveFieldByFieldElementComparator()
or AbstractObjectArrayAssert.usingRecursiveComparison() instead to perform a true recursive comparison.
See https://assertj.github.io/doc/#assertj-core-recursive-comparison |
SELF |
AbstractIterableAssert.usingFieldByFieldElementComparator()
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
AbstractIterableAssert.usingRecursiveFieldByFieldElementComparator()
or AbstractIterableAssert.usingRecursiveComparison() instead to perform a true recursive comparison.
See https://assertj.github.io/doc/#assertj-core-recursive-comparison |
SELF |
AbstractOptionalAssert.usingFieldByFieldValueComparator()
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
AbstractOptionalAssert.get() chained with AbstractObjectAssert.usingRecursiveComparison() instead.
See https://assertj.github.io/doc/#assertj-core-recursive-comparison |
AtomicReferenceArrayAssert<T> |
AtomicReferenceArrayAssert.usingRecursiveFieldByFieldElementComparator()
Enable using a recursive field by field comparison strategy similar to
AbstractAssert.usingRecursiveComparison() but contrary to the latter you can chain any iterable assertions after this method (this is why this method exists). |
SELF |
AbstractObjectArrayAssert.usingRecursiveFieldByFieldElementComparator()
Enable using a recursive field by field comparison strategy similar to
AbstractObjectArrayAssert.usingRecursiveComparison() but contrary to the latter you can chain any iterable assertions after this method (this is why this method exists). |
SELF |
AbstractIterableAssert.usingRecursiveFieldByFieldElementComparator()
Enable using a recursive field by field comparison strategy similar to
AbstractIterableAssert.usingRecursiveComparison() but contrary to the latter you can chain any iterable assertions after this method (this is why this method exists). |
AtomicReferenceArrayAssert<T> |
AtomicReferenceArrayAssert.usingRecursiveFieldByFieldElementComparatorIgnoringFields(String... 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
equals method. |
SELF |
AbstractObjectArrayAssert.usingRecursiveFieldByFieldElementComparatorIgnoringFields(String... 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
equals method. |
SELF |
AbstractIterableAssert.usingRecursiveFieldByFieldElementComparatorIgnoringFields(String... 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
equals method. |
AtomicReferenceArrayAssert<T> |
AtomicReferenceArrayAssert.usingRecursiveFieldByFieldElementComparatorOnFields(String... 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
equals method. |
SELF |
AbstractObjectArrayAssert.usingRecursiveFieldByFieldElementComparatorOnFields(String... 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
equals method. |
SELF |
AbstractIterableAssert.usingRecursiveFieldByFieldElementComparatorOnFields(String... 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
equals method. |
SELF |
AbstractOptionalAssert.usingValueComparator(Comparator<? super VALUE> customComparator)
Use given custom comparator instead of relying on actual type A
equals method to compare the
Optional value's object for incoming assertion checks. |
SELF |
RecursiveComparisonAssert.withComparatorForFields(Comparator<?> comparator,
String... fieldLocations)
Allows to register a comparator to compare fields with the given locations.
|
<T> SELF |
RecursiveComparisonAssert.withComparatorForType(Comparator<? super T> comparator,
Class<T> type)
Allows to register a comparator to compare the fields with the given type.
|
SELF |
AbstractDateAssert.withDateFormat(DateFormat userCustomDateFormat)
Instead of using default date formats for the date String based Date assertions like
AbstractDateAssert.isEqualTo(String),
AssertJ is gonna use any date formats registered with one of these methods :
AbstractDateAssert.withDateFormat(String)
this method
AbstractDateAssert.registerCustomDateFormat(java.text.DateFormat)
AbstractDateAssert.registerCustomDateFormat(String)
|
SELF |
AbstractDateAssert.withDateFormat(String userCustomDateFormatPattern)
Instead of using default date formats for the date String based Date assertions like
AbstractDateAssert.isEqualTo(String),
AssertJ is gonna use any date formats registered with one of these methods :
this method
AbstractDateAssert.withDateFormat(java.text.DateFormat)
AbstractDateAssert.registerCustomDateFormat(java.text.DateFormat)
AbstractDateAssert.registerCustomDateFormat(String)
|
SELF |
AbstractDateAssert.withDefaultDateFormatsOnly()
Remove all registered custom date formats => use only the defaults date formats to parse string as date.
|
SELF |
RecursiveComparisonAssert.withEqualsForFields(BiPredicate<?,?> equals,
String... fieldLocations)
Allows to register a
BiPredicate to compare fields with the given locations. |
<T> SELF |
RecursiveComparisonAssert.withEqualsForType(BiPredicate<? super T,? super T> equals,
Class<T> type)
Allows to register a
BiPredicate to compare the fields with the given type. |
SELF |
RecursiveComparisonAssert.withErrorMessageForFields(String message,
String... fieldLocations)
Overrides an error message which would be shown when differences in the given fields while comparison occurred
with the giving error message.
|
SELF |
RecursiveComparisonAssert.withErrorMessageForType(String message,
Class<?> type)
Overrides an error message which would be shown when differences for the giving type while comparison occurred with
the giving error message.
|
SELF |
AbstractMapAssert.withFailMessage(String newErrorMessage,
Object... args) |
SELF |
AbstractListAssert.withFailMessage(String newErrorMessage,
Object... args) |
SELF |
AbstractIterableAssert.withFailMessage(String newErrorMessage,
Object... args) |
SELF |
AbstractAssert.withFailMessage(String newErrorMessage,
Object... args)
Alternative method for
AbstractAssert.overridingErrorMessage(java.lang.String, java.lang.Object...) |
SELF |
AbstractAssert.withFailMessage(Supplier<String> supplier)
Alternative method for
AbstractAssert.overridingErrorMessage(java.lang.String, java.lang.Object...) |
SELF |
AbstractAssert.withRepresentation(Representation representation)
Use the given
Representation to describe/represent values in AssertJ error messages. |
SELF |
RecursiveComparisonAssert.withStrictTypeChecking()
Makes the recursive comparison to check that actual's type is compatible with expected's type (and do the same for each field).
|
SELF |
AbstractMapAssert.withThreadDumpOnError() |
SELF |
AbstractListAssert.withThreadDumpOnError() |
SELF |
AbstractIterableAssert.withThreadDumpOnError() |
SELF |
AbstractAssert.withThreadDumpOnError()
In case of an assertion error, a thread dump will be printed to
System.err. |
Copyright © 2025. All rights reserved.