org.fest.assertions
Class ObjectAssert
java.lang.Object
org.fest.assertions.Assert
org.fest.assertions.GenericAssert<ObjectAssert,Object>
org.fest.assertions.ObjectAssert
public class ObjectAssert
- extends GenericAssert<ObjectAssert,Object>
Assertions for Objects.
To create a new instance of this class use the method Assertions.assertThat(Object).
- Author:
- Yvonne Wang, Alex Ruiz
| Methods inherited from class org.fest.assertions.GenericAssert |
as, as, describedAs, describedAs, doesNotSatisfy, is, isEqualTo, isIn, isIn, isNot, isNotEqualTo, isNotIn, isNotIn, isNotNull, isNotSameAs, isNull, isSameAs, overridingErrorMessage, satisfies |
| Methods inherited from class org.fest.assertions.Assert |
customErrorMessage, description, description, description, equals, fail, fail, failIfCustomMessageIsSet, failIfCustomMessageIsSet, failure, formattedErrorMessage, hashCode, rawDescription, replaceDefaultErrorMessagesWith |
ObjectAssert
protected ObjectAssert(Object actual)
- Creates a new
ObjectAssert.
- Parameters:
actual - the target to verify.
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:
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.
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 nulls.
Copyright © 2007-2011 FEST (Fixtures for Easy Software Testing). All Rights Reserved.