| Package | Description |
|---|---|
| org.assertj.core.api |
| Modifier and Type | Method and Description |
|---|---|
static <ELEMENT> InstanceOfAssertFactory<ELEMENT[],ObjectArrayAssert<ELEMENT>> |
InstanceOfAssertFactories.array(Class<ELEMENT[]> arrayType)
InstanceOfAssertFactory for an array of elements. |
static <ELEMENT> InstanceOfAssertFactory<ELEMENT[][],Object2DArrayAssert<ELEMENT>> |
InstanceOfAssertFactories.array2D(Class<ELEMENT[][]> arrayType)
InstanceOfAssertFactory for an two-dimensional array of elements. |
default <T,ASSERT extends AbstractAssert<?,?>> |
WithAssertions.as(InstanceOfAssertFactory<T,ASSERT> assertFactory)
A syntax sugar to write fluent assertion with methods having an
InstanceOfAssertFactory parameter. |
static <T,ASSERT extends AbstractAssert<?,?>> |
BDDAssertions.as(InstanceOfAssertFactory<T,ASSERT> assertFactory)
A syntax sugar to write fluent assertion with methods having an
InstanceOfAssertFactory parameter. |
static <T,ASSERT extends AbstractAssert<?,?>> |
Assertions.as(InstanceOfAssertFactory<T,ASSERT> assertFactory)
A syntax sugar to write fluent assertion with methods having an
InstanceOfAssertFactory parameter. |
static <OBJECT> InstanceOfAssertFactory<AtomicIntegerFieldUpdater,AtomicIntegerFieldUpdaterAssert<OBJECT>> |
InstanceOfAssertFactories.atomicIntegerFieldUpdater(Class<OBJECT> objectType)
|
static <OBJECT> InstanceOfAssertFactory<AtomicLongFieldUpdater,AtomicLongFieldUpdaterAssert<OBJECT>> |
InstanceOfAssertFactories.atomicLongFieldUpdater(Class<OBJECT> objectType)
|
static <VALUE> InstanceOfAssertFactory<AtomicMarkableReference,AtomicMarkableReferenceAssert<VALUE>> |
InstanceOfAssertFactories.atomicMarkableReference(Class<VALUE> valueType)
|
static <VALUE> InstanceOfAssertFactory<AtomicReference,AtomicReferenceAssert<VALUE>> |
InstanceOfAssertFactories.atomicReference(Class<VALUE> valueType)
|
static <ELEMENT> InstanceOfAssertFactory<AtomicReferenceArray,AtomicReferenceArrayAssert<ELEMENT>> |
InstanceOfAssertFactories.atomicReferenceArray(Class<ELEMENT> elementType)
|
static <FIELD,OBJECT> |
InstanceOfAssertFactories.atomicReferenceFieldUpdater(Class<FIELD> fieldType,
Class<OBJECT> objectType)
|
static <VALUE> InstanceOfAssertFactory<AtomicStampedReference,AtomicStampedReferenceAssert<VALUE>> |
InstanceOfAssertFactories.atomicStampedReference(Class<VALUE> valueType)
|
static <E> InstanceOfAssertFactory<Collection,AbstractCollectionAssert<?,Collection<? extends E>,E,ObjectAssert<E>>> |
InstanceOfAssertFactories.collection(Class<E> elementType)
|
static <T extends Comparable<? super T>> |
InstanceOfAssertFactories.comparable(Class<T> comparableType)
|
static <RESULT> InstanceOfAssertFactory<CompletableFuture,CompletableFutureAssert<RESULT>> |
InstanceOfAssertFactories.completableFuture(Class<RESULT> resultType)
|
static <RESULT> InstanceOfAssertFactory<CompletionStage,CompletableFutureAssert<RESULT>> |
InstanceOfAssertFactories.completionStage(Class<RESULT> resultType)
|
static <RESULT> InstanceOfAssertFactory<Future,FutureAssert<RESULT>> |
InstanceOfAssertFactories.future(Class<RESULT> resultType)
InstanceOfAssertFactory for a Future. |
static <ELEMENT> InstanceOfAssertFactory<Iterable,IterableAssert<ELEMENT>> |
InstanceOfAssertFactories.iterable(Class<ELEMENT> elementType)
InstanceOfAssertFactory for an Iterable. |
static <ELEMENT> InstanceOfAssertFactory<Iterator,IteratorAssert<ELEMENT>> |
InstanceOfAssertFactories.iterator(Class<ELEMENT> elementType)
InstanceOfAssertFactory for an Iterator. |
static <ELEMENT> InstanceOfAssertFactory<List,ListAssert<ELEMENT>> |
InstanceOfAssertFactories.list(Class<ELEMENT> elementType)
InstanceOfAssertFactory for a List. |
static <K,V> InstanceOfAssertFactory<Map,MapAssert<K,V>> |
InstanceOfAssertFactories.map(Class<K> keyType,
Class<V> valueType)
InstanceOfAssertFactory for a Map. |
static <VALUE> InstanceOfAssertFactory<Optional,OptionalAssert<VALUE>> |
InstanceOfAssertFactories.optional(Class<VALUE> resultType)
InstanceOfAssertFactory for an Optional. |
static <T> InstanceOfAssertFactory<Predicate,PredicateAssert<T>> |
InstanceOfAssertFactories.predicate(Class<T> type)
InstanceOfAssertFactory for a Predicate. |
static <ELEMENT> InstanceOfAssertFactory<Spliterator,SpliteratorAssert<ELEMENT>> |
InstanceOfAssertFactories.spliterator(Class<ELEMENT> elementType)
|
static <ELEMENT> InstanceOfAssertFactory<Stream,ListAssert<ELEMENT>> |
InstanceOfAssertFactories.stream(Class<ELEMENT> elementType)
InstanceOfAssertFactory for a Stream. |
static <T extends Throwable> |
InstanceOfAssertFactories.throwable(Class<T> type)
InstanceOfAssertFactory for a Throwable. |
static <T> InstanceOfAssertFactory<T,ObjectAssert<T>> |
InstanceOfAssertFactories.type(Class<T> type)
InstanceOfAssertFactory for an object of a specific type. |
| Modifier and Type | Method and Description |
|---|---|
default <T,ASSERT extends AbstractAssert<?,?>> |
WithAssertions.as(InstanceOfAssertFactory<T,ASSERT> assertFactory)
A syntax sugar to write fluent assertion with methods having an
InstanceOfAssertFactory parameter. |
static <T,ASSERT extends AbstractAssert<?,?>> |
BDDAssertions.as(InstanceOfAssertFactory<T,ASSERT> assertFactory)
A syntax sugar to write fluent assertion with methods having an
InstanceOfAssertFactory parameter. |
static <T,ASSERT extends AbstractAssert<?,?>> |
Assertions.as(InstanceOfAssertFactory<T,ASSERT> assertFactory)
A syntax sugar to write fluent assertion with methods having an
InstanceOfAssertFactory parameter. |
<ASSERT extends AbstractAssert<?,?>> |
Assert.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. |
<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. |
<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. |
<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. |
<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.
|
<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.
|
<ASSERT extends AbstractAssert<?,?>> |
AbstractIterableAssert.first(InstanceOfAssertFactory<?,ASSERT> assertFactory)
Navigate and allow to perform assertions on the first element of the
Iterable under test. |
<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. |
<ASSERT extends AbstractAssert<?,?>> |
AbstractIterableAssert.last(InstanceOfAssertFactory<?,ASSERT> assertFactory)
Navigate and allow to perform assertions on the last element of the
Iterable under test. |
<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. |
<ASSERT extends AbstractAssert<?,?>> |
AbstractFutureAssert.succeedsWithin(Duration timeout,
InstanceOfAssertFactory<RESULT,ASSERT> assertFactory)
Waits if necessary for at most the given time for this future to complete, the
InstanceOfAssertFactory
parameter is used to return assertions specific to the the future's result type. |
<ASSERT extends AbstractAssert<?,?>> |
AbstractCompletableFutureAssert.succeedsWithin(Duration timeout,
InstanceOfAssertFactory<RESULT,ASSERT> assertFactory)
Waits if necessary for at most the given time for this future to complete, the
InstanceOfAssertFactory
parameter is used to return assertions specific to the the future's result type. |
<ASSERT extends AbstractAssert<?,?>> |
AbstractFutureAssert.succeedsWithin(long timeout,
TimeUnit unit,
InstanceOfAssertFactory<RESULT,ASSERT> assertFactory)
Waits if necessary for at most the given time for this future to complete, the
InstanceOfAssertFactory
parameter is used to return assertions specific to the the future's result type. |
<ASSERT extends AbstractAssert<?,?>> |
AbstractCompletableFutureAssert.succeedsWithin(long timeout,
TimeUnit unit,
InstanceOfAssertFactory<RESULT,ASSERT> assertFactory)
Waits if necessary for at most the given time for this future to complete, the
InstanceOfAssertFactory
parameter is used to return assertions specific to the the future's result type. |
Copyright © 2025. All rights reserved.