Class ObjectArraySubject<T extends @Nullable Object>

java.lang.Object
com.google.common.truth.Subject
com.google.common.truth.ObjectArraySubject<T>

public final class ObjectArraySubject<T extends @Nullable Object> extends Subject
A subject for Object[] and more generically T[].
Author:
Christian Gruber
  • Method Details

    • asList

      public IterableSubject asList()
    • isEmpty

      public final void isEmpty()
      Checks that the actual array is empty (i.e., that array.length == 0).
    • isNotEmpty

      public final void isNotEmpty()
      Checks that the actual array is not empty (i.e., that array.length > 0).
    • hasLength

      public final void hasLength(int length)
      Checks that the actual array has the given length.
      Throws:
      IllegalArgumentException - if length < 0