Class 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.
  • Constructor Details

    • ArrayAssert

      protected ArrayAssert(T actual)
      Creates a new ArrayAssert.
      Parameters:
      actual - the target to verify.
  • Method Details

    • 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.