Package org.assertj.core.api
Interface AssertFactory<T,ASSERT>
- Type Parameters:
T
- the type to create assertions for.ASSERT
- the assertions class for T.
- All Known Implementing Classes:
ObjectAssertFactory
public interface AssertFactory<T,ASSERT>
A single method factory interface to create an
Assert
class for a given type.
This factory method typically wraps a call to assertThat(t)
to map to the concrete assert type ASSERT
for the element T
.
This interface is typically used by navigation assertions on iterable types like AbstractIterableAssert
when calling
assertThat(Iterable<E>, AssertFactory<E, ASSERT>)
- Since:
- 2.5.0 / 3.5.0
-
Method Summary
Modifier and TypeMethodDescriptioncreateAssert
(T t) Creates the custom Assert object for the given element value.
-
Method Details
-
createAssert
Creates the custom Assert object for the given element value. Typically this will just invokeassertThat(t)
- Parameters:
t
- the type to convert to an Assert object- Returns:
- returns
assertThat(t)
-