Uses of Class
org.assertj.core.api.AbstractListAssert
-
Uses of AbstractListAssert in org.assertj.core.api
Modifier and TypeClassDescriptionclass
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.Modifier and TypeClassDescriptionclass
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.class
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.class
ListAssert<ELEMENT>
Assertion methods forList
s.Modifier and TypeMethodDescriptionAbstractAssert.asList()
Deprecated.Assert.asList()
Deprecated.static <T> AbstractListAssert
<?, List<? extends T>, T, ObjectAssert<T>> Java6Assertions.assertThat
(List<? extends T> actual) Deprecated.Creates a new instance of
.ListAssert
default AbstractListAssert
<?, List<? extends Double>, Double, ObjectAssert<Double>> StandardSoftAssertionsProvider.assertThat
(DoubleStream actual) Creates a new instance of
from the givenListAssert
DoubleStream
.default AbstractListAssert
<?, List<? extends Integer>, Integer, ObjectAssert<Integer>> StandardSoftAssertionsProvider.assertThat
(IntStream actual) Creates a new instance of
from the givenListAssert
IntStream
.default AbstractListAssert
<?, List<? extends Long>, Long, ObjectAssert<Long>> StandardSoftAssertionsProvider.assertThat
(LongStream actual) Creates a new instance of
from the givenListAssert
LongStream
.default <ELEMENT> AbstractListAssert
<?, List<? extends ELEMENT>, ELEMENT, ObjectAssert<ELEMENT>> StandardSoftAssertionsProvider.assertThat
(Stream<? extends ELEMENT> actual) Creates a new instance of
from the givenListAssert
Stream
.default <ELEMENT> AbstractListAssert
<?, List<? extends ELEMENT>, ELEMENT, ObjectAssert<ELEMENT>> StandardSoftAssertionsProvider.assertThatStream
(Stream<? extends ELEMENT> actual) Creates a new instance of
from the givenListAssert
Stream
.static AbstractListAssert
<?, List<? extends Double>, Double, ObjectAssert<Double>> Assumptions.assumeThat
(DoubleStream actual) Creates a new instance of
assumption from the givenListAssert
DoubleStream
.static AbstractListAssert
<?, List<? extends Integer>, Integer, ObjectAssert<Integer>> Assumptions.assumeThat
(IntStream actual) Creates a new instance of
assumption from the givenListAssert
IntStream
.static AbstractListAssert
<?, List<? extends Long>, Long, ObjectAssert<Long>> Assumptions.assumeThat
(LongStream actual) Creates a new instance of
assumption from the givenListAssert
LongStream
.static <ELEMENT> AbstractListAssert
<?, List<? extends ELEMENT>, ELEMENT, ObjectAssert<ELEMENT>> Assumptions.assumeThat
(Stream<? extends ELEMENT> actual) Creates a new instance of
assumption from the givenListAssert
Stream
.default AbstractListAssert
<?, List<? extends Double>, Double, ObjectAssert<Double>> WithAssumptions.assumeThat
(DoubleStream doubleStream) Creates a new instance of
assumption from the givenListAssert
DoubleStream
.default AbstractListAssert
<?, List<? extends Integer>, Integer, ObjectAssert<Integer>> WithAssumptions.assumeThat
(IntStream intStream) Creates a new instance of
assumption from the givenListAssert
IntStream
.default AbstractListAssert
<?, List<? extends Long>, Long, ObjectAssert<Long>> WithAssumptions.assumeThat
(LongStream longStream) Creates a new instance of
assumption from the givenListAssert
LongStream
.default <ELEMENT> AbstractListAssert
<?, List<? extends ELEMENT>, ELEMENT, ObjectAssert<ELEMENT>> WithAssumptions.assumeThat
(Stream<? extends ELEMENT> stream) Creates a new instance of
assumption from the givenListAssert
Stream
.static <ELEMENT> AbstractListAssert
<?, List<? extends ELEMENT>, ELEMENT, ObjectAssert<ELEMENT>> Assumptions.assumeThatStream
(Stream<? extends ELEMENT> actual) Creates a new instance of
assumption from the givenListAssert
Stream
.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.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.<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.final AbstractListAssert
<?, List<? extends Tuple>, Tuple, ObjectAssert<Tuple>> AbstractIterableAssert.extracting
(Function<? super ELEMENT, ?>... extractors) <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.<V,
EXCEPTION extends Exception>
AbstractListAssert<?, List<? extends V>, V, ObjectAssert<V>> 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.AbstractMapAssert.extracting
(Object... keys) Deprecated.useAbstractMapAssert.extractingByKeys(Object[])
insteadAbstractListAssert
<?, 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 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.<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.final AbstractListAssert
<?, List<? extends Tuple>, Tuple, ObjectAssert<Tuple>> AbstractObjectArrayAssert.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,
EXCEPTION extends Exception>
AbstractListAssert<?, List<? extends V>, V, ObjectAssert<V>> 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.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.final AbstractListAssert
<?, List<?>, Object, ObjectAssert<Object>> AbstractObjectAssert.extracting
(Function<? super ACTUAL, ?>... extractors) Uses the givenFunction
s to extract the values from the object under test into a list, this new list becoming the object under test.final 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.protected AbstractListAssert
<?, List<? extends V>, V, ObjectAssert<V>> AbstractMapAssert.extractingByKeysForProxy
(K[] keys) protected AbstractListAssert
<?, List<? extends Tuple>, Tuple, ObjectAssert<Tuple>> AbstractIterableAssert.extractingForProxy
(Function<? super ELEMENT, ?>[] extractors) protected AbstractListAssert
<?, List<? extends Tuple>, Tuple, ObjectAssert<Tuple>> AbstractObjectArrayAssert.extractingForProxy
(Function<? super ELEMENT, ?>[] extractors) protected AbstractListAssert
<?, List<?>, Object, ObjectAssert<Object>> AbstractObjectAssert.extractingForProxy
(Function<? super ACTUAL, ?>[] extractors) final AbstractListAssert
<?, List<? extends Tuple>, Tuple, ObjectAssert<Tuple>> protected AbstractListAssert
<?, List<? extends Tuple>, Tuple, ObjectAssert<Tuple>> AbstractMapAssert.extractingFromEntriesForProxy
(Function<? super Map.Entry<K, V>, Object>[] extractors) 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> 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.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.<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.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.AbstractListAssert
<?, List<? extends Object>, Object, ObjectAssert<Object>> AbstractIterableAssert.flatExtracting
(String... fieldOrPropertyNames) Extract the given property/field values from eachIterable
's element and flatten the extracted values in a list that is used as the new object under test.final AbstractListAssert
<?, List<? extends Object>, Object, ObjectAssert<Object>> AbstractIterableAssert.flatExtracting
(Function<? super ELEMENT, ?>... extractors) Extracts multiple values from eachIterable
's element according to the givenFunction
s 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.final <EXCEPTION extends Exception>
AbstractListAssert<?, List<? extends Object>, Object, ObjectAssert<Object>> AbstractIterableAssert.flatExtracting
(ThrowingExtractor<? super ELEMENT, ?, EXCEPTION>... extractors) Extracts multiple values from eachIterable
's element according to the givenThrowingExtractor
s and concatenates/flattens them in a list that becomes the object under test.<V,
EXCEPTION extends Exception>
AbstractListAssert<?, List<? extends V>, V, ObjectAssert<V>> 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.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>> 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.<V,
C extends Collection<V>>
AbstractListAssert<?, List<? extends V>, V, ObjectAssert<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.<V,
C extends Collection<V>, EXCEPTION extends Exception>
AbstractListAssert<?, List<? extends V>, V, ObjectAssert<V>> 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.protected AbstractListAssert
<?, List<? extends Object>, Object, ObjectAssert<Object>> AbstractIterableAssert.flatExtractingForProxy
(Function<? super ELEMENT, ?>[] extractors) final AbstractListAssert
<?, List<? extends Object>, Object, ObjectAssert<Object>> Maps multiple values from eachIterable
's element according to the givenFunction
s 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 givenFunction
and flattens the resulting collections in a list becoming the object under test.final <EXCEPTION extends Exception>
AbstractListAssert<?, List<? extends Object>, Object, ObjectAssert<Object>> AbstractIterableAssert.flatMap
(ThrowingExtractor<? super ELEMENT, ?, EXCEPTION>... mappers) Maps multiple values from eachIterable
's element according to the givenThrowingExtractor
s and concatenates/flattens them in a list that becomes the object under test.<V,
EXCEPTION extends Exception>
AbstractListAssert<?, List<? extends V>, V, ObjectAssert<V>> 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.static AbstractListAssert
<?, List<? extends Double>, Double, ObjectAssert<Double>> BDDAssumptions.given
(DoubleStream actual) Creates a new assumption's instance for aDoubleStream
value.static AbstractListAssert
<?, List<? extends Integer>, Integer, ObjectAssert<Integer>> Creates a new assumption's instance for anIntStream
value.static AbstractListAssert
<?, List<? extends Long>, Long, ObjectAssert<Long>> BDDAssumptions.given
(LongStream actual) Creates a new assumption's instance for aLongStream
value.static <ELEMENT> AbstractListAssert
<?, List<? extends ELEMENT>, ELEMENT, ObjectAssert<ELEMENT>> Creates a new assumption's instance for aStream
value.static <ELEMENT> AbstractListAssert
<?, List<? extends ELEMENT>, ELEMENT, ObjectAssert<ELEMENT>> BDDAssumptions.givenStream
(Stream<? extends ELEMENT> actual) Creates a new assumption's instance of a
value.Stream
final AbstractListAssert
<?, List<? extends Tuple>, Tuple, ObjectAssert<Tuple>> <V> AbstractListAssert
<?, List<? extends V>, V, ObjectAssert<V>> Maps the Iterable's elements under test by applying a mapping function, the resulting list becomes the instance under test.<V,
EXCEPTION extends Exception>
AbstractListAssert<?, List<? extends V>, V, ObjectAssert<V>> 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.protected <E> AbstractListAssert
<?, List<? extends E>, E, ObjectAssert<E>> AbstractAssert.newListAssertInstance
(List<? extends E> newActual) Create aAbstractListAssert
from the given list.protected <E> AbstractListAssert
<?, List<? extends E>, E, ObjectAssert<E>> AbstractObjectArrayAssert.newListAssertInstance
(List<? extends E> newActual) Create a friendly soft or "hard" assertion.default AbstractListAssert
<?, List<? extends Double>, Double, ObjectAssert<Double>> BDDSoftAssertionsProvider.then
(DoubleStream actual) Creates a new instance of
from the givenListAssert
DoubleStream
.default AbstractListAssert
<?, List<? extends Integer>, Integer, ObjectAssert<Integer>> Creates a new instance of
from the givenListAssert
IntStream
.default AbstractListAssert
<?, List<? extends Long>, Long, ObjectAssert<Long>> BDDSoftAssertionsProvider.then
(LongStream actual) Creates a new instance of
from the givenListAssert
LongStream
.default <ELEMENT> AbstractListAssert
<?, List<? extends ELEMENT>, ELEMENT, ObjectAssert<ELEMENT>> Creates a new instance of
from the givenListAssert
Stream
.static <T> AbstractListAssert
<?, List<? extends T>, T, ObjectAssert<T>> Deprecated.Creates a new instance of
.ListAssert
asInstanceOf(InstanceOfAssertFactories.LIST)
instead