Uses of Class
com.google.common.truth.Subject
-
Packages that use Subject Package Description com.google.common.truth Truth is a library for performing assertions in tests:com.google.common.truth.extensions.proto Custom subjects for testing Protocol Buffer instances.com.google.common.truth.extensions.re2j -
-
Uses of Subject in com.google.common.truth
Classes in com.google.common.truth with type parameters of type Subject Modifier and Type Interface Description static interface
ExpectFailure.SimpleSubjectBuilderCallback<S extends Subject,A>
A functional interface forexpectFailureAbout()
to invoke and capture failures.class
SimpleSubjectBuilder<SubjectT extends Subject,ActualT>
In a fluent assertion chain, exposes the most commonthat
method, which accepts a value under test and returns aSubject
.static interface
Subject.Factory<SubjectT extends Subject,ActualT>
Subclasses of Subject in com.google.common.truth Modifier and Type Class Description class
BigDecimalSubject
A subject forBigDecimal
values.class
BooleanSubject
A subject forBoolean
values.class
ClassSubject
A subject forClass
values.class
ComparableSubject<T extends Comparable<?>>
A subject forComparable
values.class
DoubleSubject
A subject forDouble
values.class
FloatSubject
A subject forFloat
values.class
GuavaOptionalSubject
A subject for GuavaOptional
values.class
IntegerSubject
A subject forInteger
values.class
IntStreamSubject
A subject forIntStream
values.class
IterableSubject
A subject forIterable
values.class
LongStreamSubject
A subject forLongStream
values.class
LongSubject
A subject forLong
values.class
MapSubject
A subject forMap
values.class
MultimapSubject
A subject forMultimap
values.class
MultisetSubject
A subject forMultiset
values.class
ObjectArraySubject<T extends @Nullable Object>
A subject forObject[]
and more genericallyT[]
.class
OptionalDoubleSubject
A subject forOptionalDouble
values.class
OptionalIntSubject
A subject forOptionalInt
values.class
OptionalLongSubject
A subject forOptionalLong
values.class
OptionalSubject
A subject forOptional
values.class
PathSubject
A subject forPath
values.class
PrimitiveBooleanArraySubject
A subject forboolean[]
values.class
PrimitiveByteArraySubject
A subject forbyte[]
values.class
PrimitiveCharArraySubject
A subject forchar[]
values.class
PrimitiveDoubleArraySubject
A subject fordouble[]
values.class
PrimitiveFloatArraySubject
A subject forfloat[]
values.class
PrimitiveIntArraySubject
A subject forint[]
values.class
PrimitiveLongArraySubject
A subject forlong[]
values.class
PrimitiveShortArraySubject
A subject forshort[]
values.class
StreamSubject
A subject forStream
values.class
StringSubject
A subject forString
values.class
TableSubject
A subject forTable
values.class
ThrowableSubject
A subject forThrowable
values.class
TruthFailureSubject
A subject forAssertionError
objects thrown by Truth.Methods in com.google.common.truth with type parameters of type Subject Modifier and Type Method Description <S extends Subject,A>
SimpleSubjectBuilder<S,A>StandardSubjectBuilder. about(Subject.Factory<S,A> factory)
Given a factory for someSubject
class, returns a builder whosethat(actual)
method creates instances of that class.static <S extends Subject,T>
SimpleSubjectBuilder<S,T>Truth. assertAbout(Subject.Factory<S,T> factory)
Given a factory for someSubject
class, returns a builder whosethat(actual)
method creates instances of that class.static <S extends Subject,A>
AssertionErrorExpectFailure. expectFailureAbout(Subject.Factory<S,A> factory, ExpectFailure.SimpleSubjectBuilderCallback<S,A> assertionCallback)
Captures and returns the failure produced by the assertion in the provided callback, similar toassertThrows()
:Methods in com.google.common.truth that return Subject Modifier and Type Method Description static Subject
Truth. assertThat(@Nullable Object actual)
Begins an assertion about anObject
.Subject
StandardSubjectBuilder. that(@Nullable Object actual)
-
Uses of Subject in com.google.common.truth.extensions.proto
Subclasses of Subject in com.google.common.truth.extensions.proto Modifier and Type Class Description class
IterableOfProtosSubject<M extends Message>
Truth subject for the iterables of protocol buffers.class
LiteProtoSubject
Truth subjects for the Lite version of Protocol Buffers.class
MapWithProtoValuesSubject<M extends Message>
Truth subject for maps with protocol buffers for values.class
MultimapWithProtoValuesSubject<M extends Message>
Truth subject forMultimap
s with protocol buffers for values.class
ProtoSubject
Truth subject for the full version of Protocol Buffers. -
Uses of Subject in com.google.common.truth.extensions.re2j
Subclasses of Subject in com.google.common.truth.extensions.re2j Modifier and Type Class Description static class
Re2jSubjects.Re2jStringSubject
Subject forString
subjects which you can use to assert things aboutPattern
regexes.
-