T - the type to use for the cast.ASSERT - the type of the resulting Assert.public class InstanceOfAssertFactory<T,ASSERT extends AbstractAssert<?,?>> extends java.lang.Object implements AssertFactory<java.lang.Object,ASSERT>
AssertFactory decorator which casts the input value to the given type before invoking the decorated AssertFactory.| Modifier and Type | Field and Description |
|---|---|
private AssertFactory<T,ASSERT> |
assertFactory |
private java.lang.Class<T> |
type |
| Constructor and Description |
|---|
InstanceOfAssertFactory(java.lang.Class<T> type,
AssertFactory<T,ASSERT> assertFactory)
Instantiates a new
InstanceOfAssertFactory. |
| Modifier and Type | Method and Description |
|---|---|
ASSERT |
createAssert(java.lang.Object value)
Creates the custom Assert object for the given element value.
|
(package private) java.lang.Class<T> |
getType() |
private final java.lang.Class<T> type
private final AssertFactory<T,ASSERT extends AbstractAssert<?,?>> assertFactory
public InstanceOfAssertFactory(java.lang.Class<T> type, AssertFactory<T,ASSERT> assertFactory)
InstanceOfAssertFactory.type - the Class instance of the given type.assertFactory - the AssertFactory to decorate.java.lang.Class<T> getType()
public ASSERT createAssert(java.lang.Object value)
assertThat(t)createAssert in interface AssertFactory<java.lang.Object,ASSERT extends AbstractAssert<?,?>>value - the type to convert to an Assert object