public class ObjectAssert extends GenericAssert<ObjectAssert,Object>
Object
s.
To create a new instance of this class use the method
.
Assertions.assertThat(Object)
actual, myself
Modifier | Constructor and Description |
---|---|
protected |
ObjectAssert(Object actual)
Creates a new
ObjectAssert . |
Modifier and Type | Method and Description |
---|---|
ObjectAssert |
isInstanceOf(Class<?> type)
Verifies that the actual
Object is an instance of the given type. |
ObjectAssert |
isInstanceOfAny(Class<?>... types)
Verifies that the actual
Object is an instance of any of the given types. |
as, as, describedAs, describedAs, doesNotSatisfy, is, isEqualTo, isIn, isIn, isNot, isNotEqualTo, isNotIn, isNotIn, isNotNull, isNotSameAs, isNull, isSameAs, overridingErrorMessage, satisfies
customErrorMessage, description, description, description, equals, fail, fail, failIfCustomMessageIsSet, failIfCustomMessageIsSet, failure, formattedErrorMessage, hashCode, rawDescription, replaceDefaultErrorMessagesWith
protected ObjectAssert(Object actual)
ObjectAssert
.actual
- the target to verify.public ObjectAssert isInstanceOf(Class<?> type)
Object
is an instance of the given type.type
- the type to check the actual Object
against.AssertionError
- if the actual Object
is null
.AssertionError
- if the actual Object
is not an instance of the given type.NullPointerException
- if the given type is null
.public ObjectAssert isInstanceOfAny(Class<?>... types)
Object
is an instance of any of the given types.types
- the types to check the actual Object
against.AssertionError
- if the actual Object
is null
.AssertionError
- if the actual Object
is not an instance of any of the given types.NullPointerException
- if the given array of types is null
.NullPointerException
- if the given array of types contains null
s.Copyright © 2007-2013 FEST (Fixtures for Easy Software Testing). All Rights Reserved.