public final class PrimitiveByteArraySubject extends Subject<S,T>
byte[].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 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 proposition 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<Byte> |
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, namedprotected String underlyingType()
protected List<Byte> 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<PrimitiveByteArraySubject,byte[]>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<PrimitiveByteArraySubject,byte[]>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.