org.fest.assertions.api
Class ObjectAssert
java.lang.Object
org.fest.assertions.api.AbstractAssert<ObjectAssert,Object>
org.fest.assertions.api.ObjectAssert
- All Implemented Interfaces:
- Assert<ObjectAssert,Object>, Descriptable<ObjectAssert>, ExtensionPoints<ObjectAssert,Object>
public class ObjectAssert
- extends AbstractAssert<ObjectAssert,Object>
Assertion methods for Object
s.
To create a new instance of this class, invoke Assertions.assertThat(Object)
.
- Author:
- Yvonne Wang, Alex Ruiz
Methods inherited from class org.fest.assertions.api.AbstractAssert |
as, as, describedAs, describedAs, descriptionText, doesNotHave, equals, has, hashCode, is, isEqualTo, isIn, isIn, isNot, isNotEqualTo, isNotIn, isNotIn, isNotNull, isNotSameAs, isNull, isSameAs, usingComparator, usingDefaultComparator |
ObjectAssert
protected ObjectAssert(Object actual)
isInstanceOf
public ObjectAssert isInstanceOf(Class<?> type)
- Verifies that the actual
Object
is an instance of the given type.
- Parameters:
type
- the type to check the actual Object
against.
- Returns:
- this assertion object.
- Throws:
NullPointerException
- if the given type is null
.
AssertionError
- if the actual Object
is null
.
AssertionError
- if the actual Object
is not an instance of the given type.
isInstanceOfAny
public ObjectAssert isInstanceOfAny(Class<?>... types)
- Verifies that the actual
Object
is an instance of any of the given types.
- Parameters:
types
- the types to check the actual Object
against.
- Returns:
- this assertion object.
- Throws:
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-2012 FEST (Fixtures for Easy Software Testing). All Rights Reserved.