org.fest.assertions
Class ArrayAssert<T>

java.lang.Object
  extended by org.fest.assertions.Assert
      extended by org.fest.assertions.GenericAssert<T>
          extended by org.fest.assertions.GroupAssert<T>
              extended by org.fest.assertions.ItemGroupAssert<T>
                  extended by org.fest.assertions.ArrayAssert<T>
Type Parameters:
T - the generic type of the arrays.
Direct Known Subclasses:
BooleanArrayAssert, ByteArrayAssert, CharArrayAssert, DoubleArrayAssert, FloatArrayAssert, IntArrayAssert, LongArrayAssert, ShortArrayAssert

public abstract class ArrayAssert<T>
extends ItemGroupAssert<T>

Understands assertions for arrays.

Author:
Alex Ruiz

Field Summary
 
Fields inherited from class org.fest.assertions.GenericAssert
actual
 
Constructor Summary
protected ArrayAssert(T actual)
          Creates a new ArrayAssert.
 
Method Summary
protected  List<Object> actualAsList()
          Returns the actual value as a List.
protected  Set<Object> actualAsSet()
          Returns the actual value as a Set.
protected  int actualGroupSize()
          Returns the size of the actual array.
 
Methods inherited from class org.fest.assertions.ItemGroupAssert
assertContains, assertContainsOnly, assertDoesNotHaveDuplicates, assertExcludes, asSet, validateIsNotNull
 
Methods inherited from class org.fest.assertions.GroupAssert
as, as, assertHasSize, assertIsNotEmpty, describedAs, describedAs, hasSize, isEmpty, isNotEmpty, isNullOrEmpty, overridingErrorMessage
 
Methods inherited from class org.fest.assertions.GenericAssert
assertDoesNotSatisfy, assertEqualTo, assertIs, assertIsNot, assertNotEqualTo, assertNotNull, assertNotSameAs, assertSameAs, assertSatisfies, doesNotSatisfy, is, isEqualTo, isNot, isNotEqualTo, isNotNull, isNotSameAs, isNull, isSameAs, satisfies
 
Methods inherited from class org.fest.assertions.Assert
customErrorMessage, description, description, description, equals, fail, fail, failIfCustomMessageIsSet, failIfCustomMessageIsSet, failure, formattedErrorMessage, hashCode, rawDescription, replaceDefaultErrorMessagesWith
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ArrayAssert

protected ArrayAssert(T actual)
Creates a new ArrayAssert.

Parameters:
actual - the target to verify.
Method Detail

actualGroupSize

protected final int actualGroupSize()
Returns the size of the actual array.

Specified by:
actualGroupSize in class GroupAssert<T>
Returns:
the size of the actual array.
Throws:
NullPointerException - if the actual array is null.

actualAsSet

protected Set<Object> actualAsSet()
Returns the actual value as a Set.

Specified by:
actualAsSet in class ItemGroupAssert<T>
Returns:
the actual value as a Set.

actualAsList

protected List<Object> actualAsList()
Returns the actual value as a List.

Specified by:
actualAsList in class ItemGroupAssert<T>
Returns:
the actual value as a List.


Copyright © 2007-2011 FEST (Fixtures for Easy Software Testing). All Rights Reserved.