Package com.google.common.truth
Class ObjectArraySubject<T>
java.lang.Object
com.google.common.truth.Subject<AbstractArraySubject<ObjectArraySubject<T>,T[]>,T[]>
com.google.common.truth.AbstractArraySubject<ObjectArraySubject<T>,T[]>
com.google.common.truth.ObjectArraySubject<T>
A Subject to handle testing propositions for
Object[]
and more generically T[]
.-
Nested Class Summary
Nested classes/interfaces inherited from class com.google.common.truth.Subject
Subject.HasField
-
Field Summary
FieldsFields inherited from class com.google.common.truth.Subject
failureStrategy
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionListSubject
<?, T, List<T>> asList()
void
A proposition that the provided Object[] is an array of the same length and type, and contains elements such that each element inexpected
is equal to each element in the subject, and in the same position.void
isNotEqualTo
(Object expected) Fails if the subject is equal to the given object.private String
typeNameFromInstance
(Object instance) protected String
Methods inherited from class com.google.common.truth.AbstractArraySubject
failWithBadType, getDisplaySubject, hasLength, isEmpty, isNotEmpty, named
Methods inherited from class com.google.common.truth.Subject
check, equals, fail, fail, fail, failWithBadResults, failWithCustomSubject, failWithoutSubject, failWithRawMessage, getSubject, hasField, hashCode, internalCustomName, is, isA, isInstanceOf, isNotA, isNotInstanceOf, isNotNull, isNotSameAs, isNull, isSameAs, labeled
-
Field Details
-
typeName
-
-
Constructor Details
-
ObjectArraySubject
ObjectArraySubject(FailureStrategy failureStrategy, T[] o)
-
-
Method Details
-
underlyingType
- Specified by:
underlyingType
in classAbstractArraySubject<ObjectArraySubject<T>,
T[]>
-
listRepresentation
- Specified by:
listRepresentation
in classAbstractArraySubject<ObjectArraySubject<T>,
T[]>
-
typeNameFromInstance
-
isEqualTo
A proposition that the provided Object[] is an array of the same length and type, and contains elements such that each element inexpected
is equal to each element in the subject, and in the same position.- Overrides:
isEqualTo
in classSubject<AbstractArraySubject<ObjectArraySubject<T>,
T[]>, T[]>
-
isNotEqualTo
Description copied from class:Subject
Fails if the subject is equal to the given object.- Overrides:
isNotEqualTo
in classSubject<AbstractArraySubject<ObjectArraySubject<T>,
T[]>, T[]>
-
asList
-