Package org.assertj.core.api
Interface AssertFactory<T,ASSERT extends Assert<?,?>>
-
- Type Parameters:
T
- the type of the input to the factory.ASSERT
- the type of the resultingAssert
.
- All Known Implementing Classes:
InstanceOfAssertFactory
,ObjectAssertFactory
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface AssertFactory<T,ASSERT extends Assert<?,?>>
A single method factory interface to create anAssert
for a given value. This factory method typically wraps a call toassertThat(t)
to produce a concrete assert typeASSERT
for the input element of typeT
.This interface is typically used by navigation assertions on iterable types like
AbstractIterableAssert
when callingassertThat(Iterable<E>, AssertFactory<E, ASSERT>)
- Since:
- 2.5.0 / 3.5.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ASSERT
createAssert(T t)
Creates the custom Assert object for the given element value.
-