Package org.fest.assertions.error
Class ShouldBeInstance
java.lang.Object
org.fest.assertions.error.BasicErrorMessageFactory
org.fest.assertions.error.ShouldBeInstance
- All Implemented Interfaces:
ErrorMessageFactory
Creates an error message indicating that an assertion that verifies that an object is an instance of some type
failed.
- Author:
- Alex Ruiz, Joel Costigliola
-
Field Summary
Fields inherited from class org.fest.assertions.error.BasicErrorMessageFactory
arguments, format
-
Method Summary
Modifier and TypeMethodDescriptionstatic ErrorMessageFactory
shouldBeInstance
(Object object, Class<?> type) Creates a newShouldBeInstance
.static ErrorMessageFactory
shouldBeInstanceButWasNull
(String objectDescription, Class<?> type) Creates a newShouldBeInstance
when object we want to check type is null.Methods inherited from class org.fest.assertions.error.BasicErrorMessageFactory
create, equals, hashCode, toString
-
Method Details
-
shouldBeInstance
Creates a newShouldBeInstance
.- Parameters:
object
- the object value in the failed assertion.type
- the typeobject
is expected to belong to.- Returns:
- the created
ErrorMessageFactory
.
-
shouldBeInstanceButWasNull
public static ErrorMessageFactory shouldBeInstanceButWasNull(String objectDescription, Class<?> type) Creates a newShouldBeInstance
when object we want to check type is null.- Parameters:
objectDescription
- the description of the null object we wanted to check type.type
- the expected type.- Returns:
- the created
ErrorMessageFactory
.
-