public final class PrimitiveCharArraySubject extends Subject<S,T>
char[]
.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<Character> |
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<Character> 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<PrimitiveCharArraySubject,char[]>
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<PrimitiveCharArraySubject,char[]>
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 © 2017. All rights reserved.