All Classes and Interfaces
Class
Description
A common supertype for Array subjects, abstracting some common display and error infrastructure.
Given the stack frame of a failing assertion, tries to describe what the user passed to
assertThat.An entry that contains a description of how it was created.
A value class to represent a frame.
This is the type used for type inference.
A method invocation.
An entry that we know nothing about except for its type.
An entry on the stack (or the local-variable table) with a type and
sometimes a description of how the value was produced or, as a
special case, whether the value is a Truth subject.
An
AssertionError composed of structured Fact instances and other string
messages.Propositions for
BigDecimal typed subjects.Propositions for boolean subjects.
Propositions for
Class subjects.Propositions for
Comparable typed subjects.An
AssertionError (usually a JUnit ComparisonFailure, but not under GWT) composed
of structured Fact instances and other string messages.Determines whether an instance of type
A corresponds in some way to an instance of type
E 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
types
A and E satisfy some condition.A functional interface to be used format the diff between a pair of objects of types
A
and E.Helper object to store exceptions encountered while executing a
Correspondence method.In a fluent assertion chain, exposes one or more "custom"
that methods, which accept a
value under test and return a Subject.Propositions for
Double subjects.A partially specified check about an approximate relationship to a
double subject using
a tolerance.Supertype of Truth's
AssertionError subclasses that are created from a list of Fact instances.A
TestRule that batches up all failures encountered during a test, and reports them all
together at the end (similar to ErrorCollector).A utility for testing that assertions against a custom
Subject fail when they should,
plus a utility to assert about parts of the resulting failure messages.A "functional interface" for
expectFailureAbout() to invoke and
capture failures.A "functional interface" for
expectFailure() to invoke and capture
failures.A string key-value pair in a failure message, such as "expected: abc" or "but was: xyz."
Helper class that wraps a collection of
Fact instances to make them easier to build.An opaque, immutable object containing state from the previous calls in the fluent assertion
chain.
Whether the value of the original subject and the value of the derived subject are "similar
enough" that we don't need to display both.
The data from a call to either (a) a
Subject constructor or (b) Subject.check().Defines what to do when a check fails.
Propositions for
Float subjects.A partially specified check about an approximate relationship to a
float subject using
a tolerance.Helper routines related to graph
matchings.
Helper which implements the Hopcroft–Karp
algorithm.
Propositions for Guava
Optional subjects.Propositions for
Integer subjects.Propositions for
IntStream subjects.Propositions for
Iterable subjects.Whether to output each missing/unexpected item as its own
Fact or to group all those
items together into a single Fact.A partially specified check in which the actual elements (normally the elements of the
Iterable under test) are compared to expected elements using a Correspondence.Propositions for
LongStream subjects.Propositions for
long subjects.Propositions for
Map subjects.Math utilities to be shared by numeric subjects.
Propositions for
Multimap subjects.Propositions for
Multiset subjects.A Subject for
Object[] and more generically T[].Propositions for Java 8
OptionalDouble subjects.Propositions for Java 8
OptionalInt subjects.Propositions for Java 8
OptionalLong subjects.Propositions for Java 8
Optional subjects.Returned by calls like
IterableSubject.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.Assertions for
Path instances.Extracted routines that need to be swapped in for GWT, to allow for minimal deltas between the
GWT and non-GWT version.
A GWT-swapped version of test rule interface that does nothing.
A Subject for
boolean[].A Subject for
byte[].A Subject for
char[].A Subject for
double[].A partially specified check for doing assertions on the array similar to the assertions
supported for
Iterable subjects, in which the elements of the array under test are
compared to expected elements using either exact or tolerant double equality: see PrimitiveDoubleArraySubject.usingExactEquality() and PrimitiveDoubleArraySubject.usingTolerance(double).A Subject for
float[].A partially specified check for doing assertions on the array similar to the assertions
supported for
Iterable subjects, in which the elements of the array under test are
compared to expected elements using either exact or tolerant float equality: see PrimitiveFloatArraySubject.usingExactEquality() and PrimitiveFloatArraySubject.usingTolerance(double).A Subject for
int[].A Subject for
long[].A Subject for
short[].In a fluent assertion chain, exposes the most common
that method, which accepts a value
under test and returns a Subject.Utility that cleans stack traces to remove noise from common frameworks.
Enum of the package or class-name based categories of stack frames that might be removed or
collapsed by the cleaner.
Wrapper around a
StackTraceElement for calculating and holding the metadata used to
clean the stack trace.In a fluent assertion chain, an object with which you can do any of the following:
Set an optional message with
StandardSubjectBuilder.withMessage(java.lang.String).Propositions for
Stream subjects.Propositions for string subjects.
An object that lets you perform checks on the value under test.
The result of comparing two objects for equality.
Utility methods used in
Subject implementors.Missing or unexpected values from a collection assertion, with equal objects grouped together
and, in some cases, type information added.
Propositions for
Table subjects.Propositions for
Throwable subjects.The primary entry point for Truth, a library for fluent test
assertions.
An
AssertionError that (a) always supports a cause, even under old versions of Android
and (b) omits "java.lang.AssertionError:" from the beginning of its toString() representation.The primary entry point for assertions about Java 8 types.
Subject for
AssertionError objects thrown by Truth.Provides a way to use Truth to perform JUnit "assumptions." An assumption is a check that, if
false, aborts (skips) the test.