public final class ObjectArraySubject<T> extends Subject<S,T>
Object[] and more generically T[].failureStrategy| Modifier and Type | Method and Description | 
|---|---|
protected String | 
actualCustomStringRepresentation()
Supplies the direct string representation of the actual value to other methods which may prefix
 or otherwise position it in an error message. 
 | 
IterableSubject | 
asList()  | 
void | 
hasLength(int length)
Fails if the array does not have the given length. 
 | 
void | 
isEmpty()
Fails if the array is not empty (i.e. 
 | 
void | 
isEqualTo(Object expected)
A proposition that the provided Object[] is an array of the same length and type, and contains
 elements such that each element in  
expected is equal to each element in the subject,
 and in the same position. | 
void | 
isNotEmpty()
Fails if the array is empty (i.e. 
 | 
void | 
isNotEqualTo(Object expected)
Fails if the subject is equal to the given object. 
 | 
protected List<?> | 
listRepresentation()
Returns a List representation suitable for displaying in a string. 
 | 
protected String | 
underlyingType()  | 
actual, actualAsString, check, equals, fail, fail, fail, failWithBadResults, failWithCustomSubject, failWithoutActual, failWithoutSubject, failWithRawMessage, getDisplaySubject, getSubject, hashCode, ignoreCheck, internalCustomName, isAnyOf, isIn, isInstanceOf, isNoneOf, isNotIn, isNotInstanceOf, isNotNull, isNotSameAs, isNull, isSameAs, namedprotected String underlyingType()
protected List<?> listRepresentation()
public void isEqualTo(Object expected)
expected is equal to each element in the subject,
 and in the same position.isEqualTo in class Subject<ObjectArraySubject<T>,T[]>public void isNotEqualTo(Object expected)
SubjectSubject.isEqualTo(java.lang.Object) method.isNotEqualTo in class Subject<ObjectArraySubject<T>,T[]>public IterableSubject asList()
public void isEmpty()
array.length != 0).public void isNotEmpty()
array.length == 0).public void hasLength(int length)
IllegalArgumentException - if length < 0protected String actualCustomStringRepresentation()
SubjectSubjects should override this with care.
By default, this returns String.ValueOf(getActualValue()).
actualCustomStringRepresentation in class Subject<S extends com.google.common.truth.AbstractArraySubject<S,T>,T>Copyright © 2017. All rights reserved.