public class ShouldBeInstance extends BasicErrorMessageFactory
arguments, format, formatter
Modifier | Constructor and Description |
---|---|
private |
ShouldBeInstance(java.lang.Object object,
java.lang.Class<?> type) |
private |
ShouldBeInstance(java.lang.String objectDescription,
java.lang.Class<?> type) |
private |
ShouldBeInstance(java.lang.Throwable throwable,
java.lang.Class<?> type) |
Modifier and Type | Method and Description |
---|---|
static ErrorMessageFactory |
shouldBeInstance(java.lang.Object object,
java.lang.Class<?> type)
Creates a new
. |
static ErrorMessageFactory |
shouldBeInstanceButWasNull(java.lang.String objectDescription,
java.lang.Class<?> type)
Creates a new
when object we want to check type is null. |
create, create, create, equals, hashCode, toString, unquotedString
private ShouldBeInstance(java.lang.Object object, java.lang.Class<?> type)
private ShouldBeInstance(java.lang.Throwable throwable, java.lang.Class<?> type)
private ShouldBeInstance(java.lang.String objectDescription, java.lang.Class<?> type)
public static ErrorMessageFactory shouldBeInstance(java.lang.Object object, java.lang.Class<?> type)
ShouldBeInstance
.object
- the object value in the failed assertion.type
- the type object
is \nExpecting:\n to belong to.ErrorMessageFactory
.public static ErrorMessageFactory shouldBeInstanceButWasNull(java.lang.String objectDescription, java.lang.Class<?> type)
ShouldBeInstance
when object we want to check type is null.objectDescription
- the description of the null object we wanted to check type.type
- the \nExpecting:\n type.ErrorMessageFactory
.