public final class PrimitiveShortArraySubject extends Subject<S,T>
short[]
.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 check that the actual array and
expected are arrays of the same length and type,
containing elements such that each element in expected is equal to each element in the
actual array, and in the same position. |
void |
isNotEmpty()
Fails if the array is empty (i.e.
|
void |
isNotEqualTo(Object expected)
A check that the actual array and
expected are not arrays of the same length and type,
containing elements such that each element in expected is equal to each element in the
actual array, and in the same position. |
protected List<Short> |
listRepresentation()
Returns a List representation suitable for displaying in a string.
|
protected String |
underlyingType() |
actual, actualAsString, check, equals, fail, fail, fail, failComparing, failComparing, failWithBadResults, failWithCustomSubject, failWithoutActual, failWithoutSubject, failWithRawMessage, failWithRawMessageAndCause, getDisplaySubject, getSubject, hashCode, ignoreCheck, internalCustomName, isAnyOf, isIn, isInstanceOf, isNoneOf, isNotIn, isNotInstanceOf, isNotNull, isNotSameAs, isNull, isSameAs, named
protected String underlyingType()
protected List<Short> listRepresentation()
public void isEqualTo(Object expected)
expected
are arrays of the same length and type,
containing elements such that each element in expected
is equal to each element in the
actual array, and in the same position.isEqualTo
in class Subject<PrimitiveShortArraySubject,short[]>
public void isNotEqualTo(Object expected)
expected
are not arrays of the same length and type,
containing elements such that each element in expected
is equal to each element in the
actual array, and in the same position.isNotEqualTo
in class Subject<PrimitiveShortArraySubject,short[]>
public IterableSubject asList()
public void isEmpty()
array.length != 0
).public void isNotEmpty()
array.length == 0
).public void hasLength(int length)
IllegalArgumentException
- if length < 0
protected String actualCustomStringRepresentation()
Subject
Subjects 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 © 2018. All rights reserved.