Package org.assertj.core.api
package org.assertj.core.api
-
ClassDescriptionBase class for all two-dimensional array assertions.Base 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.AbstractBigDecimalScaleAssert<SELF extends AbstractBigDecimalAssert<SELF>>Base class for BigDecimal scale assertions.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.AbstractCollectionAssert<SELF extends AbstractCollectionAssert<SELF,ACTUAL, ELEMENT, ELEMENT_ASSERT>, ACTUAL extends Collection<? extends ELEMENT>, ELEMENT, ELEMENT_ASSERT extends AbstractAssert<ELEMENT_ASSERT, ELEMENT>> Base class for all implementations of assertions forCollection
s.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.AbstractDurationAssert<SELF extends AbstractDurationAssert<SELF>>Assertions forDuration
type.Base implementation for Enumerable class assertions.AbstractFileAssert<SELF extends AbstractFileAssert<SELF>>Base class for all implementations of assertions forFile
s.AbstractFileSizeAssert<SELF extends AbstractFileAssert<SELF>>Base class for file size assertions.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>> Base class for all implementations of assertions forIterator
s.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.AbstractLongAdderAssert<SELF extends AbstractLongAdderAssert<SELF>>Base class for all implementations of assertions forLongAdder
s.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> AbstractMatcherAssert<SELF extends AbstractMatcherAssert<SELF>>Assertions forMatcher
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
objectsAbstractPeriodAssert<SELF extends AbstractPeriodAssert<SELF>>Assertions forPeriod
type.Assertions forPredicate
.AbstractShortArrayAssert<SELF extends AbstractShortArrayAssert<SELF>>AbstractShortAssert<SELF extends AbstractShortAssert<SELF>>Base class for all implementations of assertions forShort
s.Assertions forSpliterator
type.AbstractStringAssert<SELF extends AbstractStringAssert<SELF>>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.Base class forComparable
assertions.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 two-dimensional arrays.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 extends Assert<?, ?>> A single method factory interface to create anAssert
for a given value.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.Interface implemented by all proxies and serves as a type safe setter.Provides aAssert
for the current object.Responsible for building the exception to throw for failing assumptions.Entry point for assumption methods for different types, which allow to skip test execution on failed assumptions.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 callAbstractSoftAssertions.assertAll()
so that you don't forget to.A version ofSoftAssertions
that uses try-with-resources statement to automatically callAbstractSoftAssertions.assertAll()
so that you don't forget to.Parent interface for soft assertion implementations.Behavior-driven development style entry point for assertion methods for different types.Behavior-driven development style entry point for assumption methods for different types, which allow to skip test execution when assumptions are not met.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 two-dimensional arrays ofboolean
s.Assertion methods for arrays ofboolean
s.Assertion methods forBoolean
s.Assertion methods for two-dimensional arrays ofbyte
s.Assertion methods for arrays ofbyte
s.Assertion methods forByte
s.Assertion methods for two-dimensional arrays ofchar
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.CollectionAssert<ELEMENT>Assertion methods forCollection
s.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.Describes the condition status after being evaluated.Assertions forDate
s.Descriptable<SELF>An object that has a description.Assertion methods for two-dimensional arrays ofdouble
s.Assertion methods for arrays ofdouble
s.Assertion methods forDouble
s.Assertions forPredicate
.Assertion methods forDuration
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.Reusable assertions for two-dimensional arrays offloat
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)
.Allows to use a Hamcrest matcher as a condition.Assertions methods applicable to indexed groups of objects (e.g.Assertion methods forInputStream
s.InstanceOfAssertFactory<T,ASSERT extends AbstractAssert<?, ?>> AssertFactory
decorator which casts the input value to the given type before invoking the decoratedAssertFactory
.Assertion methods forInstant
s.Assertion methods for two-dimensional arrays ofint
s.Assertion methods for arrays ofint
s.Assertion methods forInteger
s.Assertions forPredicate
.IterableAssert<ELEMENT>Assertion methods forIterable
.IteratorAssert<ELEMENT>Assertion methods forIterator
.Deprecated.For Android compatible assertions use the latest assertj 2.x version which is based on Java 7 only.Deprecated.For Android compatible assertions use the latest assertj 2.x version which is based on Java 7 only.Deprecated.For Android compatible assertions use the latest assertj 2.x version which is based on Java 7 only.AbstractBDDSoftAssertions compatible with Android.Deprecated.For Android compatible assertions use the latest assertj 2.x version which is based on Java 7 only.Deprecated.For Android compatible assertions use the latest assertj 2.x version which is based on Java 7 only.Deprecated.For Android compatible assertions use the latest assertj 2.x version which is based on Java 7 only.AbstractStandardSoftAssertions 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:Deprecated.useSoftAssertionsExtension
instead.Deprecated.useSoftAssertionsExtension
instead.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.Assertion methods for two-dimensional arrays oflong
s.Assertions forLongAdder
.Assertion methods for arrays oflong
s.Assertion methods forLong
s.Assertions forLongPredicate
.MapAssert<KEY,VALUE> Assertions forMap
s.MapSizeAssert<KEY,VALUE> Assertions forMatcher
.Assertion class checking aThrowableAssert.ThrowingCallable
throws no exception.Assertion methods applicable to
s.Number
Object2DArrayAssert<ELEMENT>Assertion methods for two-dimensional arrays of objects.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
sAssertion methods forPeriod
Assertions forPredicate
.An assertion that supports asserting aPredicate
over all the fields of an object graph.RecursiveComparisonAssert<SELF extends RecursiveComparisonAssert<SELF>>Assertion methods for arrays ofshort
s.Assertion methods for arrays ofshort
s.Assertion methods forShort
s.An AssertionError that contains the error messages of the one or more AssertionErrors that caused this exception to be thrown.Suppose we have a test case and in it we'd like to make numerous assertions.Parent interface for soft assertion implementations.SoftThrowableAssertAlternative<ACTUAL extends Throwable>ThrowableAssertAlternative
subclass used in soft assertions.SoftThrowableTypeAssert<T extends Throwable>ThrowableTypeAssert for soft assertions.SpliteratorAssert<ELEMENT>Assertion methods forSpliterator
s.Assertion methods forString
s.ThrowableAssert<ACTUAL extends Throwable>Assertion methods forThrowable
s.ThrowableAssertAlternative<ACTUAL 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.Consumer
that deals with checked exceptions by rethrowing them asRuntimeException
.Comparable
assertions.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.A unified entry point to all assumptions 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.