Package org.assertj.core.api
package org.assertj.core.api
-
ClassDescriptionBase class for all array assertions.Base class for all assertions.AbstractAtomicFieldUpdaterAssert<SELF extends AbstractAtomicFieldUpdaterAssert<SELF,
VALUE, ATOMIC, OBJECT>, VALUE, ATOMIC, OBJECT> Base class for all fieldupdater assertions.AbstractAtomicReferenceAssert<SELF extends AbstractAtomicReferenceAssert<SELF,VALUE, ATOMIC>, VALUE, ATOMIC> Base class for atomic assertions.AbstractBigDecimalAssert<SELF extends AbstractBigDecimalAssert<SELF>>Base class for all implementations of assertions forBigDecimal
s.AbstractBigIntegerAssert<SELF extends AbstractBigIntegerAssert<SELF>>Base class for all implementations of assertions forBigInteger
s.AbstractBooleanArrayAssert<SELF extends AbstractBooleanArrayAssert<SELF>>AbstractBooleanAssert<SELF extends AbstractBooleanAssert<SELF>>Base class for all implementations of assertions forBoolean
s.AbstractByteArrayAssert<SELF extends AbstractByteArrayAssert<SELF>>AbstractByteAssert<SELF extends AbstractByteAssert<SELF>>Base class for all implementations of assertions forByte
s.AbstractCharacterAssert<SELF extends AbstractCharacterAssert<SELF>>Base class for all implementations of assertions forCharacter
s.AbstractCharArrayAssert<SELF extends AbstractCharArrayAssert<SELF>>AbstractCharSequenceAssert<SELF extends AbstractCharSequenceAssert<SELF,ACTUAL>, ACTUAL extends CharSequence> Base class for all implementations of assertions forCharSequence
s.AbstractClassAssert<SELF extends AbstractClassAssert<SELF>>Base class for all implementations of assertions forClass
es.AbstractComparableAssert<SELF extends AbstractComparableAssert<SELF,ACTUAL>, ACTUAL extends Comparable<? super ACTUAL>> Base class for all implementations of
.ComparableAssert
Assertions forCompletableFuture
.AbstractDateAssert<SELF extends AbstractDateAssert<SELF>>Base class for all implementations of assertions forDate
s.AbstractDoubleArrayAssert<SELF extends AbstractDoubleArrayAssert<SELF>>AbstractDoubleAssert<SELF extends AbstractDoubleAssert<SELF>>Base class for all implementations of assertions forDouble
s.Base implementation for Enumerable class assertions.AbstractFileAssert<SELF extends AbstractFileAssert<SELF>>Base class for all implementations of assertions forFile
s.AbstractFloatArrayAssert<SELF extends AbstractFloatArrayAssert<SELF>>AbstractFloatAssert<SELF extends AbstractFloatAssert<SELF>>Base class for all implementations of assertions forFloat
s.AbstractFutureAssert<SELF extends AbstractFutureAssert<SELF,ACTUAL, RESULT>, ACTUAL extends Future<RESULT>, RESULT> AbstractInputStreamAssert<SELF extends AbstractInputStreamAssert<SELF,ACTUAL>, ACTUAL extends InputStream> Base class for all implementations of assertions forInputStream
s.AbstractInstantAssert<SELF extends AbstractInstantAssert<SELF>>Assertions forInstant
type from new Date & Time API introduced in Java 8.AbstractIntArrayAssert<SELF extends AbstractIntArrayAssert<SELF>>AbstractIntegerAssert<SELF extends AbstractIntegerAssert<SELF>>Base class for all implementations of assertions forInteger
s.AbstractIterableAssert<SELF extends AbstractIterableAssert<SELF,ACTUAL, ELEMENT, ELEMENT_ASSERT>, ACTUAL extends Iterable<? extends ELEMENT>, ELEMENT, ELEMENT_ASSERT extends AbstractAssert<ELEMENT_ASSERT, ELEMENT>> Base class for implementations of
whose actual value type isObjectEnumerableAssert
.Collection
AbstractIterableSizeAssert<SELF extends AbstractIterableAssert<SELF,ACTUAL, ELEMENT, ELEMENT_ASSERT>, ACTUAL extends Iterable<? extends ELEMENT>, ELEMENT, ELEMENT_ASSERT extends AbstractAssert<ELEMENT_ASSERT, ELEMENT>> AbstractListAssert<SELF extends AbstractListAssert<SELF,ACTUAL, ELEMENT, ELEMENT_ASSERT>, ACTUAL extends List<? extends ELEMENT>, ELEMENT, ELEMENT_ASSERT extends AbstractAssert<ELEMENT_ASSERT, ELEMENT>> Base class for all implementations of assertions forList
s.AbstractLocalDateAssert<SELF extends AbstractLocalDateAssert<SELF>>Assertions forLocalDate
type from new Date & Time API introduced in Java 8.AbstractLocalDateTimeAssert<SELF extends AbstractLocalDateTimeAssert<SELF>>Assertions forLocalDateTime
type from new Date & Time API introduced in Java 8.AbstractLocalTimeAssert<SELF extends AbstractLocalTimeAssert<SELF>>Assertions forLocalTime
type from new Date & Time API introduced in Java 8.AbstractLongArrayAssert<SELF extends AbstractLongArrayAssert<SELF>>AbstractLongAssert<SELF extends AbstractLongAssert<SELF>>Base class for all implementations of assertions forLong
s.Base class for all implementations of assertions forMap
s.AbstractMapSizeAssert<SELF extends AbstractMapAssert<SELF,A, KEY, VALUE>, A extends Map<KEY, VALUE>, KEY, VALUE> Assertion methods for arrays of objects.Base class for all implementations of assertions forObject
s.AbstractOffsetDateTimeAssert<SELF extends AbstractOffsetDateTimeAssert<SELF>>Assertions forOffsetDateTime
type from new Date & Time API introduced in Java 8.AbstractOffsetTimeAssert<SELF extends AbstractOffsetTimeAssert<SELF>>Assertions forOffsetTime
type from new Date & Time API introduced in Java 8.Assertions forOptional
.AbstractOptionalDoubleAssert<SELF extends AbstractOptionalDoubleAssert<SELF>>Assertions forOptionalDouble
.AbstractOptionalIntAssert<SELF extends AbstractOptionalIntAssert<SELF>>Assertions forOptionalInt
.AbstractOptionalLongAssert<SELF extends AbstractOptionalLongAssert<SELF>>Assertions forOptionalLong
.AbstractPathAssert<SELF extends AbstractPathAssert<SELF>>Assertions forPath
objectsAssertions forPredicate
.AbstractPredicateLikeAssert<SELF extends AbstractPredicateLikeAssert<SELF,PRIMITIVE_PREDICATE, PRIMITIVE>, PRIMITIVE_PREDICATE, PRIMITIVE> Assertions forPredicate
.AbstractShortArrayAssert<SELF extends AbstractShortArrayAssert<SELF>>AbstractShortAssert<SELF extends AbstractShortAssert<SELF>>Base class for all implementations of assertions forShort
s.AbstractTemporalAssert<SELF extends AbstractTemporalAssert<SELF,TEMPORAL>, TEMPORAL extends Temporal> Base class for all implementations of assertions forTemporal
s.Base class for all implementations of assertions forThrowable
s.AbstractUriAssert<SELF extends AbstractUriAssert<SELF>>Base class for all implementations of assertions forURI
s.AbstractUrlAssert<SELF extends AbstractUrlAssert<SELF>>Base class for all implementations of assertions forURL
s.AbstractZonedDateTimeAssert<SELF extends AbstractZonedDateTimeAssert<SELF>>Assertions applicable to primitive arrays or arrays of elements either naturallyComparable
or according to a givenComparator
.Base contract of all assertion objects: the minimum functionality that any assertion object should provide.A marker interface that can be used to wrap your assertion within assertThat method for better readability.AssertFactory<T,ASSERT> A single method factory interface to create anAssert
class for a given type.Information about an assertion.Entry point for assertion methods for different types.Java 8 is picky when choosing the rightassertThat
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 properassertThat
method (normallyassertThat(Throwable)
as foo might implement an interface like List, if that occurredassertThat(List)
would also be a possible choice - thus confusing java 8.Entry point for assertion methods for different data types.Provides aAssert
for the current object.AtomicIntegerFieldUpdaterAssert<OBJECT>Assertion methods forAtomicIntegerFieldUpdater
s.AtomicLongFieldUpdaterAssert<OBJECT>Assertion methods forAtomicLongFieldUpdater
s.Assertion methods forAtomicMarkableReference
s.AtomicReferenceFieldUpdaterAssert<FIELD,OBJECT> Assertion methods forAtomicReferenceFieldUpdater
s.AtomicStampedReferenceAssert<VALUE>Assertion methods forAtomicStampedReference
s.A version ofBDDSoftAssertions
that uses try-with-resources statement to automatically callBDDSoftAssertions.assertAll()
so that you don't forget to.A version ofSoftAssertions
that uses try-with-resources statement to automatically callSoftAssertions.assertAll()
so that you don't forget to.Behavior-driven development style entry point for assertion methods for different types.Suppose we have a test case and in it we'd like to make numerous BDD assertions.Assertion methods forBigDecimal
s.Assertion methods forBigInteger
s.Assertion methods for arrays ofboolean
s.Assertion methods forBoolean
s.Assertion methods for arrays ofbyte
s.Assertion methods forByte
s.Assertion methods forCharacter
s.Assertion methods for arrays ofchar
s.Assertion methods forCharSequence
s.Assertion methods forClass
es.ClassBasedNavigableIterableAssert<SELF extends ClassBasedNavigableIterableAssert<SELF,ACTUAL, ELEMENT, ELEMENT_ASSERT>, ACTUAL extends Iterable<? extends ELEMENT>, ELEMENT, ELEMENT_ASSERT extends AbstractAssert<ELEMENT_ASSERT, ELEMENT>> Build the Assert instance by reflection.ClassBasedNavigableListAssert<SELF extends ClassBasedNavigableListAssert<SELF,ACTUAL, ELEMENT, ELEMENT_ASSERT>, ACTUAL extends List<? extends ELEMENT>, ELEMENT, ELEMENT_ASSERT extends AbstractAssert<ELEMENT_ASSERT, ELEMENT>> Build the Assert instance by reflection.ComparableAssert<SELF extends ComparableAssert<SELF,ACTUAL>, ACTUAL extends Comparable<? super ACTUAL>> Assertion methods applicable to
s.Comparable
CompletableFutureAssert<RESULT>Assertions forCompletableFuture
.Condition<T>A condition to be met by an object.Assertions forDate
s.Descriptable<SELF extends Descriptable<SELF>>An object that has a description.Assertion methods for arrays ofdouble
s.Assertion methods forDouble
s.Assertions forPredicate
.Assertions applicable to groups of values that can be enumerated (e.g.Collects error messages of all AssertionErrors thrown by the proxied method.Mechanism for extending assertion classes.FactoryBasedNavigableIterableAssert<SELF extends FactoryBasedNavigableIterableAssert<SELF,ACTUAL, ELEMENT, ELEMENT_ASSERT>, ACTUAL extends Iterable<? extends ELEMENT>, ELEMENT, ELEMENT_ASSERT extends AbstractAssert<ELEMENT_ASSERT, ELEMENT>> Provides helper methods for navigating a list property in a generated assertion class so we can chain assertions through deeply nested models more easily.FactoryBasedNavigableListAssert<SELF extends FactoryBasedNavigableListAssert<SELF,ACTUAL, ELEMENT, ELEMENT_ASSERT>, ACTUAL extends List<? extends ELEMENT>, ELEMENT, ELEMENT_ASSERT extends AbstractAssert<ELEMENT_ASSERT, ELEMENT>> Provides helper methods for navigating a list property in a generated assertion class so we can chain assertions through deeply nested models more easily.Common failures.Assertion methods forFile
s.Assertion methods for arrays offloat
s.Assertion methods for floats.FloatingPointNumberAssert<SELF extends FloatingPointNumberAssert<SELF,ACTUAL>, ACTUAL extends Number> Assertion methods applicable to floating-point
s.Number
FutureAssert<RESULT>Assertion methods forFuture
.GenericComparableAssert<ACTUAL extends Comparable<? super ACTUAL>>Concrete generic
to be used throughComparableAssert
Assertions.assertThat(java.lang.Comparable)
.Assertions methods applicable to indexed groups of objects (e.g.Assertion methods forInputStream
s.Assertion methods forInstant
s.Assertion methods for arrays ofint
s.Assertion methods forInteger
s.Assertions forPredicate
.IterableAssert<ELEMENT>Assertion methods forIterable
.AbstractBDDSoftAssertions compatible with Android.AbstractStandardSoftAssertions compatible with Android.Assertions compatible with Android.Android-compatible BDD-style assertions duplicated fromBDDAssertions
.BDD-style Android-compatible soft assertions.Duplicate ofJUnitBDDSoftAssertions
compatible with Android.JUnitSoftAssertions rule compatible with Android.Soft assertions compatible with Android.Same asSoftAssertions
, but with the following differences:
First, it's a junit rule, which can be used without having to callassertAll()
, example:Same asSoftAssertions
, but with the following differences:
First, it's a junit rule, which can be used without having to callassertAll()
, example:ListAssert<ELEMENT>Assertion methods forList
s.ListAssert.ListFromStream<ELEMENT,STREAM extends BaseStream<ELEMENT, STREAM>> Assertion methods for arrays oflong
s.Assertion methods forLong
s.Assertions forLongPredicate
.MapAssert<KEY,VALUE> Assertions forMap
s.MapSizeAssert<KEY,VALUE> Assertion methods applicable to
s.Number
ObjectArrayAssert<ELEMENT>Assertion methods for arrays of objects.ObjectAssert<ACTUAL>Assertion methods forObject
s.Assertions methods applicable to groups of objects (e.g.OptionalAssert<VALUE>Assertions forOptional
.Assertions forOptionalDouble
.Assertions forOptionalInt
.Assertions forOptionalLong
.Assertion class forPath
sAssertions forPredicate
.Assertion methods for arrays ofshort
s.Assertion methods forShort
s.Concrete assertions forClass
s without any final methods to allow proxying.An AssertionError that contains the error messages of the one or more AssertionErrors that caused this exception to be thrown.SoftAssertionIterableAssert<ELEMENT>Concrete assertions forIterable
s without any final methods to allow proxying.SoftAssertionListAssert<ELEMENT>Concrete assertions forList
s without any final methods to allow proxying.SoftAssertionMapAssert<KEY,VALUE> Concrete assertions forMap
s without any final methods to allow proxying.Concrete assertions forPredicate
s without any final methods to allow proxying.Suppose we have a test case and in it we'd like to make numerous assertions.Assertion methods forString
s.Assertion methods forThrowable
s.ThrowableAssertAlternative<T extends Throwable>Assertion methods forThrowable
similar toThrowableAssert
but with assertions methods named differently to make testing code fluent (ex :withMessage
instead ofhasMessage
.ThrowableTypeAssert<T extends Throwable>Assertion class checkingThrowable
type.Assertion class forURI
sAssertion class forURL
sA unified entry point to all non-deprecated assertions from both the new Java 8 core API and the pre-Java 8 core API.Writable information about an assertion.Assertions forZonedDateTime
type from new Date & Time API introduced in Java 8.