Package org.assertj.core.api
Class InstanceOfAssertFactory<T,ASSERT extends AbstractAssert<?,?>>
java.lang.Object
org.assertj.core.api.InstanceOfAssertFactory<T,ASSERT>
- Type Parameters:
T
- the type to use for the cast.ASSERT
- the type of the resultingAssert
.
- All Implemented Interfaces:
AssertFactory<Object,
ASSERT>
public class InstanceOfAssertFactory<T,ASSERT extends AbstractAssert<?,?>>
extends Object
implements AssertFactory<Object,ASSERT>
AssertFactory
decorator which casts the input value to the given type before invoking the decorated AssertFactory
.- Since:
- 3.13.0
- Author:
- Stefano Cordio
-
Constructor Summary
ConstructorDescriptionInstanceOfAssertFactory
(Class<T> type, AssertFactory<T, ASSERT> assertFactory) Instantiates a newInstanceOfAssertFactory
. -
Method Summary
Modifier and TypeMethodDescriptioncreateAssert
(Object value) Creates the custom Assert object for the given element value.toString()
-
Constructor Details
-
InstanceOfAssertFactory
Instantiates a newInstanceOfAssertFactory
.- Parameters:
type
- theClass
instance of the given type.assertFactory
- theAssertFactory
to decorate.
-
-
Method Details
-
createAssert
Creates the custom Assert object for the given element value. Typically this will just invokeassertThat(t)
- Specified by:
createAssert
in interfaceAssertFactory<T,
ASSERT extends AbstractAssert<?, ?>> - Parameters:
value
- the type to convert to an Assert object- Returns:
- returns the custom Assert object for the given element value
-
toString
-