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
Propositions forBigDecimal
typed subjects.class
BooleanSubject
Propositions for boolean subjects.class
ClassSubject
Propositions forClass
subjects.class
ComparableSubject<T extends Comparable<?>>
Propositions forComparable
typed subjects.class
DoubleSubject
Propositions forDouble
subjects.class
FloatSubject
Propositions forFloat
subjects.class
GuavaOptionalSubject
Propositions for GuavaOptional
subjects.class
IntegerSubject
Propositions forInteger
subjects.class
IntStreamSubject
Propositions forIntStream
subjects.class
IterableSubject
Propositions forIterable
subjects.class
LongStreamSubject
Propositions forLongStream
subjects.class
LongSubject
Propositions forlong
subjects.class
MapSubject
Propositions forMap
subjects.class
MultimapSubject
Propositions forMultimap
subjects.class
MultisetSubject
Propositions forMultiset
subjects.class
ObjectArraySubject<T extends @Nullable Object>
A Subject forObject[]
and more genericallyT[]
.class
OptionalDoubleSubject
Propositions for Java 8OptionalDouble
subjects.class
OptionalIntSubject
Propositions for Java 8OptionalInt
subjects.class
OptionalLongSubject
Propositions for Java 8OptionalLong
subjects.class
OptionalSubject
Propositions for Java 8Optional
subjects.class
PathSubject
Assertions forPath
instances.class
PrimitiveBooleanArraySubject
A Subject forboolean[]
.class
PrimitiveByteArraySubject
A Subject forbyte[]
.class
PrimitiveCharArraySubject
A Subject forchar[]
.class
PrimitiveDoubleArraySubject
A Subject fordouble[]
.class
PrimitiveFloatArraySubject
A Subject forfloat[]
.class
PrimitiveIntArraySubject
A Subject forint[]
.class
PrimitiveLongArraySubject
A Subject forlong[]
.class
PrimitiveShortArraySubject
A Subject forshort[]
.class
StreamSubject
Propositions forStream
subjects.class
StringSubject
Propositions for string subjects.class
TableSubject
Propositions forTable
subjects.class
ThrowableSubject
Propositions forThrowable
subjects.class
TruthFailureSubject
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)
Static alternative that directly returns the triggered failure.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.
-