Uses of Class
com.google.common.truth.Subject
-
Uses of Subject in com.google.common.truth
Classes in com.google.common.truth with type parameters of type SubjectModifier and TypeInterfaceDescriptionstatic interface
ExpectFailure.SimpleSubjectBuilderCallback<S extends Subject,
A> A "functional interface" forexpectFailureAbout()
to invoke and capture failures.final 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.truthModifier and TypeClassDescription(package private) class
A common supertype for Array subjects, abstracting some common display and error infrastructure.final class
Propositions forBigDecimal
typed subjects.final class
Propositions for boolean subjects.final class
Propositions forClass
subjects.class
ComparableSubject<T extends Comparable>
Propositions forComparable
typed subjects.final class
Propositions forDouble
subjects.final class
Propositions forFloat
subjects.final class
Propositions for GuavaOptional
subjects.class
Propositions forInteger
subjects.final class
Propositions forIntStream
subjects.class
Propositions forIterable
subjects.final class
Propositions forLongStream
subjects.class
Propositions forlong
subjects.class
Propositions forMap
subjects.class
Propositions forMultimap
subjects.private static class
final class
Propositions forMultiset
subjects.final class
A Subject forObject[]
and more genericallyT[]
.final class
Propositions for Java 8OptionalDouble
subjects.final class
Propositions for Java 8OptionalInt
subjects.final class
Propositions for Java 8OptionalLong
subjects.final class
Propositions for Java 8Optional
subjects.final class
Assertions forPath
instances.final class
A Subject forboolean[]
.final class
A Subject forbyte[]
.final class
A Subject forchar[]
.final class
A Subject fordouble[]
.private final class
final class
A Subject forfloat[]
.private final class
final class
A Subject forint[]
.final class
A Subject forlong[]
.final class
A Subject forshort[]
.final class
Propositions forStream
subjects.class
Propositions for string subjects.final class
Propositions forTable
subjects.class
Propositions forThrowable
subjects.final class
Subject forAssertionError
objects thrown by Truth.Fields in com.google.common.truth declared as SubjectMethods in com.google.common.truth with type parameters of type SubjectModifier and TypeMethodDescriptionfinal <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 SubjectMethods in com.google.common.truth with parameters of type SubjectModifier and TypeMethodDescription(package private) static FailureMetadata.Step
FailureMetadata.Step.subjectCreation
(Subject subject) (package private) FailureMetadata
FailureMetadata.updateForSubject
(Subject subject) Returns a new instance that includes the given subject in its chain of values.Method parameters in com.google.common.truth with type arguments of type SubjectModifier and TypeMethodDescriptionprivate static String
Subject.typeDescriptionOrGuess
(Class<? extends Subject> clazz, String typeDescriptionOverride) Constructors in com.google.common.truth with parameters of type SubjectModifierConstructorDescriptionprivate
Step
(Subject subject, com.google.common.base.Function<String, String> descriptionUpdate, FailureMetadata.OldAndNewValuesAreSimilar valuesAreSimilar)