Package com.google.common.truth
Class PrimitiveByteArraySubject
- java.lang.Object
-
- com.google.common.truth.Subject<AbstractArraySubject<S,T>,T>
-
- com.google.common.truth.AbstractArraySubject<PrimitiveByteArraySubject,byte[]>
-
- com.google.common.truth.PrimitiveByteArraySubject
-
public class PrimitiveByteArraySubject extends AbstractArraySubject<PrimitiveByteArraySubject,byte[]>
A Subject to handle testing propositions forbyte[]
.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.google.common.truth.Subject
Subject.HasField
-
-
Field Summary
-
Fields inherited from class com.google.common.truth.Subject
failureStrategy
-
-
Constructor Summary
Constructors Constructor Description PrimitiveByteArraySubject(FailureStrategy failureStrategy, byte[] o)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ListSubject<?,java.lang.Byte,java.util.List<java.lang.Byte>>
asList()
void
isEqualTo(java.lang.Object expected)
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(java.lang.Object expected)
Fails if the subject is equal to the given object.protected java.util.List<java.lang.Byte>
listRepresentation()
protected java.lang.String
underlyingType()
-
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
-
-
-
-
Constructor Detail
-
PrimitiveByteArraySubject
PrimitiveByteArraySubject(FailureStrategy failureStrategy, byte[] o)
-
-
Method Detail
-
underlyingType
protected java.lang.String underlyingType()
- Specified by:
underlyingType
in classAbstractArraySubject<PrimitiveByteArraySubject,byte[]>
-
listRepresentation
protected java.util.List<java.lang.Byte> listRepresentation()
- Specified by:
listRepresentation
in classAbstractArraySubject<PrimitiveByteArraySubject,byte[]>
-
isEqualTo
public void isEqualTo(java.lang.Object expected)
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<PrimitiveByteArraySubject,byte[]>,byte[]>
-
isNotEqualTo
public void isNotEqualTo(java.lang.Object expected)
Description copied from class:Subject
Fails if the subject is equal to the given object.- Overrides:
isNotEqualTo
in classSubject<AbstractArraySubject<PrimitiveByteArraySubject,byte[]>,byte[]>
-
asList
public ListSubject<?,java.lang.Byte,java.util.List<java.lang.Byte>> asList()
-
-