Uses of Package
com.google.common.truth
Packages that use com.google.common.truth
Package
Description
Truth is a library for performing assertions in
tests:
Custom subjects for testing Protocol
Buffer instances.
-
Classes in com.google.common.truth used by com.google.common.truthClassDescriptionA subject for
BigDecimal
values.A subject forBoolean
values.A subject forClass
values.A subject forComparable
values.Determines whether an instance of typeA
corresponds in some way to an instance of typeE
for the purposes of a test assertion.A functional interface for a binary predicate, to be used to test whether a pair of objects of typesA
andE
satisfy some condition.A functional interface to be used format the diff between a pair of objects of typesA
andE
.In a fluent assertion chain, exposes one or more "custom"that
methods, which accept a value under test and return aSubject
.A subject forDouble
values.A partially specified check about an approximate relationship to adouble
value using a tolerance.ATestRule
that batches up all failures encountered during a test, and reports them all together at the end (similar toErrorCollector
).A functional interface forexpectFailureAbout()
to invoke and capture failures.A functional interface forexpectFailure()
to invoke and capture failures.A string key-value pair in a failure message, such as "expected: abc" or "but was: xyz."An opaque, immutable object containing state from the previous calls in the fluent assertion chain.Defines what to do when a check fails.A subject forFloat
values.A partially specified check about an approximate relationship to afloat
value using a tolerance.A subject for GuavaOptional
values.A subject forInteger
values.A partially specified check about an approximate relationship to aint
actual value using a tolerance.A subject forIntStream
values.A subject forIterable
values.A partially specified check in which the actual elements (normally the elements of theIterable
under test) are compared to expected elements using aCorrespondence
.A subject forLongStream
values.A subject forLong
values.A partially specified check about an approximate relationship to along
value using a tolerance.A subject forMap
values.A partially specified check in which the actual values (i.e. the values of theMap
under test) are compared to expected values using aCorrespondence
.A subject forMultimap
values.A partially specified check in which the actual values (i.e. the values of theMultimap
under test) are compared to expected values using aCorrespondence
.A subject forMultiset
values.A subject forObject[]
and more genericallyT[]
.A subject forOptionalDouble
values.A subject forOptionalInt
values.A subject forOptionalLong
values.A subject forOptional
values.Returned by calls likeIterableSubject.containsExactly(java.lang.Object...)
,Ordered
lets the caller additionally check that the expected elements were present in the order they were passed to the previous calls.A subject forPath
values.A subject forboolean[]
values.A subject forbyte[]
values.A subject forchar[]
values.A subject fordouble[]
values.A partially specified check for doing assertions on the array similar to the assertions supported forIterable
values, in which the elements of the array under test are compared to expected elements using either exact or tolerant double equality: seePrimitiveDoubleArraySubject.usingExactEquality()
andPrimitiveDoubleArraySubject.usingTolerance(double)
.A subject forfloat[]
values.A partially specified check for doing assertions on the array similar to the assertions supported forIterable
values, in which the elements of the array under test are compared to expected elements using either exact or tolerant float equality: seePrimitiveFloatArraySubject.usingExactEquality()
andPrimitiveFloatArraySubject.usingTolerance(double)
.A subject forint[]
values.A subject forlong[]
values.A subject forshort[]
values.In a fluent assertion chain, exposes the most commonthat
method, which accepts a value under test and returns aSubject
.In a fluent assertion chain, an object with which you can do any of the following: Set an optional message withStandardSubjectBuilder.withMessage(java.lang.String)
.A subject forStream
values.A subject forString
values.Offers case-insensitive checks for string values.An object that lets you perform checks on the value under test.A subject forTable
values.A subject forThrowable
values.A subject forAssertionError
objects thrown by Truth. -
Classes in com.google.common.truth used by com.google.common.truth.extensions.protoClassDescriptionIn a fluent assertion chain, exposes one or more "custom"
that
methods, which accept a value under test and return aSubject
.An opaque, immutable object containing state from the previous calls in the fluent assertion chain.A subject forInteger
values.A subject forIterable
values.A subject forMap
values.A subject forMultimap
values.Returned by calls likeIterableSubject.containsExactly(java.lang.Object...)
,Ordered
lets the caller additionally check that the expected elements were present in the order they were passed to the previous calls.An object that lets you perform checks on the value under test. -
Classes in com.google.common.truth used by com.google.common.truth.extensions.re2jClassDescriptionAn object that lets you perform checks on the value under test.