Index
All Classes and Interfaces|All Packages|Constant Field Values|Serialized Form
A
- about(CustomSubjectBuilder.Factory<CustomSubjectBuilderT>) - Method in class com.google.common.truth.StandardSubjectBuilder
- about(Subject.Factory<S, A>) - Method in class com.google.common.truth.StandardSubjectBuilder
-
Given a factory for some
Subject
class, returns a builder whosethat(actual)
method creates instances of that class. - AbstractArraySubject - Class in com.google.common.truth
-
A common supertype for Array subjects, abstracting some common display and error infrastructure.
- AbstractArraySubject(FailureMetadata, Object, String) - Constructor for class com.google.common.truth.AbstractArraySubject
- accumulate(T, T, T...) - Static method in class com.google.common.truth.SubjectUtils
- accumulateMap(String, Object, Object, Object...) - Static method in class com.google.common.truth.MapSubject
- accumulateMultimap(Object, Object, Object...) - Static method in class com.google.common.truth.MultimapSubject
- actual - Variable in class com.google.common.truth.AbstractArraySubject
- actual - Variable in class com.google.common.truth.BigDecimalSubject
- actual - Variable in class com.google.common.truth.BooleanSubject
- actual - Variable in class com.google.common.truth.ClassSubject
- actual - Variable in class com.google.common.truth.ComparableSubject
-
Constructor for use by subclasses.
- actual - Variable in class com.google.common.truth.DoubleSubject
- actual - Variable in class com.google.common.truth.FloatSubject
- actual - Variable in class com.google.common.truth.GuavaOptionalSubject
- actual - Variable in class com.google.common.truth.IterableSubject
- actual - Variable in class com.google.common.truth.MapSubject
- actual - Variable in class com.google.common.truth.MapSubject.ValueDifference
- actual - Variable in class com.google.common.truth.MultimapSubject
- actual - Variable in class com.google.common.truth.MultisetSubject
- actual - Variable in class com.google.common.truth.ObjectArraySubject
- actual - Variable in class com.google.common.truth.OptionalDoubleSubject
- actual - Variable in class com.google.common.truth.OptionalIntSubject
- actual - Variable in class com.google.common.truth.OptionalLongSubject
- actual - Variable in class com.google.common.truth.OptionalSubject
- actual - Variable in class com.google.common.truth.PrimitiveBooleanArraySubject
- actual - Variable in class com.google.common.truth.PrimitiveByteArraySubject
- actual - Variable in class com.google.common.truth.PrimitiveCharArraySubject
- actual - Variable in class com.google.common.truth.PrimitiveDoubleArraySubject
- actual - Variable in class com.google.common.truth.PrimitiveFloatArraySubject
- actual - Variable in class com.google.common.truth.PrimitiveIntArraySubject
- actual - Variable in class com.google.common.truth.PrimitiveLongArraySubject
- actual - Variable in class com.google.common.truth.PrimitiveShortArraySubject
- actual - Variable in class com.google.common.truth.StringSubject
- actual - Variable in class com.google.common.truth.Subject
- actual - Variable in class com.google.common.truth.TableSubject
- actual - Variable in class com.google.common.truth.ThrowableSubject
- actual - Variable in class com.google.common.truth.TruthFailureSubject
- actual() - Method in class com.google.common.truth.Subject
-
Returns the actual value under test.
- actualCustomStringRepresentation() - Method in class com.google.common.truth.IntStreamSubject
- actualCustomStringRepresentation() - Method in class com.google.common.truth.IterableSubject
- actualCustomStringRepresentation() - Method in class com.google.common.truth.LongStreamSubject
- actualCustomStringRepresentation() - Method in class com.google.common.truth.MultimapSubject.IterableEntries
- actualCustomStringRepresentation() - Method in class com.google.common.truth.PrimitiveDoubleArraySubject.IterableSubjectWithInheritedToString
- actualCustomStringRepresentation() - Method in class com.google.common.truth.PrimitiveFloatArraySubject.IterableSubjectWithInheritedToString
- actualCustomStringRepresentation() - Method in class com.google.common.truth.StreamSubject
- actualCustomStringRepresentation() - Method in class com.google.common.truth.Subject
-
Supplies the direct string representation of the actual value to other methods which may prefix or otherwise position it in an error message.
- actualCustomStringRepresentationForPackageMembersToCall() - Method in class com.google.common.truth.Subject
- actualKey(A, Correspondence.ExceptionStore) - Method in class com.google.common.truth.IterableSubject.UsingCorrespondence.Pairer
- actualKeyFunction - Variable in class com.google.common.truth.IterableSubject.UsingCorrespondence.Pairer
- actualList - Variable in class com.google.common.truth.IntStreamSubject
- actualList - Variable in class com.google.common.truth.LongStreamSubject
- actualList - Variable in class com.google.common.truth.StreamSubject
- actualTransform - Variable in class com.google.common.truth.Correspondence.Transforming
- actualValue - Variable in class com.google.common.truth.AutoValue_ActualValueInference_Invocation
- actualValue - Variable in class com.google.common.truth.AutoValue_ActualValueInference_Invocation.Builder
- actualValue - Variable in class com.google.common.truth.AutoValue_ActualValueInference_SubjectEntry
- actualValue() - Method in class com.google.common.truth.ActualValueInference.Invocation
-
The value being passed to this call if it is an
assertThat
orthat
call. - actualValue() - Method in class com.google.common.truth.ActualValueInference.StackEntry
- actualValue() - Method in class com.google.common.truth.ActualValueInference.SubjectEntry
- actualValue() - Method in class com.google.common.truth.AutoValue_ActualValueInference_Invocation
- actualValue() - Method in class com.google.common.truth.AutoValue_ActualValueInference_SubjectEntry
- actualValueAtLine - Variable in class com.google.common.truth.ActualValueInference.InferenceClassVisitor
- actualValueAtLine - Variable in class com.google.common.truth.ActualValueInference.InferenceMethodVisitor
-
The output of this process: a mapping from line number to the root actual values with assertions on that line.
- actualValueAtLocation - Variable in class com.google.common.truth.ActualValueInference.InferenceMethodVisitor
-
The mapping that indexes every root actual value by the full list of labels we'd visited before we visited it.
- ActualValueInference - Class in com.google.common.truth
-
Given the stack frame of a failing assertion, tries to describe what the user passed to
assertThat
. - ActualValueInference() - Constructor for class com.google.common.truth.ActualValueInference
- ActualValueInference.DescribedEntry - Class in com.google.common.truth
-
An entry that contains a description of how it was created.
- ActualValueInference.FrameInfo - Class in com.google.common.truth
-
A value class to represent a frame.
- ActualValueInference.InferenceClassVisitor - Class in com.google.common.truth
- ActualValueInference.InferenceMethodVisitor - Class in com.google.common.truth
- ActualValueInference.InferredType - Class in com.google.common.truth
-
This is the type used for type inference.
- ActualValueInference.Invocation - Class in com.google.common.truth
-
A method invocation.
- ActualValueInference.Invocation.Builder - Class in com.google.common.truth
- ActualValueInference.Nullable - Annotation Interface in com.google.common.truth
- ActualValueInference.OpaqueEntry - Class in com.google.common.truth
-
An entry that we know nothing about except for its type.
- ActualValueInference.StackEntry - Class in com.google.common.truth
-
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.
- ActualValueInference.SubjectEntry - Class in com.google.common.truth
- add(E) - Method in class com.google.common.truth.SubjectUtils.NonHashingMultiset
- addActualKeyFunctionException(Class<?>, Exception, Object) - Method in class com.google.common.truth.Correspondence.ExceptionStore
-
Adds an exception that was thrown during an
apply
call on the function used to key actual elements. - addCompareException(Class<?>, Exception, Object, Object) - Method in class com.google.common.truth.Correspondence.ExceptionStore
-
Adds an exception that was thrown during a
compare
call. - addExpectedKeyFunctionException(Class<?>, Exception, Object) - Method in class com.google.common.truth.Correspondence.ExceptionStore
-
Adds an exception that was thrown during an
apply
call on the function used to key expected elements. - addFormatDiffException(Class<?>, Exception, Object, Object) - Method in class com.google.common.truth.Correspondence.ExceptionStore
-
Adds an exception that was thrown during a
formatDiff
call. - addKeyTypes(Map<?, ?>) - Static method in class com.google.common.truth.MapSubject
- addToStreak(StackTraceCleaner.StackTraceElementWrapper) - Method in class com.google.common.truth.StackTraceCleaner
-
Either adds the given frame to the running streak or closes out the running streak and starts a new one.
- addTypeInfoToEveryItem(Iterable<?>) - Static method in class com.google.common.truth.SubjectUtils
- advanceToFind(Iterator<?>, Object) - Static method in class com.google.common.truth.MultimapSubject
-
Advances the iterator until it either returns value, or has no more elements.
- AFTER - Enum constant in enum class com.google.common.truth.Expect.TestPhase
- ALL_IN_ONE_FACT - Enum constant in enum class com.google.common.truth.IterableSubject.ElementFactGrouping
- allKeys - Variable in class com.google.common.truth.MapSubject.MapDifference
- ALREADY_FAILED - Static variable in class com.google.common.truth.IterableSubject
-
Ordered implementation that does nothing because an earlier check already caused a failure.
- ALREADY_FAILED - Static variable in class com.google.common.truth.MapSubject
-
Ordered implementation that does nothing because an earlier check already caused a failure.
- ALREADY_FAILED - Static variable in class com.google.common.truth.MultimapSubject
-
Ordered implementation that does nothing because an earlier check already caused a failure.
- and(Fact...) - Method in class com.google.common.truth.Facts
-
Returns an instance concatenating the facts wrapped by the current instance followed by the given facts.
- and(Facts) - Method in class com.google.common.truth.Facts
-
Returns an instance concatenating the facts wrapped by the current instance followed by the given facts.
- annotateEmptyStrings(Iterable<T>) - Static method in class com.google.common.truth.SubjectUtils
-
Returns an iterable with all empty strings replaced by a non-empty human understandable indicator for an empty string.
- annotateEmptyStringsMultimap(Multimap<?, ?>) - Static method in class com.google.common.truth.MultimapSubject
-
Returns a multimap with all empty strings (as keys or values) replaced by a non-empty human understandable indicator for an empty string.
- anyContainsCommaOrNewline(Iterable<Multiset.Entry<?>>...) - Static method in class com.google.common.truth.IterableSubject
- append(ImmutableList<? extends E>, E) - Static method in class com.google.common.truth.SubjectUtils
- append(E[], E) - Static method in class com.google.common.truth.SubjectUtils
- appendArrayToList(ImmutableList<ActualValueInference.StackEntry>, int, Object[]) - Method in class com.google.common.truth.ActualValueInference.InferenceMethodVisitor
- appendIndented(int, StringBuilder, String) - Static method in class com.google.common.truth.Expect.ExpectationGatherer
- apply(A, E) - Method in interface com.google.common.truth.Correspondence.BinaryPredicate
-
Returns whether or not the actual and expected values satisfy the condition defined by this predicate.
- apply(Statement, Description) - Method in class com.google.common.truth.Expect
- apply(Statement, Description) - Method in class com.google.common.truth.ExpectFailure
- args - Variable in class com.google.common.truth.LazyMessage
- ARGUMENT_JOINER - Static variable in class com.google.common.truth.Correspondence.StoredException
- argumentLabel - Variable in class com.google.common.truth.Correspondence.ExceptionStore
- arrayType(Object) - Static method in class com.google.common.truth.Subject
- asDouble - Variable in class com.google.common.truth.FloatSubject
- asIterable() - Method in class com.google.common.truth.Facts
-
Returns the facts wrapped by this instance.
- asList() - Method in class com.google.common.truth.ObjectArraySubject
- asList() - Method in class com.google.common.truth.PrimitiveBooleanArraySubject
- asList() - Method in class com.google.common.truth.PrimitiveByteArraySubject
- asList() - Method in class com.google.common.truth.PrimitiveCharArraySubject
- asList() - Method in class com.google.common.truth.PrimitiveIntArraySubject
- asList() - Method in class com.google.common.truth.PrimitiveLongArraySubject
- asList() - Method in class com.google.common.truth.PrimitiveShortArraySubject
- ASSERT - Static variable in class com.google.common.truth.Truth
- assert_() - Static method in class com.google.common.truth.Truth
-
Begins a call chain with the fluent Truth API.
- assertAbout(CustomSubjectBuilder.Factory<CustomSubjectBuilderT>) - Static method in class com.google.common.truth.Truth
-
A generic, advanced method of extension of Truth to new types, which is documented on
CustomSubjectBuilder
. - assertAbout(Subject.Factory<S, T>) - Static method in class com.google.common.truth.Truth
-
Given a factory for some
Subject
class, returns a builder whosethat(actual)
method creates instances of that class. - AssertionErrorWithFacts - Exception Class in com.google.common.truth
-
An
AssertionError
composed of structuredFact
instances and other string messages. - AssertionErrorWithFacts(ImmutableList<String>, ImmutableList<Fact>, Throwable) - Constructor for exception class com.google.common.truth.AssertionErrorWithFacts
- assertThat(boolean[]) - Static method in class com.google.common.truth.Truth
- assertThat(byte[]) - Static method in class com.google.common.truth.Truth
- assertThat(char[]) - Static method in class com.google.common.truth.Truth
- assertThat(double[]) - Static method in class com.google.common.truth.Truth
- assertThat(float[]) - Static method in class com.google.common.truth.Truth
- assertThat(int[]) - Static method in class com.google.common.truth.Truth
- assertThat(long[]) - Static method in class com.google.common.truth.Truth
- assertThat(short[]) - Static method in class com.google.common.truth.Truth
- assertThat(Optional<?>) - Static method in class com.google.common.truth.Truth
- assertThat(Multimap<?, ?>) - Static method in class com.google.common.truth.Truth
- assertThat(Multiset<?>) - Static method in class com.google.common.truth.Truth
- assertThat(Table<?, ?, ?>) - Static method in class com.google.common.truth.Truth
- assertThat(AssertionError) - Static method in class com.google.common.truth.ExpectFailure
-
Creates a subject for asserting about the given
AssertionError
, usually one produced by Truth. - assertThat(Boolean) - Static method in class com.google.common.truth.Truth
- assertThat(Class<?>) - Static method in class com.google.common.truth.Truth
- assertThat(Double) - Static method in class com.google.common.truth.Truth
- assertThat(Float) - Static method in class com.google.common.truth.Truth
- assertThat(Integer) - Static method in class com.google.common.truth.Truth
- assertThat(Iterable<?>) - Static method in class com.google.common.truth.Truth
- assertThat(Long) - Static method in class com.google.common.truth.Truth
- assertThat(Object) - Static method in class com.google.common.truth.Truth
- assertThat(String) - Static method in class com.google.common.truth.Truth
- assertThat(Throwable) - Static method in class com.google.common.truth.Truth
- assertThat(BigDecimal) - Static method in class com.google.common.truth.Truth
- assertThat(Path) - Static method in class com.google.common.truth.Truth8
- assertThat(Map<?, ?>) - Static method in class com.google.common.truth.Truth
- assertThat(Optional<?>) - Static method in class com.google.common.truth.Truth8
- assertThat(OptionalDouble) - Static method in class com.google.common.truth.Truth8
- assertThat(OptionalInt) - Static method in class com.google.common.truth.Truth8
- assertThat(OptionalLong) - Static method in class com.google.common.truth.Truth8
- assertThat(IntStream) - Static method in class com.google.common.truth.Truth8
- assertThat(LongStream) - Static method in class com.google.common.truth.Truth8
- assertThat(Stream<?>) - Static method in class com.google.common.truth.Truth8
- assertThat(T) - Static method in class com.google.common.truth.Truth
- assertThat(T[]) - Static method in class com.google.common.truth.Truth
- assertWithMessage(String) - Static method in class com.google.common.truth.Truth
-
Begins an assertion that, if it fails, will prepend the given message to the failure message.
- assertWithMessage(String, Object...) - Static method in class com.google.common.truth.Truth
-
Begins an assertion that, if it fails, will prepend the given message to the failure message.
- assume() - Static method in class com.google.common.truth.TruthJUnit
-
Begins a call chain with the fluent Truth API.
- ASSUME - Static variable in class com.google.common.truth.TruthJUnit
- asUnicodeHexEscape(char) - Static method in class com.google.common.truth.Subject
- AutoValue_ActualValueInference_DescribedEntry - Class in com.google.common.truth
- AutoValue_ActualValueInference_DescribedEntry(ActualValueInference.InferredType, String) - Constructor for class com.google.common.truth.AutoValue_ActualValueInference_DescribedEntry
- AutoValue_ActualValueInference_FrameInfo - Class in com.google.common.truth
- AutoValue_ActualValueInference_FrameInfo(ImmutableList<ActualValueInference.StackEntry>, ImmutableList<ActualValueInference.StackEntry>) - Constructor for class com.google.common.truth.AutoValue_ActualValueInference_FrameInfo
- AutoValue_ActualValueInference_InferredType - Class in com.google.common.truth
- AutoValue_ActualValueInference_InferredType(String) - Constructor for class com.google.common.truth.AutoValue_ActualValueInference_InferredType
- AutoValue_ActualValueInference_Invocation - Class in com.google.common.truth
- AutoValue_ActualValueInference_Invocation(ActualValueInference.StackEntry, ActualValueInference.StackEntry, ActualValueInference.StackEntry, String) - Constructor for class com.google.common.truth.AutoValue_ActualValueInference_Invocation
- AutoValue_ActualValueInference_Invocation.Builder - Class in com.google.common.truth
- AutoValue_ActualValueInference_OpaqueEntry - Class in com.google.common.truth
- AutoValue_ActualValueInference_OpaqueEntry(ActualValueInference.InferredType) - Constructor for class com.google.common.truth.AutoValue_ActualValueInference_OpaqueEntry
- AutoValue_ActualValueInference_SubjectEntry - Class in com.google.common.truth
- AutoValue_ActualValueInference_SubjectEntry(ActualValueInference.InferredType, ActualValueInference.StackEntry) - Constructor for class com.google.common.truth.AutoValue_ActualValueInference_SubjectEntry
B
- base16(byte[]) - Static method in class com.google.common.truth.Subject
- BEFORE - Enum constant in enum class com.google.common.truth.Expect.TestPhase
- belongsToType(String) - Method in enum class com.google.common.truth.StackTraceCleaner.StackFrameType
-
Returns true if the given frame belongs to this frame type based on the package and/or class name of the frame.
- BigDecimalSubject - Class in com.google.common.truth
-
Propositions for
BigDecimal
typed subjects. - BigDecimalSubject(FailureMetadata, BigDecimal) - Constructor for class com.google.common.truth.BigDecimalSubject
- BOOLEAN - Static variable in class com.google.common.truth.ActualValueInference.InferredType
- BooleanSubject - Class in com.google.common.truth
-
Propositions for boolean subjects.
- BooleanSubject(FailureMetadata, Boolean) - Constructor for class com.google.common.truth.BooleanSubject
- BORING_NAMES - Static variable in class com.google.common.truth.ActualValueInference
- box(int[]) - Static method in class com.google.common.truth.IntStreamSubject
- box(long[]) - Static method in class com.google.common.truth.LongStreamSubject
- boxingInput - Variable in class com.google.common.truth.AutoValue_ActualValueInference_Invocation
- boxingInput - Variable in class com.google.common.truth.AutoValue_ActualValueInference_Invocation.Builder
- boxingInput() - Method in class com.google.common.truth.ActualValueInference.Invocation
-
The value being passed to this call if it is a boxing call (e.g.,
Integer.valueOf
). - boxingInput() - Method in class com.google.common.truth.AutoValue_ActualValueInference_Invocation
- breadthFirstSearch(BiMap<U, V>, Map<U, Integer>) - Method in class com.google.common.truth.GraphMatching.HopcroftKarp
-
Performs the Breadth-First Search phase of the algorithm.
- build() - Method in class com.google.common.truth.ActualValueInference.Invocation.Builder
- build() - Method in class com.google.common.truth.AutoValue_ActualValueInference_Invocation.Builder
- builder(String) - Static method in class com.google.common.truth.ActualValueInference.Invocation
- Builder() - Constructor for class com.google.common.truth.ActualValueInference.Invocation.Builder
- Builder() - Constructor for class com.google.common.truth.AutoValue_ActualValueInference_Invocation.Builder
- butWas() - Method in class com.google.common.truth.Subject
-
Returns a "but was:
" string. - BYTE - Static variable in class com.google.common.truth.ActualValueInference.InferredType
C
- captureFailure(AssertionError) - Method in class com.google.common.truth.ExpectFailure
-
Captures the provided failure, or throws an
AssertionError
if a failure had previously been captured. - CaseInsensitiveStringComparison() - Constructor for class com.google.common.truth.StringSubject.CaseInsensitiveStringComparison
- cause - Variable in exception class com.google.common.truth.AssertionErrorWithFacts
-
Separate cause field, in case initCause() fails.
- cause - Variable in exception class com.google.common.truth.Truth.SimpleAssertionError
-
Separate cause field, in case initCause() fails.
- check() - Method in class com.google.common.truth.Subject
-
Deprecated.Use the other overload, which requires you to supply more information to include in any failure messages.
- check(Object, Object) - Method in interface com.google.common.truth.IterableSubject.PairwiseChecker
- check(String, Object...) - Method in class com.google.common.truth.Subject
-
Returns a builder for creating a derived subject.
- checkArrayEqualsRecursive(Object, Object, String) - Static method in class com.google.common.truth.Subject
-
Returns null if the arrays are equal, recursively.
- checkByteArrayEquals(byte[], byte[]) - Static method in class com.google.common.truth.Subject
-
Returns null if the arrays are equal.
- checkCall(FailureMetadata.OldAndNewValuesAreSimilar, Function<String, String>) - Static method in class com.google.common.truth.FailureMetadata.Step
- checkedToDouble(Number) - Static method in class com.google.common.truth.PrimitiveDoubleArraySubject
- checkedToFloat(Number) - Static method in class com.google.common.truth.PrimitiveFloatArraySubject
- checkInRuleContext() - Method in class com.google.common.truth.Expect.ExpectationGatherer
- checkNoNeedToDisplayBothValues(String, Object...) - Method in class com.google.common.truth.Subject
- checkStatePreconditions() - Method in class com.google.common.truth.Expect
- checkStatePreconditions() - Method in class com.google.common.truth.StandardSubjectBuilder
-
Extension point invoked before every assertion.
- checkTolerance(double) - Static method in class com.google.common.truth.DoubleSubject
-
Ensures that the given tolerance is a non-negative finite value, i.e.
- checkTolerance(float) - Static method in class com.google.common.truth.FloatSubject
-
Ensures that the given tolerance is a non-negative finite value, i.e.
- classMetadataUnsupported() - Static method in class com.google.common.truth.Subject
- className - Variable in class com.google.common.truth.ActualValueInference.InferenceClassVisitor
- ClassSubject - Class in com.google.common.truth
-
Propositions for
Class
subjects. - ClassSubject(FailureMetadata, Class<?>) - Constructor for class com.google.common.truth.ClassSubject
- clean(Set<Throwable>) - Method in class com.google.common.truth.StackTraceCleaner
-
Cleans the stack trace on
throwable
, replacing the trace that was originally on it. - cleanedStackTrace - Variable in class com.google.common.truth.StackTraceCleaner
- CLEANER_LINK - Static variable in class com.google.common.truth.StackTraceCleaner
- cleanStackTrace(Throwable) - Static method in class com.google.common.truth.Platform
- cleanStackTrace(Throwable) - Static method in class com.google.common.truth.StackTraceCleaner
-
Call
Platform.cleanStackTrace(java.lang.Throwable)
rather than calling this directly. - clearStreak() - Method in class com.google.common.truth.StackTraceCleaner
-
Resets the streak counter.
- closeQuietly(InputStream) - Static method in class com.google.common.truth.ActualValueInference
- com.google.common.truth - package com.google.common.truth
-
Truth is a library for performing assertions in tests:
- ComparableSubject<T> - Class in com.google.common.truth
-
Propositions for
Comparable
typed subjects. - ComparableSubject(FailureMetadata, T) - Constructor for class com.google.common.truth.ComparableSubject
- compare(A, E) - Method in class com.google.common.truth.Correspondence
-
Returns whether or not the
actual
value is said to correspond to theexpected
value for the purposes of this test. - compare(A, E) - Method in class com.google.common.truth.Correspondence.FormattingDiffs
- compare(A, E) - Method in class com.google.common.truth.Correspondence.FromBinaryPredicate
- compare(A, E) - Method in class com.google.common.truth.Correspondence.Transforming
- compare(Number, Number) - Method in class com.google.common.truth.Correspondence.TolerantNumericEquality
- compare(Map.Entry<K, A>, Map.Entry<K, E>) - Method in class com.google.common.truth.MultimapSubject.EntryCorrespondence
- compareForEquality(Object) - Method in class com.google.common.truth.Subject
-
Returns whether
actual
equalsexpected
differ and, in some cases, a description of how they differ. - compareValues(BigDecimal) - Method in class com.google.common.truth.BigDecimalSubject
- comparingElementsUsing(Correspondence<? super A, ? super E>) - Method in class com.google.common.truth.IterableSubject
-
Starts a method chain for a check in which the actual elements (i.e.
- comparingValuesUsing(Correspondence<? super A, ? super E>) - Method in class com.google.common.truth.MapSubject
-
Starts a method chain for a check in which the actual values (i.e.
- comparingValuesUsing(Correspondence<? super A, ? super E>) - Method in class com.google.common.truth.MultimapSubject
-
Starts a method chain for a check in which the actual values (i.e.
- ComparisonFailureWithFacts - Exception Class in com.google.common.truth
-
An
AssertionError
(usually a JUnitComparisonFailure
, but not under GWT) composed of structuredFact
instances and other string messages. - ComparisonFailureWithFacts(ImmutableList<String>, ImmutableList<Fact>, String, String, Throwable) - Constructor for exception class com.google.common.truth.ComparisonFailureWithFacts
- ComparisonResult(ImmutableList<Fact>) - Constructor for class com.google.common.truth.Subject.ComparisonResult
- compile(String) - Static method in class com.google.common.truth.Platform
- concat(Iterable<? extends E>...) - Static method in class com.google.common.truth.SubjectUtils
- CONCURRENT_FRAMEWORK - Enum constant in enum class com.google.common.truth.StackTraceCleaner.StackFrameType
- contains(int) - Method in class com.google.common.truth.IntStreamSubject
-
Fails if the subject does not contain the given element.
- contains(long) - Method in class com.google.common.truth.LongStreamSubject
-
Fails if the subject does not contain the given element.
- contains(E) - Method in class com.google.common.truth.IterableSubject.UsingCorrespondence
-
Checks that the subject contains at least one element that corresponds to the given expected element.
- contains(CharSequence) - Method in class com.google.common.truth.StringSubject.CaseInsensitiveStringComparison
-
Fails if the string does not contain the given sequence (while ignoring case).
- contains(CharSequence) - Method in class com.google.common.truth.StringSubject
-
Fails if the string does not contain the given sequence.
- contains(Object) - Method in class com.google.common.truth.IterableSubject
-
Checks (with a side-effect failure) that the subject contains the supplied item.
- contains(Object) - Method in class com.google.common.truth.StreamSubject
-
Fails if the subject does not contain the given element.
- contains(Object, Object) - Method in class com.google.common.truth.TableSubject
-
Fails if the table does not contain a mapping for the given row key and column key.
- containsAny(String, Iterable<? extends E>) - Method in class com.google.common.truth.IterableSubject.UsingCorrespondence
- containsAnyIn(E[]) - Method in class com.google.common.truth.IterableSubject.UsingCorrespondence
-
Checks that the subject contains at least one element that corresponds to at least one of the expected elements.
- containsAnyIn(Iterable<?>) - Method in class com.google.common.truth.IntStreamSubject
-
Fails if the subject does not contain at least one of the given elements.
- containsAnyIn(Iterable<?>) - Method in class com.google.common.truth.IterableSubject
-
Checks that the subject contains at least one of the objects contained in the provided collection or fails.
- containsAnyIn(Iterable<?>) - Method in class com.google.common.truth.LongStreamSubject
-
Fails if the subject does not contain at least one of the given elements.
- containsAnyIn(Iterable<?>) - Method in class com.google.common.truth.StreamSubject
-
Fails if the subject does not contain at least one of the given elements.
- containsAnyIn(Iterable<? extends E>) - Method in class com.google.common.truth.IterableSubject.UsingCorrespondence
-
Checks that the subject contains at least one element that corresponds to at least one of the expected elements.
- containsAnyIn(Object[]) - Method in class com.google.common.truth.IterableSubject
-
Checks that the subject contains at least one of the objects contained in the provided array or fails.
- containsAnyOf(double[]) - Method in class com.google.common.truth.PrimitiveDoubleArraySubject.DoubleArrayAsIterable
-
As
IterableSubject.UsingCorrespondence.containsAnyOf(Object, Object, Object...)
but taking a primitive double array. - containsAnyOf(float[]) - Method in class com.google.common.truth.PrimitiveFloatArraySubject.FloatArrayAsIterable
-
As
IterableSubject.UsingCorrespondence.containsAnyOf(Object, Object, Object...)
but taking a primitive float array. - containsAnyOf(int, int, int...) - Method in class com.google.common.truth.IntStreamSubject
-
Fails if the subject does not contain at least one of the given elements.
- containsAnyOf(long, long, long...) - Method in class com.google.common.truth.LongStreamSubject
-
Fails if the subject does not contain at least one of the given elements.
- containsAnyOf(E, E, E...) - Method in class com.google.common.truth.IterableSubject.UsingCorrespondence
-
Checks that the subject contains at least one element that corresponds to at least one of the expected elements.
- containsAnyOf(Object, Object, Object...) - Method in class com.google.common.truth.IterableSubject
-
Checks that the subject contains at least one of the provided objects or fails.
- containsAnyOf(Object, Object, Object...) - Method in class com.google.common.truth.StreamSubject
-
Fails if the subject does not contain at least one of the given elements.
- containsAtLeast(double[]) - Method in class com.google.common.truth.PrimitiveDoubleArraySubject.DoubleArrayAsIterable
-
As
IterableSubject.UsingCorrespondence.containsAtLeast(Object, Object, Object...)
but taking a primitive double array. - containsAtLeast(float[]) - Method in class com.google.common.truth.PrimitiveFloatArraySubject.FloatArrayAsIterable
-
As
IterableSubject.UsingCorrespondence.containsAtLeast(Object, Object, Object...)
but taking a primitive float array. - containsAtLeast(int, int, int...) - Method in class com.google.common.truth.IntStreamSubject
-
Fails if the subject does not contain all of the given elements.
- containsAtLeast(long, long, long...) - Method in class com.google.common.truth.LongStreamSubject
-
Fails if the subject does not contain all of the given elements.
- containsAtLeast(E, E, E...) - Method in class com.google.common.truth.IterableSubject.UsingCorrespondence
-
Checks that the subject contains elements that corresponds to all of the expected elements, i.e.
- containsAtLeast(Object, E, Object...) - Method in class com.google.common.truth.MapSubject.UsingCorrespondence
-
Fails if the map does not contain at least the given set of keys mapping to values that correspond to the given values.
- containsAtLeast(Object, E, Object...) - Method in class com.google.common.truth.MultimapSubject.UsingCorrespondence
-
Fails if the multimap does not contain at least the given key/value pairs.
- containsAtLeast(Object, Object, Object...) - Method in class com.google.common.truth.IterableSubject
-
Checks that the actual iterable contains at least all of the expected elements or fails.
- containsAtLeast(Object, Object, Object...) - Method in class com.google.common.truth.MapSubject
- containsAtLeast(Object, Object, Object...) - Method in class com.google.common.truth.MultimapSubject
-
Fails if the multimap does not contain at least the given key/value pairs.
- containsAtLeast(Object, Object, Object...) - Method in class com.google.common.truth.StreamSubject
-
Fails if the subject does not contain all of the given elements.
- containsAtLeastElementsIn(E[]) - Method in class com.google.common.truth.IterableSubject.UsingCorrespondence
-
Checks that the subject contains elements that corresponds to all of the expected elements, i.e.
- containsAtLeastElementsIn(Iterable<?>) - Method in class com.google.common.truth.IntStreamSubject
-
Fails if the subject does not contain all of the given elements.
- containsAtLeastElementsIn(Iterable<?>) - Method in class com.google.common.truth.IterableSubject
-
Checks that the actual iterable contains at least all of the expected elements or fails.
- containsAtLeastElementsIn(Iterable<?>) - Method in class com.google.common.truth.LongStreamSubject
-
Fails if the subject does not contain all of the given elements.
- containsAtLeastElementsIn(Iterable<?>) - Method in class com.google.common.truth.StreamSubject
-
Fails if the subject does not contain all of the given elements.
- containsAtLeastElementsIn(Iterable<? extends E>) - Method in class com.google.common.truth.IterableSubject.UsingCorrespondence
-
Checks that the subject contains elements that corresponds to all of the expected elements, i.e.
- containsAtLeastElementsIn(Object[]) - Method in class com.google.common.truth.IterableSubject
-
Checks that the actual iterable contains at least all of the expected elements or fails.
- containsAtLeastEntriesIn(Multimap<?, ?>) - Method in class com.google.common.truth.MultimapSubject
-
Fails if the
Multimap
does not contain at least the entries in the argumentMultimap
. - containsAtLeastEntriesIn(Multimap<?, ? extends E>) - Method in class com.google.common.truth.MultimapSubject.UsingCorrespondence
-
Fails if the map does not contain at least the keys in the given multimap, mapping to values that correspond to the values of the given multimap.
- containsAtLeastEntriesIn(Map<?, ?>) - Method in class com.google.common.truth.MapSubject
-
Fails if the map does not contain at least the given set of entries in the given map.
- containsAtLeastEntriesIn(Map<?, ? extends E>) - Method in class com.google.common.truth.MapSubject.UsingCorrespondence
-
Fails if the map does not contain at least the keys in the given map, mapping to values that correspond to the values of the given map.
- containsCell(Table.Cell<?, ?, ?>) - Method in class com.google.common.truth.TableSubject
-
Fails if the table does not contain the given cell.
- containsCell(Object, Object, Object) - Method in class com.google.common.truth.TableSubject
-
Fails if the table does not contain the given cell.
- containsColumn(Object) - Method in class com.google.common.truth.TableSubject
-
Fails if the table does not contain the given column key.
- containsEmptyOrLong(Iterable<Multiset.Entry<?>>) - Static method in class com.google.common.truth.IterableSubject
- containsEntriesInAnyOrder(Map<?, ?>, String, boolean) - Method in class com.google.common.truth.MapSubject
- containsEntry(Object, E) - Method in class com.google.common.truth.MapSubject.UsingCorrespondence
-
Fails if the map does not contain an entry with the given key and a value that corresponds to the given value.
- containsEntry(Object, E) - Method in class com.google.common.truth.MultimapSubject.UsingCorrespondence
-
Fails if the multimap does not contain an entry with the given key and a value that corresponds to the given value.
- containsEntry(Object, Object) - Method in class com.google.common.truth.MapSubject
-
Fails if the map does not contain the given entry.
- containsEntry(Object, Object) - Method in class com.google.common.truth.MultimapSubject
-
Fails if the multimap does not contain the given entry.
- containsExactly() - Method in class com.google.common.truth.MapSubject
-
Fails if the map is not empty.
- containsExactly() - Method in class com.google.common.truth.MultimapSubject
-
Fails if the multimap is not empty.
- containsExactly() - Method in class com.google.common.truth.MultimapSubject.UsingCorrespondence
-
Fails if the multimap is not empty.
- containsExactly(double[]) - Method in class com.google.common.truth.PrimitiveDoubleArraySubject.DoubleArrayAsIterable
-
As
IterableSubject.UsingCorrespondence.containsExactly(Object...)
but taking a primitive double array. - containsExactly(float[]) - Method in class com.google.common.truth.PrimitiveFloatArraySubject.FloatArrayAsIterable
-
As
IterableSubject.UsingCorrespondence.containsExactly(Object...)
but taking a primitive float array. - containsExactly(int...) - Method in class com.google.common.truth.IntStreamSubject
-
Fails if the subject does not contain exactly the given elements.
- containsExactly(long...) - Method in class com.google.common.truth.LongStreamSubject
-
Fails if the subject does not contain exactly the given elements.
- containsExactly(E...) - Method in class com.google.common.truth.IterableSubject.UsingCorrespondence
-
Checks that subject contains exactly elements that correspond to the expected elements, i.e.
- containsExactly(Object...) - Method in class com.google.common.truth.IterableSubject
-
Checks that a subject contains exactly the provided objects or fails.
- containsExactly(Object...) - Method in class com.google.common.truth.StreamSubject
-
Fails if the subject does not contain exactly the given elements.
- containsExactly(Object, E, Object...) - Method in class com.google.common.truth.MapSubject.UsingCorrespondence
-
Fails if the map does not contain exactly the given set of keys mapping to values that correspond to the given values.
- containsExactly(Object, E, Object...) - Method in class com.google.common.truth.MultimapSubject.UsingCorrespondence
-
Fails if the multimap does not contain exactly the given set of key/value pairs.
- containsExactly(Object, Object, Object...) - Method in class com.google.common.truth.MapSubject
-
Fails if the map does not contain exactly the given set of key/value pairs.
- containsExactly(Object, Object, Object...) - Method in class com.google.common.truth.MultimapSubject
-
Fails if the multimap does not contain exactly the given set of key/value pairs.
- containsExactlyElementsIn(E[]) - Method in class com.google.common.truth.IterableSubject.UsingCorrespondence
-
Checks that subject contains exactly elements that correspond to the expected elements, i.e.
- containsExactlyElementsIn(Iterable<?>) - Method in class com.google.common.truth.IntStreamSubject
-
Fails if the subject does not contain exactly the given elements.
- containsExactlyElementsIn(Iterable<?>) - Method in class com.google.common.truth.IterableSubject
-
Checks that a subject contains exactly the provided objects or fails.
- containsExactlyElementsIn(Iterable<?>) - Method in class com.google.common.truth.LongStreamSubject
-
Fails if the subject does not contain exactly the given elements.
- containsExactlyElementsIn(Iterable<?>) - Method in class com.google.common.truth.StreamSubject
-
Fails if the subject does not contain exactly the given elements.
- containsExactlyElementsIn(Iterable<?>, boolean) - Method in class com.google.common.truth.IterableSubject
- containsExactlyElementsIn(Iterable<? extends E>) - Method in class com.google.common.truth.IterableSubject.UsingCorrespondence
-
Checks that subject contains exactly elements that correspond to the expected elements, i.e.
- containsExactlyElementsIn(Object[]) - Method in class com.google.common.truth.IterableSubject
-
Checks that a subject contains exactly the provided objects or fails.
- containsExactlyEntriesIn(Multimap<?, ?>) - Method in class com.google.common.truth.MultimapSubject
-
Fails if the
Multimap
does not contain precisely the same entries as the argumentMultimap
. - containsExactlyEntriesIn(Multimap<?, ? extends E>) - Method in class com.google.common.truth.MultimapSubject.UsingCorrespondence
-
Fails if the map does not contain exactly the keys in the given multimap, mapping to values that correspond to the values of the given multimap.
- containsExactlyEntriesIn(Map<?, ?>) - Method in class com.google.common.truth.MapSubject
-
Fails if the map does not contain exactly the given set of entries in the given map.
- containsExactlyEntriesIn(Map<?, ? extends E>) - Method in class com.google.common.truth.MapSubject.UsingCorrespondence
-
Fails if the map does not contain exactly the keys in the given map, mapping to values that correspond to the values of the given map.
- containsIgnoreCase(String) - Method in class com.google.common.truth.StringSubject.CaseInsensitiveStringComparison
- containsKey(Object) - Method in class com.google.common.truth.MapSubject
-
Fails if the map does not contain the given key.
- containsKey(Object) - Method in class com.google.common.truth.MultimapSubject
-
Fails if the multimap does not contain the given key.
- containsMatch(String) - Method in class com.google.common.truth.StringSubject
-
Fails if the string does not contain a match on the given regex.
- containsMatch(String, String) - Static method in class com.google.common.truth.Platform
-
Determines if the given subject contains a match for the given regex.
- containsMatch(Pattern) - Method in class com.google.common.truth.StringSubject
-
Fails if the string does not contain a match on the given regex.
- containsNoDuplicates() - Method in class com.google.common.truth.IntStreamSubject
-
Fails if the subject contains duplicate elements.
- containsNoDuplicates() - Method in class com.google.common.truth.IterableSubject
-
Checks that the subject does not contain duplicate elements.
- containsNoDuplicates() - Method in class com.google.common.truth.LongStreamSubject
-
Fails if the subject contains duplicate elements.
- containsNoDuplicates() - Method in class com.google.common.truth.StreamSubject
-
Fails if the subject contains duplicate elements.
- containsNone(String, Iterable<? extends E>) - Method in class com.google.common.truth.IterableSubject.UsingCorrespondence
- containsNoneIn(E[]) - Method in class com.google.common.truth.IterableSubject.UsingCorrespondence
-
Checks that the subject contains no elements that correspond to any of the given elements.
- containsNoneIn(Iterable<?>) - Method in class com.google.common.truth.IntStreamSubject
-
Fails if the subject contains any of the given elements.
- containsNoneIn(Iterable<?>) - Method in class com.google.common.truth.IterableSubject
-
Checks that the actual iterable contains none of the elements contained in the excluded iterable or fails.
- containsNoneIn(Iterable<?>) - Method in class com.google.common.truth.LongStreamSubject
-
Fails if the subject contains any of the given elements.
- containsNoneIn(Iterable<?>) - Method in class com.google.common.truth.StreamSubject
-
Fails if the subject contains any of the given elements.
- containsNoneIn(Iterable<? extends E>) - Method in class com.google.common.truth.IterableSubject.UsingCorrespondence
-
Checks that the subject contains no elements that correspond to any of the given elements.
- containsNoneIn(Object[]) - Method in class com.google.common.truth.IterableSubject
-
Checks that the actual iterable contains none of the elements contained in the excluded array or fails.
- containsNoneOf(double[]) - Method in class com.google.common.truth.PrimitiveDoubleArraySubject.DoubleArrayAsIterable
-
As
IterableSubject.UsingCorrespondence.containsNoneOf(Object, Object, Object...)
but taking a primitive double array. - containsNoneOf(float[]) - Method in class com.google.common.truth.PrimitiveFloatArraySubject.FloatArrayAsIterable
-
As
IterableSubject.UsingCorrespondence.containsNoneOf(Object, Object, Object...)
but taking a primitive float array. - containsNoneOf(int, int, int...) - Method in class com.google.common.truth.IntStreamSubject
-
Fails if the subject contains any of the given elements.
- containsNoneOf(long, long, long...) - Method in class com.google.common.truth.LongStreamSubject
-
Fails if the subject contains any of the given elements.
- containsNoneOf(E, E, E...) - Method in class com.google.common.truth.IterableSubject.UsingCorrespondence
-
Checks that the subject contains no elements that correspond to any of the given elements.
- containsNoneOf(Object, Object, Object...) - Method in class com.google.common.truth.IterableSubject
-
Checks that a actual iterable contains none of the excluded objects or fails.
- containsNoneOf(Object, Object, Object...) - Method in class com.google.common.truth.StreamSubject
-
Fails if the subject contains any of the given elements.
- containsRow(Object) - Method in class com.google.common.truth.TableSubject
-
Fails if the table does not contain the given row key.
- containsValue(Object) - Method in class com.google.common.truth.TableSubject
-
Fails if the table does not contain the given value.
- contents - Variable in class com.google.common.truth.SubjectUtils.NonHashingMultiset
- CONTEXT - Static variable in exception class com.google.common.truth.ComparisonFailureWithFacts
- Conventions for handling exceptions - Search tag in com.google.common.truth.Correspondence.compare(A, E)
- Section
- Conventions for handling exceptions - Search tag in com.google.common.truth.Correspondence.compare(A, E)
- Section
- Conventions for handling exceptions - Search tag in com.google.common.truth.Correspondence.compare(A, E)
- Section
- Conventions for handling exceptions - Search tag in com.google.common.truth.Correspondence.compare(A, E)
- Section
- Conventions for handling exceptions - Search tag in com.google.common.truth.Correspondence.compare(Map.Entry<K, A>, Map.Entry<K, E>)
- Section
- Conventions for handling exceptions - Search tag in com.google.common.truth.Correspondence.compare(Number, Number)
- Section
- convertToDescriptor(String) - Static method in class com.google.common.truth.ActualValueInference.InferenceMethodVisitor
- convertTypeInStackMapFrame(Object) - Method in class com.google.common.truth.ActualValueInference.InferenceMethodVisitor
-
Convert the type in stack map frame to inference type.
- convertTypesInStackMapFrame(int, Object[]) - Method in class com.google.common.truth.ActualValueInference.InferenceMethodVisitor
- correspondence - Variable in class com.google.common.truth.IterableSubject.UsingCorrespondence
- correspondence - Variable in class com.google.common.truth.MapSubject.UsingCorrespondence
- correspondence - Variable in class com.google.common.truth.MultimapSubject.UsingCorrespondence
- Correspondence<A,
E> - Class in com.google.common.truth -
Determines whether an instance of type
A
corresponds in some way to an instance of typeE
for the purposes of a test assertion. - Correspondence() - Constructor for class com.google.common.truth.Correspondence
-
Deprecated.Construct an instance with the static factory methods instead. The most mechanical migration is usually to
Correspondence.from(com.google.common.truth.Correspondence.BinaryPredicate<A, E>, java.lang.String)
. - Correspondence.BinaryPredicate<A,
E> - Interface in com.google.common.truth -
A functional interface for a binary predicate, to be used to test whether a pair of objects of types
A
andE
satisfy some condition. - Correspondence.DiffFormatter<A,
E> - Interface in com.google.common.truth -
A functional interface to be used format the diff between a pair of objects of types
A
andE
. - Correspondence.ExceptionStore - Class in com.google.common.truth
-
Helper object to store exceptions encountered while executing a
Correspondence
method. - Correspondence.FormattingDiffs<A,
E> - Class in com.google.common.truth - Correspondence.FromBinaryPredicate<A,
E> - Class in com.google.common.truth - Correspondence.StoredException - Class in com.google.common.truth
- Correspondence.TolerantNumericEquality - Class in com.google.common.truth
- Correspondence.Transforming<A,
E> - Class in com.google.common.truth - correspondInOrderAllIn(Iterator<? extends A>, Iterator<? extends E>) - Method in class com.google.common.truth.IterableSubject.UsingCorrespondence
-
Returns whether all the elements of the expected iterator and any subset of the elements of the actual iterator can be paired up in order, such that every pair of actual and expected elements satisfies the correspondence.
- correspondInOrderExactly(Iterator<? extends A>, Iterator<? extends E>) - Method in class com.google.common.truth.IterableSubject.UsingCorrespondence
-
Returns whether the actual and expected iterators have the same number of elements and, when iterated pairwise, every pair of actual and expected values satisfies the correspondence.
- countDuplicates(Iterable<?>) - Static method in class com.google.common.truth.SubjectUtils
- countDuplicatesAndAddTypeInfo(Iterable<?>) - Static method in class com.google.common.truth.SubjectUtils
-
Makes a String representation of
items
with collapsed duplicates and additional class info. - countDuplicatesAndMaybeAddTypeInfoReturnObject(Iterable<?>, boolean) - Static method in class com.google.common.truth.SubjectUtils
-
Similar to
SubjectUtils.countDuplicatesAndAddTypeInfo(java.lang.Iterable<?>)
andSubjectUtils.countDuplicates(java.lang.Iterable<?>)
but (a) only adds type info if requested and (b) returns a richer object containing the data. - countDuplicatesMultimap(Multimap<?, ?>) - Static method in class com.google.common.truth.MultimapSubject
- countDuplicatesToMultiset(Iterable<T>) - Static method in class com.google.common.truth.SubjectUtils
- countOf(T, Iterable<T>) - Static method in class com.google.common.truth.SubjectUtils
- countPlaceholders(String) - Static method in class com.google.common.truth.LazyMessage
- create() - Static method in class com.google.common.truth.Expect
-
Creates a new instance.
- create(ImmutableList<ActualValueInference.StackEntry>, ImmutableList<ActualValueInference.StackEntry>) - Static method in class com.google.common.truth.ActualValueInference.FrameInfo
- create(ImmutableList<String>, ImmutableList<Fact>, ImmutableList<Fact>, String, String, Throwable) - Static method in exception class com.google.common.truth.ComparisonFailureWithFacts
- create(ImmutableList<String>, ImmutableList<Fact>, Throwable) - Static method in exception class com.google.common.truth.AssertionErrorWithFacts
- create(String) - Static method in class com.google.common.truth.ActualValueInference.InferredType
-
Create a type for a value.
- create(String, Throwable) - Static method in exception class com.google.common.truth.Truth.SimpleAssertionError
- create(Map<? extends K, ? extends A>, Map<? extends K, ? extends E>, boolean, MapSubject.ValueTester<? super A, ? super E>) - Static method in class com.google.common.truth.MapSubject.MapDifference
- createInitialLocalVariableSlots(int, String, String, String) - Static method in class com.google.common.truth.ActualValueInference.InferenceMethodVisitor
-
Create the slots for local variables at the very beginning of the method with the information of the declaring class and the method descriptor.
- createStreakReplacementFrame(StackTraceCleaner.StackFrameType, int) - Static method in class com.google.common.truth.StackTraceCleaner
- createSubject(FailureMetadata, ActualT) - Method in interface com.google.common.truth.Subject.Factory
-
Creates a new
Subject
. - createSubjectBuilder(FailureMetadata) - Method in interface com.google.common.truth.CustomSubjectBuilder.Factory
-
Creates a new
CustomSubjectBuilder
of the appropriate type. - createWithNoStack(String) - Static method in exception class com.google.common.truth.Truth.SimpleAssertionError
- createWithNoStack(String, Throwable) - Static method in exception class com.google.common.truth.Truth.SimpleAssertionError
- currentStreakLength - Variable in class com.google.common.truth.StackTraceCleaner
- currentStreakType - Variable in class com.google.common.truth.StackTraceCleaner
- customName - Variable in class com.google.common.truth.Subject
- CustomSubjectBuilder - Class in com.google.common.truth
-
In a fluent assertion chain, exposes one or more "custom"
that
methods, which accept a value under test and return aSubject
. - CustomSubjectBuilder(FailureMetadata) - Constructor for class com.google.common.truth.CustomSubjectBuilder
-
Constructor for use by subclasses.
- CustomSubjectBuilder.Factory<CustomSubjectBuilderT> - Interface in com.google.common.truth
D
- delegate - Variable in class com.google.common.truth.Correspondence.FormattingDiffs
- delegate - Variable in class com.google.common.truth.MapSubject.TypedToStringWrapper
- depthFirstSearch(BiMap<U, V>, Map<U, Integer>, int, U) - Method in class com.google.common.truth.GraphMatching.HopcroftKarp
-
Performs the Depth-First Search phase of the algorithm.
- derive(ImmutableList<LazyMessage>, ImmutableList<FailureMetadata.Step>) - Method in class com.google.common.truth.FailureMetadata
- deriveEntry(ActualValueInference.InferredType, boolean) - Method in class com.google.common.truth.ActualValueInference.Invocation
- describe() - Method in class com.google.common.truth.Correspondence.StoredException
-
Returns a String describing the exception stored.
- describe(Function<MapSubject.ValueDifference<A, E>, String>) - Method in class com.google.common.truth.MapSubject.MapDifference
- describeActualValue(String, String, int) - Static method in class com.google.common.truth.ActualValueInference
-
Call
Platform.inferDescription()
rather than calling this directly. - describeAnyMatchesByKey(IterableSubject.UsingCorrespondence.Pairing, Correspondence.ExceptionStore) - Method in class com.google.common.truth.IterableSubject.UsingCorrespondence
- describeAsAdditionalInfo() - Method in class com.google.common.truth.Correspondence.ExceptionStore
-
If any exceptions are stored, returns facts to use in a failure message when the exceptions should be noted as additional info; if empty, returns an empty list.
- describeAsMainCause() - Method in class com.google.common.truth.Correspondence.ExceptionStore
-
Returns facts to use in a failure message when the exceptions from
compare
calls are the main cause of the failure. - described(ActualValueInference.InferredType, String) - Static method in class com.google.common.truth.ActualValueInference
- DescribedEntry() - Constructor for class com.google.common.truth.ActualValueInference.DescribedEntry
- describeForIterable() - Method in class com.google.common.truth.Correspondence
-
Returns a
Fact
describing how this correspondence compares elements of an iterable. - describeForMapValues() - Method in class com.google.common.truth.Correspondence
-
Returns a
Fact
describing how this correspondence compares values in a map (or multimap). - describeMissing(List<? extends E>, List<? extends A>, Correspondence.ExceptionStore) - Method in class com.google.common.truth.IterableSubject.UsingCorrespondence
-
Given a list of missing elements, which must be non-empty, and a list of extra elements, returns a verb phrase (suitable for appearing after the subject of the verb) describing the missing elements, diffing against the extra ones where appropriate.
- describeMissingOrExtra(List<? extends E>, List<? extends A>, Correspondence.ExceptionStore) - Method in class com.google.common.truth.IterableSubject.UsingCorrespondence
-
Given a list of missing elements and a list of extra elements, at least one of which must be non-empty, returns a verb phrase (suitable for appearing after the subject of the verb) describing them.
- describeMissingOrExtraWithoutPairing(String, List<? extends E>, List<? extends A>) - Method in class com.google.common.truth.IterableSubject.UsingCorrespondence
- describeMissingOrExtraWithPairing(IterableSubject.UsingCorrespondence.Pairing, Correspondence.ExceptionStore) - Method in class com.google.common.truth.IterableSubject.UsingCorrespondence
- describeMissingWithoutPairing(String, List<? extends E>) - Method in class com.google.common.truth.IterableSubject.UsingCorrespondence
- describeMissingWithPairing(IterableSubject.UsingCorrespondence.Pairing, Correspondence.ExceptionStore) - Method in class com.google.common.truth.IterableSubject.UsingCorrespondence
- description - Variable in class com.google.common.truth.AutoValue_ActualValueInference_DescribedEntry
- description - Variable in class com.google.common.truth.Correspondence.FromBinaryPredicate
- description - Variable in class com.google.common.truth.Correspondence.Transforming
- description() - Method in class com.google.common.truth.ActualValueInference.DescribedEntry
- description() - Method in class com.google.common.truth.ActualValueInference.StackEntry
- description() - Method in class com.google.common.truth.AutoValue_ActualValueInference_DescribedEntry
- description() - Method in class com.google.common.truth.FailureMetadata
-
Returns a description of the final actual value, if it appears "interesting" enough to show.
- descriptionUpdate - Variable in class com.google.common.truth.FailureMetadata.Step
- descriptor - Variable in class com.google.common.truth.AutoValue_ActualValueInference_InferredType
- descriptor() - Method in class com.google.common.truth.ActualValueInference.InferredType
- descriptor() - Method in class com.google.common.truth.AutoValue_ActualValueInference_InferredType
- difference(Multimap<?, ?>, Multimap<?, ?>) - Static method in class com.google.common.truth.MultimapSubject
- difference(List<?>, List<?>) - Static method in class com.google.common.truth.MultimapSubject
- DIFFERENT - Enum constant in enum class com.google.common.truth.FailureMetadata.OldAndNewValuesAreSimilar
- DIFFERENT_NO_DESCRIPTION - Static variable in class com.google.common.truth.Subject.ComparisonResult
- differentNoDescription() - Static method in class com.google.common.truth.Subject.ComparisonResult
-
Returns a non-equal result with no description.
- differentWithDescription(Fact...) - Static method in class com.google.common.truth.Subject.ComparisonResult
-
Returns a non-equal result with the given description.
- displayingDiffsPairedBy(Function<? super A, ?>, Function<? super E, ?>) - Method in class com.google.common.truth.IterableSubject.UsingCorrespondence
-
Specifies a way to pair up unexpected and missing elements in the message when an assertion fails.
- displayingDiffsPairedBy(Function<? super E, ?>) - Method in class com.google.common.truth.IterableSubject.UsingCorrespondence
-
Specifies a way to pair up unexpected and missing elements in the message when an assertion fails.
- doCheck(FailureMetadata.OldAndNewValuesAreSimilar, String, Object[]) - Method in class com.google.common.truth.Subject
- doCheckInRuleContext(AssertionError) - Method in class com.google.common.truth.Expect.ExpectationGatherer
- doesNotContain(int) - Method in class com.google.common.truth.IntStreamSubject
-
Fails if the subject contains the given element.
- doesNotContain(long) - Method in class com.google.common.truth.LongStreamSubject
-
Fails if the subject contains the given element.
- doesNotContain(E) - Method in class com.google.common.truth.IterableSubject.UsingCorrespondence
-
Checks that none of the actual elements correspond to the given element.
- doesNotContain(CharSequence) - Method in class com.google.common.truth.StringSubject.CaseInsensitiveStringComparison
-
Fails if the string contains the given sequence (while ignoring case).
- doesNotContain(CharSequence) - Method in class com.google.common.truth.StringSubject
-
Fails if the string contains the given sequence.
- doesNotContain(Object) - Method in class com.google.common.truth.IterableSubject
-
Checks (with a side-effect failure) that the subject does not contain the supplied item.
- doesNotContain(Object) - Method in class com.google.common.truth.StreamSubject
-
Fails if the subject contains the given element.
- doesNotContain(Object, Object) - Method in class com.google.common.truth.TableSubject
-
Fails if the table contains a mapping for the given row key and column key.
- doesNotContainCell(Table.Cell<?, ?, ?>) - Method in class com.google.common.truth.TableSubject
-
Fails if the table contains the given cell.
- doesNotContainCell(Object, Object, Object) - Method in class com.google.common.truth.TableSubject
-
Fails if the table contains the given cell.
- doesNotContainEntry(Object, E) - Method in class com.google.common.truth.MapSubject.UsingCorrespondence
-
Fails if the map contains an entry with the given key and a value that corresponds to the given value.
- doesNotContainEntry(Object, E) - Method in class com.google.common.truth.MultimapSubject.UsingCorrespondence
-
Fails if the multimap contains an entry with the given key and a value that corresponds to the given value.
- doesNotContainEntry(Object, Object) - Method in class com.google.common.truth.MapSubject
-
Fails if the map contains the given entry.
- doesNotContainEntry(Object, Object) - Method in class com.google.common.truth.MultimapSubject
-
Fails if the multimap contains the given entry.
- doesNotContainKey(Object) - Method in class com.google.common.truth.MapSubject
-
Fails if the map contains the given key.
- doesNotContainKey(Object) - Method in class com.google.common.truth.MultimapSubject
-
Fails if the multimap contains the given key.
- doesNotContainMatch(String) - Method in class com.google.common.truth.StringSubject
-
Fails if the string contains a match on the given regex.
- doesNotContainMatch(Pattern) - Method in class com.google.common.truth.StringSubject
-
Fails if the string contains a match on the given regex.
- doesNotMatch(String) - Method in class com.google.common.truth.StringSubject
-
Fails if the string matches the given regex.
- doesNotMatch(Pattern) - Method in class com.google.common.truth.StringSubject
-
Fails if the string matches the given regex.
- doFactValue(String, Integer) - Method in class com.google.common.truth.TruthFailureSubject
- doFail(ImmutableList<Fact>) - Method in class com.google.common.truth.Subject
- doFail(AssertionError) - Method in class com.google.common.truth.FailureMetadata
- doLeaveRuleContext() - Method in class com.google.common.truth.Expect.ExpectationGatherer
- doLeaveRuleContext(Throwable) - Method in class com.google.common.truth.Expect.ExpectationGatherer
- DOUBLE - Static variable in class com.google.common.truth.ActualValueInference.InferredType
- DoubleArrayAsIterable(Correspondence<? super Double, Number>, IterableSubject) - Constructor for class com.google.common.truth.PrimitiveDoubleArraySubject.DoubleArrayAsIterable
- doubleArrayAsString(double[]) - Static method in class com.google.common.truth.Subject
- DoubleSubject - Class in com.google.common.truth
-
Propositions for
Double
subjects. - DoubleSubject(FailureMetadata, Double) - Constructor for class com.google.common.truth.DoubleSubject
- DoubleSubject.TolerantDoubleComparison - Class in com.google.common.truth
-
A partially specified check about an approximate relationship to a
double
subject using a tolerance. - doubleToString(double) - Static method in class com.google.common.truth.Platform
- DuplicateGroupedAndTyped(SubjectUtils.NonHashingMultiset<?>, Optional<String>) - Constructor for class com.google.common.truth.SubjectUtils.DuplicateGroupedAndTyped
- DURING - Enum constant in enum class com.google.common.truth.Expect.TestPhase
E
- ElementFactGrouping() - Constructor for enum class com.google.common.truth.IterableSubject.ElementFactGrouping
- endStreak() - Method in class com.google.common.truth.StackTraceCleaner
-
Ends the current streak, adding a summary frame to the result.
- endsWith(String) - Method in class com.google.common.truth.StringSubject
-
Fails if the string does not end with the given string.
- ensureFailureCaught() - Method in class com.google.common.truth.ExpectFailure
-
Ensures a failure is caught if it's expected (i.e.,
ExpectFailure.whenTesting()
is called) and throws error if not. - enterRuleContext() - Method in class com.google.common.truth.Expect.ExpectationGatherer
- enterRuleContext() - Method in class com.google.common.truth.ExpectFailure
-
Enters rule context to be ready to capture failures.
- EntryCorrespondence(Correspondence<? super A, ? super E>) - Constructor for class com.google.common.truth.MultimapSubject.EntryCorrespondence
- entrySet() - Method in class com.google.common.truth.SubjectUtils.DuplicateGroupedAndTyped
- entrySet() - Method in class com.google.common.truth.SubjectUtils.NonHashingMultiset
- entryString(Multiset.Entry<?>) - Static method in class com.google.common.truth.SubjectUtils
- equal() - Static method in class com.google.common.truth.Subject.ComparisonResult
-
Returns an equal result.
- EQUAL - Enum constant in enum class com.google.common.truth.Subject.EqualityCheck
- EQUAL - Static variable in class com.google.common.truth.Subject.ComparisonResult
- EQUALITY - Static variable in class com.google.common.truth.MapSubject
- EQUALITY_WITHOUT_USING_HASH_CODE - Static variable in class com.google.common.truth.SubjectUtils.NonHashingMultiset
- EqualityCheck(String) - Constructor for enum class com.google.common.truth.Subject.EqualityCheck
- equals(Object) - Method in class com.google.common.truth.AutoValue_ActualValueInference_DescribedEntry
- equals(Object) - Method in class com.google.common.truth.AutoValue_ActualValueInference_FrameInfo
- equals(Object) - Method in class com.google.common.truth.AutoValue_ActualValueInference_InferredType
- equals(Object) - Method in class com.google.common.truth.AutoValue_ActualValueInference_Invocation
- equals(Object) - Method in class com.google.common.truth.AutoValue_ActualValueInference_OpaqueEntry
- equals(Object) - Method in class com.google.common.truth.AutoValue_ActualValueInference_SubjectEntry
- equals(Object) - Method in class com.google.common.truth.Correspondence
-
Deprecated.
Object.equals(Object)
is not supported. If you meant to compare objects using thisCorrespondence
, useCorrespondence.compare(A, E)
. - equals(Object) - Method in class com.google.common.truth.DoubleSubject.TolerantDoubleComparison
-
Deprecated.
Object.equals(Object)
is not supported on TolerantDoubleComparison. If you meant to compare doubles, useDoubleSubject.TolerantDoubleComparison.of(double)
instead. - equals(Object) - Method in class com.google.common.truth.FloatSubject.TolerantFloatComparison
-
Deprecated.
Object.equals(Object)
is not supported on TolerantFloatComparison. If you meant to compare floats, useFloatSubject.TolerantFloatComparison.of(float)
instead. - equals(Object) - Method in class com.google.common.truth.MapSubject.TypedToStringWrapper
- equals(Object) - Method in class com.google.common.truth.Subject
-
Deprecated.
Object.equals(Object)
is not supported on Truth subjects. If you meant to test object equality between an expected and the actual value, useSubject.isEqualTo(Object)
instead. - equalWithinTolerance(double, double, double) - Static method in class com.google.common.truth.MathUtil
-
Returns true iff
left
andright
are finite values withintolerance
of each other. - equalWithinTolerance(float, float, float) - Static method in class com.google.common.truth.MathUtil
-
Returns true iff
left
andright
are finite values withintolerance
of each other. - ErrorWithFacts - Interface in com.google.common.truth
-
Supertype of Truth's
AssertionError
subclasses that are created from a list ofFact
instances. - escapeWhitespace(char) - Static method in class com.google.common.truth.Subject
- escapeWhitespace(String) - Static method in class com.google.common.truth.Subject
- evaluateAll(ImmutableList<LazyMessage>) - Static method in class com.google.common.truth.LazyMessage
- EXACT_EQUALITY_CORRESPONDENCE - Static variable in class com.google.common.truth.PrimitiveDoubleArraySubject
- EXACT_EQUALITY_CORRESPONDENCE - Static variable in class com.google.common.truth.PrimitiveFloatArraySubject
- Examples of exception handling - Search tag in com.google.common.truth.Correspondence.compare(A, E)
- Section
- Examples of exception handling - Search tag in com.google.common.truth.Correspondence.compare(A, E)
- Section
- Examples of exception handling - Search tag in com.google.common.truth.Correspondence.compare(A, E)
- Section
- Examples of exception handling - Search tag in com.google.common.truth.Correspondence.compare(A, E)
- Section
- Examples of exception handling - Search tag in com.google.common.truth.Correspondence.compare(Map.Entry<K, A>, Map.Entry<K, E>)
- Section
- Examples of exception handling - Search tag in com.google.common.truth.Correspondence.compare(Number, Number)
- Section
- exception - Variable in class com.google.common.truth.Correspondence.StoredException
- Exception handling - Search tag in com.google.common.truth.Correspondence.compare(A, E)
- Section
- Exception handling - Search tag in com.google.common.truth.Correspondence.compare(A, E)
- Section
- Exception handling - Search tag in com.google.common.truth.Correspondence.compare(A, E)
- Section
- Exception handling - Search tag in com.google.common.truth.Correspondence.compare(A, E)
- Section
- Exception handling - Search tag in com.google.common.truth.Correspondence.compare(Map.Entry<K, A>, Map.Entry<K, E>)
- Section
- Exception handling - Search tag in com.google.common.truth.Correspondence.compare(Number, Number)
- Section
- ExceptionStore(String) - Constructor for class com.google.common.truth.Correspondence.ExceptionStore
- Expect - Class in com.google.common.truth
-
A
TestRule
that batches up all failures encountered during a test, and reports them all together at the end (similar toErrorCollector
). - Expect(Expect.ExpectationGatherer) - Constructor for class com.google.common.truth.Expect
- EXPECT_FAILURE_WARNING_IF_GWT - Static variable in class com.google.common.truth.Platform
- Expect.ExpectationGatherer - Class in com.google.common.truth
- Expect.TestPhase - Enum Class in com.google.common.truth
- ExpectationGatherer() - Constructor for class com.google.common.truth.Expect.ExpectationGatherer
- expected - Variable in class com.google.common.truth.MapSubject.ValueDifference
- expectedKey(E, Correspondence.ExceptionStore) - Method in class com.google.common.truth.IterableSubject.UsingCorrespondence.Pairer
- expectedKeyFunction - Variable in class com.google.common.truth.IterableSubject.UsingCorrespondence.Pairer
- expectedMap - Variable in class com.google.common.truth.MapSubject.MapInOrder
- expectedMultimap - Variable in class com.google.common.truth.MultimapSubject.MultimapInOrder
- expectedTransform - Variable in class com.google.common.truth.Correspondence.Transforming
- expectFailure(ExpectFailure.StandardSubjectBuilderCallback) - Static method in class com.google.common.truth.ExpectFailure
-
Static alternative that directly returns the triggered failure.
- ExpectFailure - Class in com.google.common.truth
-
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. - ExpectFailure() - Constructor for class com.google.common.truth.ExpectFailure
-
Creates a new instance for use as a
@Rule
. - ExpectFailure.SimpleSubjectBuilderCallback<S,
A> - Interface in com.google.common.truth -
A "functional interface" for
expectFailureAbout()
to invoke and capture failures. - ExpectFailure.StandardSubjectBuilderCallback - Interface in com.google.common.truth
-
A "functional interface" for
expectFailure()
to invoke and capture failures. - expectFailureAbout(Subject.Factory<S, A>, ExpectFailure.SimpleSubjectBuilderCallback<S, A>) - Static method in class com.google.common.truth.ExpectFailure
-
Static alternative that directly returns the triggered failure.
F
- fact(String, Object) - Static method in class com.google.common.truth.Fact
-
Creates a fact with the given key and value, which will be printed in a format like "key: value." The value is converted to a string by calling
String.valueOf
on it. - Fact - Class in com.google.common.truth
-
A string key-value pair in a failure message, such as "expected: abc" or "but was: xyz."
- Fact(String, String) - Constructor for class com.google.common.truth.Fact
- FACT_PER_ELEMENT - Enum constant in enum class com.google.common.truth.IterableSubject.ElementFactGrouping
- factKeys() - Method in class com.google.common.truth.TruthFailureSubject
-
Returns a subject for the list of fact keys.
- FACTORY - Static variable in class com.google.common.truth.TruthFailureSubject
- facts - Variable in exception class com.google.common.truth.AssertionErrorWithFacts
- facts - Variable in exception class com.google.common.truth.ComparisonFailureWithFacts
- facts - Variable in class com.google.common.truth.Facts
- facts - Variable in class com.google.common.truth.Subject.ComparisonResult
- facts() - Method in exception class com.google.common.truth.AssertionErrorWithFacts
- facts() - Method in exception class com.google.common.truth.ComparisonFailureWithFacts
- facts() - Method in interface com.google.common.truth.ErrorWithFacts
- facts(Fact...) - Static method in class com.google.common.truth.Facts
-
Returns an instance wrapping the given facts.
- facts(Iterable<Fact>) - Static method in class com.google.common.truth.Facts
-
Returns an instance wrapping the given facts.
- Facts - Class in com.google.common.truth
-
Helper class that wraps a collection of
Fact
instances to make them easier to build. - Facts(Iterable<Fact>) - Constructor for class com.google.common.truth.Facts
- factsOrEmpty() - Method in class com.google.common.truth.Subject.ComparisonResult
- factsWithName(ErrorWithFacts, String) - Static method in class com.google.common.truth.TruthFailureSubject
- factValue(String) - Method in class com.google.common.truth.TruthFailureSubject
-
Returns a subject for the value with the given name.
- factValue(String, int) - Method in class com.google.common.truth.TruthFailureSubject
-
Returns a subject for the value of the
index
-th instance of the fact with the given name. - fail() - Method in class com.google.common.truth.StandardSubjectBuilder
-
Reports a failure.
- fail(ImmutableList<Fact>) - Method in class com.google.common.truth.FailureMetadata
- fail(AssertionError) - Method in class com.google.common.truth.Expect.ExpectationGatherer
- fail(AssertionError) - Method in interface com.google.common.truth.FailureStrategy
-
Handles a failure.
- fail(String) - Method in class com.google.common.truth.Subject
-
Deprecated.Prefer to construct
Fact
-style methods, typically by usingfailWithActual
(
simpleFact(...)
)
. However, if you want to preserve your exact failure message as a migration aid, you can inline this method (and then inline the resulting method call, as well). - fail(String, Object) - Method in class com.google.common.truth.Subject
-
Deprecated.Prefer to construct
Fact
-style methods, typically by usingSubject.failWithActual(String, Object)
. However, if you want to preserve your exact failure message as a migration aid, you can inline this method (and then inline the resulting method call, as well). - fail(String, Object...) - Method in class com.google.common.truth.Subject
-
Deprecated.Prefer to construct
Fact
-style methods, typically by usingSubject.failWithActual(Fact, Fact...)
. However, if you want to preserve your exact failure message as a migration aid, you can inline this method. - failAtLeast(Collection<?>, Collection<?>) - Method in class com.google.common.truth.IterableSubject
- failEqualityCheck(ImmutableList<Fact>, ImmutableList<Fact>, String, String) - Method in class com.google.common.truth.FailureMetadata
- failEqualityCheck(Subject.EqualityCheck, Object, Subject.ComparisonResult) - Method in class com.google.common.truth.Subject
- failEqualityCheckForEqualsWithoutDescription(Object) - Method in class com.google.common.truth.Subject
-
Special version of
Subject.failEqualityCheck(com.google.common.truth.Subject.EqualityCheck, java.lang.Object, com.google.common.truth.Subject.ComparisonResult)
for use fromIterableSubject
, documented further there. - failEqualityCheckNoComparisonFailure(Subject.ComparisonResult, Fact...) - Method in class com.google.common.truth.Subject
- failExactly(Iterable<?>, boolean, Collection<?>, Collection<?>) - Method in class com.google.common.truth.IterableSubject
- failIfCandidateMappingHasMissing(List<? extends A>, List<? extends E>, ImmutableSetMultimap<Integer, Integer>, Correspondence.ExceptionStore) - Method in class com.google.common.truth.IterableSubject.UsingCorrespondence
-
Given a list of actual elements, a list of expected elements, and a many:many mapping between actual and expected elements specified as a multimap of indexes into an actual list to indexes into the expected list, checks that every expected element maps to at least one actual element, and fails if this is not the case.
- failIfCandidateMappingHasMissingOrExtra(List<? extends A>, List<? extends E>, ImmutableSetMultimap<Integer, Integer>, Correspondence.ExceptionStore) - Method in class com.google.common.truth.IterableSubject.UsingCorrespondence
-
Given a list of actual elements, a list of expected elements, and a many:many mapping between actual and expected elements specified as a multimap of indexes into the actual list to indexes into the expected list, checks that every actual element maps to at least one expected element and vice versa, and fails if this is not the case.
- failIfOneToOneMappingHasMissing(List<? extends A>, List<? extends E>, BiMap<Integer, Integer>, Correspondence.ExceptionStore) - Method in class com.google.common.truth.IterableSubject.UsingCorrespondence
-
Given a list of expected elements, and a 1:1 mapping between actual and expected elements specified as a bimap of indexes into an actual list to indexes into the expected list, checks that every expected element maps to an actual element.
- failIfOneToOneMappingHasMissingOrExtra(List<? extends A>, List<? extends E>, BiMap<Integer, Integer>, Correspondence.ExceptionStore) - Method in class com.google.common.truth.IterableSubject.UsingCorrespondence
-
Given a list of actual elements, a list of expected elements, and a 1:1 mapping between actual and expected elements specified as a bimap of indexes into the actual list to indexes into the expected list, checks that every actual element maps to an expected element and vice versa, and fails if this is not the case.
- failure - Variable in class com.google.common.truth.ExpectFailure
- failureExpected - Variable in class com.google.common.truth.ExpectFailure
- FailureMetadata - Class in com.google.common.truth
-
An opaque, immutable object containing state from the previous calls in the fluent assertion chain.
- FailureMetadata(FailureStrategy, ImmutableList<LazyMessage>, ImmutableList<FailureMetadata.Step>) - Constructor for class com.google.common.truth.FailureMetadata
- FailureMetadata.OldAndNewValuesAreSimilar - Enum Class in com.google.common.truth
-
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.
- FailureMetadata.Step - Class in com.google.common.truth
-
The data from a call to either (a) a
Subject
constructor or (b)Subject.check()
. - failures - Variable in class com.google.common.truth.Expect.ExpectationGatherer
- FailureStrategy - Interface in com.google.common.truth
-
Defines what to do when a check fails.
- failVerb - Variable in class com.google.common.truth.MapSubject.MapInOrder
- failWithActual(Fact, Fact...) - Method in class com.google.common.truth.Subject
-
Fails, reporting a message with the given facts, followed by an automatically added fact of the form: but was: actual value.
- failWithActual(Facts) - Method in class com.google.common.truth.Subject
- failWithActual(Iterable<Fact>) - Method in class com.google.common.truth.Subject
- failWithActual(String, Object) - Method in class com.google.common.truth.Subject
-
Fails, reporting a message with two "facts": key: value but was: actual value.
- failWithBadResults(String, Object, String, Object) - Method in class com.google.common.truth.Subject
-
Deprecated.Prefer to construct
Fact
-style methods, typically by usingSubject.failWithActual(Fact, Fact...)
. However, if you want to preserve your exact failure message as a migration aid, you can inline this method. - failWithCustomSubject(String, Object, Object) - Method in class com.google.common.truth.Subject
-
Deprecated.Prefer to construct
Fact
-style methods, typically by usingSubject.failWithoutActual(Fact, Fact...)
. However, if you want to preserve your exact failure message as a migration aid, you can inline this method. - failWithoutActual(Fact, Fact...) - Method in class com.google.common.truth.Subject
-
Fails, reporting a message with the given facts, without automatically adding the actual value.
- failWithoutActual(Facts) - Method in class com.google.common.truth.Subject
- failWithoutActual(Iterable<Fact>) - Method in class com.google.common.truth.Subject
- failWithoutActual(String) - Method in class com.google.common.truth.Subject
-
Deprecated.Prefer to construct
Fact
-style methods, typically by usingfailWithoutActual
(
simpleFact(...)
)
. However, if you want to preserve your exact failure message as a migration aid, you can inline this method (and then inline the resulting method call, as well). - failWithoutSubject(String) - Method in class com.google.common.truth.Subject
-
Deprecated.Prefer to construct
Fact
-style methods, typically by usingfailWithoutActual
(
simpleFact(...)
)
. However, if you want to preserve your exact failure message as a migration aid, you can inline this method. - findCandidateMapping(List<? extends A>, List<? extends E>, Correspondence.ExceptionStore) - Method in class com.google.common.truth.IterableSubject.UsingCorrespondence
-
Given a list of actual elements and a list of expected elements, finds a many:many mapping between actual and expected elements where a pair of elements maps if it satisfies the correspondence.
- findCorresponding(Iterator<? extends A>, E, Correspondence.ExceptionStore) - Method in class com.google.common.truth.IterableSubject.UsingCorrespondence
-
Advances the actual iterator looking for an element which corresponds to the expected element.
- findMaximalOneToOneMapping(ImmutableMultimap<Integer, Integer>) - Method in class com.google.common.truth.IterableSubject.UsingCorrespondence
-
Given a many:many mapping between actual elements and expected elements, finds a 1:1 mapping which is the subset of that many:many mapping which includes the largest possible number of elements.
- findNotIndexed(List<T>, Set<Integer>) - Method in class com.google.common.truth.IterableSubject.UsingCorrespondence
-
Returns all the elements of the given list other than those with the given indexes.
- firstCompareException - Variable in class com.google.common.truth.Correspondence.ExceptionStore
- firstFormatDiffException - Variable in class com.google.common.truth.Correspondence.ExceptionStore
- firstPairingException - Variable in class com.google.common.truth.Correspondence.ExceptionStore
- FLOAT - Static variable in class com.google.common.truth.ActualValueInference.InferredType
- FloatArrayAsIterable(Correspondence<? super Float, Number>, IterableSubject) - Constructor for class com.google.common.truth.PrimitiveFloatArraySubject.FloatArrayAsIterable
- floatArrayAsString(float[]) - Static method in class com.google.common.truth.Subject
- FloatSubject - Class in com.google.common.truth
-
Propositions for
Float
subjects. - FloatSubject(FailureMetadata, Float) - Constructor for class com.google.common.truth.FloatSubject
- FloatSubject.TolerantFloatComparison - Class in com.google.common.truth
-
A partially specified check about an approximate relationship to a
float
subject using a tolerance. - floatToString(float) - Static method in class com.google.common.truth.Platform
- forClassName(String) - Static method in enum class com.google.common.truth.StackTraceCleaner.StackFrameType
-
Helper method to determine the frame type from the fully qualified class name.
- forCustomFailureStrategy(FailureStrategy) - Static method in class com.google.common.truth.StandardSubjectBuilder
-
Returns a new instance that invokes the given
FailureStrategy
when a check fails. - forFailureStrategy(FailureStrategy) - Static method in class com.google.common.truth.FailureMetadata
- forIterable() - Static method in class com.google.common.truth.Correspondence.ExceptionStore
- forMapValues() - Static method in class com.google.common.truth.Correspondence.ExceptionStore
- format - Variable in class com.google.common.truth.LazyMessage
- formatActualOrExpected(Object) - Method in class com.google.common.truth.Subject
- formatDiff(A, E) - Method in interface com.google.common.truth.Correspondence.DiffFormatter
-
Returns a
String
describing the difference between theactual
andexpected
values, if possible, ornull
if not. - formatDiff(A, E) - Method in class com.google.common.truth.Correspondence
-
Returns a
String
describing the difference between theactual
andexpected
values, if possible, ornull
if not. - formatDiff(A, E) - Method in class com.google.common.truth.Correspondence.FormattingDiffs
- formatExpectedAndActual(String, String) - Static method in exception class com.google.common.truth.ComparisonFailureWithFacts
-
Returns one or more facts describing the difference between the given expected and actual values.
- formatExtras(String, E, List<? extends A>, Correspondence.ExceptionStore) - Method in class com.google.common.truth.IterableSubject.UsingCorrespondence
- formatExtrasInline(E, List<? extends A>, Correspondence.ExceptionStore) - Method in class com.google.common.truth.IterableSubject.UsingCorrespondence
- formatMissing(List<?>) - Method in class com.google.common.truth.IterableSubject.UsingCorrespondence
-
Returns a description of the missing items suitable for inclusion in failure messages.
- formatter - Variable in class com.google.common.truth.Correspondence.FormattingDiffs
- FormattingDiffs(Correspondence<A, E>, Correspondence.DiffFormatter<? super A, ? super E>) - Constructor for class com.google.common.truth.Correspondence.FormattingDiffs
- formattingDiffsUsing(Correspondence.DiffFormatter<? super A, ? super E>) - Method in class com.google.common.truth.Correspondence
-
Returns a new correspondence which is like this one, except that the given formatter may be used to format the difference between a pair of elements that do not correspond.
- For people extending Truth - Search tag in class com.google.common.truth.CustomSubjectBuilder
- Section
- For people extending Truth - Search tag in class com.google.common.truth.SimpleSubjectBuilder
- Section
- For people extending Truth - Search tag in class com.google.common.truth.StandardSubjectBuilder
- Section
- For people extending Truth - Search tag in class com.google.common.truth.Subject
- Section
- For people extending Truth - Search tag in class com.google.common.truth.Truth
- Section
- For people extending Truth - Search tag in interface com.google.common.truth.CustomSubjectBuilder.Factory
- Section
- For people extending Truth - Search tag in interface com.google.common.truth.FailureStrategy
- Section
- For people extending Truth - Search tag in interface com.google.common.truth.Subject.Factory
- Section
- FrameInfo() - Constructor for class com.google.common.truth.ActualValueInference.FrameInfo
- from(Correspondence.BinaryPredicate<A, E>, String) - Static method in class com.google.common.truth.Correspondence
-
Constructs a
Correspondence
that compares actual and expected elements using the given binary predicate. - FromBinaryPredicate(Correspondence.BinaryPredicate<A, E>, String) - Constructor for class com.google.common.truth.Correspondence.FromBinaryPredicate
- fromEqualsResult(boolean) - Static method in class com.google.common.truth.Subject.ComparisonResult
-
If
equal
is true, returns an equal result; if false, a non-equal result with no description. - fullContents() - Method in class com.google.common.truth.IterableSubject
G
- gatherer - Variable in class com.google.common.truth.Expect
- get(Multimap<?, V>, Object) - Static method in class com.google.common.truth.MultimapSubject
- getCastActual() - Method in class com.google.common.truth.IterableSubject.UsingCorrespondence
- getCastActual() - Method in class com.google.common.truth.MultimapSubject.UsingCorrespondence
- getCastSubject() - Method in class com.google.common.truth.MapSubject.UsingCorrespondence
- getCause() - Method in exception class com.google.common.truth.AssertionErrorWithFacts
- getCause() - Method in exception class com.google.common.truth.Truth.SimpleAssertionError
- getElementTypeIfArrayOrThrow() - Method in class com.google.common.truth.ActualValueInference.InferredType
-
If the type is an array, return the element type.
- getFactKeys(ErrorWithFacts) - Static method in class com.google.common.truth.TruthFailureSubject
- getFailure() - Method in class com.google.common.truth.ExpectFailure
-
Returns the captured failure, if one occurred.
- getHomogeneousTypeName(Iterable<?>) - Static method in class com.google.common.truth.SubjectUtils
-
Returns the name of the single type of all given items or
Optional.absent()
if no such type exists. - getLocalVariable(int) - Method in class com.google.common.truth.ActualValueInference.InferenceMethodVisitor
- getMaximumFractionDigits() - Method in class com.google.common.truth.Platform.JavaLikeOptions
- getMaximumFractionDigits() - Method in interface com.google.common.truth.Platform.ToLocaleStringOptions
- getMinimumFractionDigits() - Method in class com.google.common.truth.Platform.JavaLikeOptions
- getMinimumFractionDigits() - Method in interface com.google.common.truth.Platform.ToLocaleStringOptions
- getName() - Method in enum class com.google.common.truth.StackTraceCleaner.StackFrameType
-
Returns the name of this frame type to display in the cleaned trace
- getOperandFromTop(int) - Method in class com.google.common.truth.ActualValueInference.InferenceMethodVisitor
-
Returns the entry for the operand at the specified offset.
- getStackFrameType() - Method in class com.google.common.truth.StackTraceCleaner.StackTraceElementWrapper
-
Returns the type of this frame.
- getStackTraceAsString(Throwable) - Static method in class com.google.common.truth.Platform
-
Returns a human readable string representation of the throwable's stack trace.
- getStackTraceElement() - Method in class com.google.common.truth.StackTraceCleaner.StackTraceElementWrapper
-
Returns the wrapped
StackTraceElement
. - getSuppressed(Throwable) - Static method in class com.google.common.truth.Platform
-
Returns an array containing all of the exceptions that were suppressed to deliver the given exception.
- getUseGrouping() - Method in class com.google.common.truth.Platform.JavaLikeOptions
- getUseGrouping() - Method in interface com.google.common.truth.Platform.ToLocaleStringOptions
- graph - Variable in class com.google.common.truth.GraphMatching.HopcroftKarp
- GraphMatching - Class in com.google.common.truth
-
Helper routines related to graph matchings.
- GraphMatching() - Constructor for class com.google.common.truth.GraphMatching
- GraphMatching.HopcroftKarp<U,
V> - Class in com.google.common.truth -
Helper which implements the Hopcroft–Karp algorithm.
- GuavaOptionalSubject - Class in com.google.common.truth
-
Propositions for Guava
Optional
subjects. - GuavaOptionalSubject(FailureMetadata, Optional<?>, String) - Constructor for class com.google.common.truth.GuavaOptionalSubject
- gwtSafeObjectEquals(Object, Object) - Static method in class com.google.common.truth.Subject
H
- hasCauseThat() - Method in class com.google.common.truth.ThrowableSubject
-
Returns a new
ThrowableSubject
that supports assertions on this throwable's direct cause. - hasCompareException() - Method in class com.google.common.truth.Correspondence.ExceptionStore
-
Returns whether any exceptions thrown during
compare
calls were stored. - hasCount(Object, int) - Method in class com.google.common.truth.MultisetSubject
-
Fails if the element does not have the given count.
- hasFailures() - Method in class com.google.common.truth.Expect.ExpectationGatherer
- hasFailures() - Method in class com.google.common.truth.Expect
- hashCode() - Method in class com.google.common.truth.AutoValue_ActualValueInference_DescribedEntry
- hashCode() - Method in class com.google.common.truth.AutoValue_ActualValueInference_FrameInfo
- hashCode() - Method in class com.google.common.truth.AutoValue_ActualValueInference_InferredType
- hashCode() - Method in class com.google.common.truth.AutoValue_ActualValueInference_Invocation
- hashCode() - Method in class com.google.common.truth.AutoValue_ActualValueInference_OpaqueEntry
- hashCode() - Method in class com.google.common.truth.AutoValue_ActualValueInference_SubjectEntry
- hashCode() - Method in class com.google.common.truth.Correspondence
-
Deprecated.
Object.hashCode()
is not supported. - hashCode() - Method in class com.google.common.truth.DoubleSubject.TolerantDoubleComparison
-
Deprecated.
Object.hashCode()
is not supported on TolerantDoubleComparison - hashCode() - Method in class com.google.common.truth.FloatSubject.TolerantFloatComparison
-
Deprecated.
Object.hashCode()
is not supported on TolerantFloatComparison - hashCode() - Method in class com.google.common.truth.MapSubject.TypedToStringWrapper
- hashCode() - Method in class com.google.common.truth.Subject
-
Deprecated.
Object.hashCode()
is not supported on Truth subjects. - hasLength(int) - Method in class com.google.common.truth.AbstractArraySubject
-
Fails if the array does not have the given length.
- hasLength(int) - Method in class com.google.common.truth.StringSubject
-
Fails if the string does not have the given length.
- hasMatchingToStringPair(Iterable<?>, Iterable<?>) - Static method in class com.google.common.truth.SubjectUtils
-
Returns true if there is a pair of an item from
items1
and one initems2
that has the sametoString()
value without being equal. - hasMessageThat() - Method in class com.google.common.truth.ThrowableSubject
-
Returns a
StringSubject
to make assertions about the throwable's message. - hasMultiple(Iterable<Multiset.Entry<?>>) - Static method in class com.google.common.truth.IterableSubject
- hasSize(int) - Method in class com.google.common.truth.IntStreamSubject
-
Fails if the subject does not have the given size.
- hasSize(int) - Method in class com.google.common.truth.IterableSubject
-
Fails if the subject does not have the given size.
- hasSize(int) - Method in class com.google.common.truth.LongStreamSubject
-
Fails if the subject does not have the given size.
- hasSize(int) - Method in class com.google.common.truth.MapSubject
-
Fails if the map does not have the given size.
- hasSize(int) - Method in class com.google.common.truth.MultimapSubject
-
Fails if the multimap does not have the given size.
- hasSize(int) - Method in class com.google.common.truth.StreamSubject
-
Fails if the subject does not have the given size.
- hasSize(int) - Method in class com.google.common.truth.TableSubject
-
Fails if the table does not have the given size.
- hasValue(double) - Method in class com.google.common.truth.OptionalDoubleSubject
-
Fails if the
OptionalDouble
does not have the given value or the subject is null. - hasValue(int) - Method in class com.google.common.truth.OptionalIntSubject
-
Fails if the
OptionalInt
does not have the given value or the subject is null. - hasValue(long) - Method in class com.google.common.truth.OptionalLongSubject
-
Fails if the
OptionalLong
does not have the given value or the subject is null. - hasValue(Object) - Method in class com.google.common.truth.GuavaOptionalSubject
-
Fails if the
Optional
<T>
does not have the given value or the subject is null. - hasValue(Object) - Method in class com.google.common.truth.OptionalSubject
-
Fails if the
Optional
<T>
does not have the given value or the subject is null. - HEX_DIGITS - Static variable in class com.google.common.truth.Subject
- hexDigits - Static variable in class com.google.common.truth.Subject
- homogeneousTypeToDisplay - Variable in class com.google.common.truth.SubjectUtils.DuplicateGroupedAndTyped
- HopcroftKarp(Multimap<U, V>) - Constructor for class com.google.common.truth.GraphMatching.HopcroftKarp
- HOW_TO_TEST_KEYS_WITHOUT_VALUES - Static variable in class com.google.common.truth.TruthFailureSubject
- HUMAN_UNDERSTANDABLE_EMPTY_STRING - Static variable in class com.google.common.truth.SubjectUtils
I
- IGNORE_STRATEGY - Static variable in class com.google.common.truth.Subject
- ignoreCheck() - Method in class com.google.common.truth.Subject
-
Begins a new call chain that ignores any failures.
- ignoringCase() - Method in class com.google.common.truth.StringSubject
-
Returns a
StringSubject
-like instance that will ignore the case of the characters. - IN_ORDER - Static variable in class com.google.common.truth.IterableSubject
-
Ordered implementation that does nothing because it's already known to be true.
- IN_ORDER - Static variable in class com.google.common.truth.MapSubject
-
Ordered implementation that does nothing because it's already known to be true.
- includeKeyTypes() - Method in class com.google.common.truth.MapSubject.MapDifference
- indent(String) - Static method in class com.google.common.truth.Fact
- inferDescription() - Static method in class com.google.common.truth.Platform
- InferenceClassVisitor(String) - Constructor for class com.google.common.truth.ActualValueInference.InferenceClassVisitor
- InferenceMethodVisitor(int, String, String, String, ImmutableSetMultimap.Builder<Integer, ActualValueInference.StackEntry>) - Constructor for class com.google.common.truth.ActualValueInference.InferenceMethodVisitor
- InferredType() - Constructor for class com.google.common.truth.ActualValueInference.InferredType
- inOrder() - Method in class com.google.common.truth.MapSubject.MapInOrder
-
Checks whether the common elements between actual and expected are in the same order.
- inOrder() - Method in class com.google.common.truth.MultimapSubject.MultimapInOrder
-
Checks whether entries in expected appear in the same order in actual.
- inOrder() - Method in interface com.google.common.truth.Ordered
-
An additional assertion, implemented by some containment subjects which allows for a further constraint of orderedness.
- inRuleContext - Variable in class com.google.common.truth.Expect.ExpectationGatherer
- inRuleContext - Variable in class com.google.common.truth.ExpectFailure
- INSTANCE - Static variable in class com.google.common.truth.Platform.JavaLikeOptions
- INT - Static variable in class com.google.common.truth.ActualValueInference.InferredType
- IntegerSubject - Class in com.google.common.truth
-
Propositions for
Integer
subjects. - IntegerSubject(FailureMetadata, Integer) - Constructor for class com.google.common.truth.IntegerSubject
-
Constructor for use by subclasses.
- integralValue(Object) - Static method in class com.google.common.truth.Subject
- internalContainsAtLeastEntriesIn(Multimap<K, V>) - Method in class com.google.common.truth.MultimapSubject.UsingCorrespondence
- internalContainsEntriesIn(String, Map<K, V>, boolean) - Method in class com.google.common.truth.MapSubject.UsingCorrespondence
- internalContainsExactlyEntriesIn(Multimap<K, V>) - Method in class com.google.common.truth.MultimapSubject.UsingCorrespondence
- intStreams() - Static method in class com.google.common.truth.IntStreamSubject
- IntStreamSubject - Class in com.google.common.truth
-
Propositions for
IntStream
subjects. - IntStreamSubject(FailureMetadata, IntStream) - Constructor for class com.google.common.truth.IntStreamSubject
- Invocation() - Constructor for class com.google.common.truth.ActualValueInference.Invocation
- invokeAssertion(SimpleSubjectBuilder<S, A>) - Method in interface com.google.common.truth.ExpectFailure.SimpleSubjectBuilderCallback
- invokeAssertion(StandardSubjectBuilder) - Method in interface com.google.common.truth.ExpectFailure.StandardSubjectBuilderCallback
- isAbsent() - Method in class com.google.common.truth.GuavaOptionalSubject
-
Fails if the
Optional
<T>
is present or the subject is null. - isAndroid() - Static method in class com.google.common.truth.Platform
-
Tests if current platform is Android which is always false.
- isAnyOf(Object, Object, Object...) - Method in class com.google.common.truth.Subject
-
Fails unless the subject is equal to any of the given elements.
- isAssignableTo(Class<?>) - Method in class com.google.common.truth.ClassSubject
-
Fails if this class or interface is not the same as or a subclass or subinterface of, the given class or interface.
- isAtLeast(int) - Method in class com.google.common.truth.DoubleSubject
-
Checks that the subject is greater than or equal to
other
. - isAtLeast(int) - Method in class com.google.common.truth.FloatSubject
-
Checks that the subject is greater than or equal to
other
. - isAtLeast(int) - Method in class com.google.common.truth.LongSubject
-
Checks that the subject is greater than or equal to
other
. - isAtLeast(T) - Method in class com.google.common.truth.ComparableSubject
-
Checks that the subject is greater than or equal to
other
. - isAtMost(int) - Method in class com.google.common.truth.DoubleSubject
-
Checks that the subject is less than or equal to
other
. - isAtMost(int) - Method in class com.google.common.truth.FloatSubject
-
Checks that the subject is less than or equal to
other
. - isAtMost(int) - Method in class com.google.common.truth.LongSubject
-
Checks that the subject is less than or equal to
other
. - isAtMost(T) - Method in class com.google.common.truth.ComparableSubject
-
Checks that the subject is less than or equal to
other
. - isBoxing(String, String, String) - Static method in class com.google.common.truth.ActualValueInference
- isCategory2() - Method in class com.google.common.truth.ActualValueInference.InferredType
-
Is a category 2 value?
- isCheckCall() - Method in class com.google.common.truth.FailureMetadata.Step
- isEmpty() - Method in class com.google.common.truth.AbstractArraySubject
-
Fails if the array is not empty (i.e.
- isEmpty() - Method in class com.google.common.truth.IntStreamSubject
-
Fails if the subject is not empty.
- isEmpty() - Method in class com.google.common.truth.IterableSubject
-
Fails if the subject is not empty.
- isEmpty() - Method in class com.google.common.truth.LongStreamSubject
-
Fails if the subject is not empty.
- isEmpty() - Method in class com.google.common.truth.MapSubject
-
Fails if the map is not empty.
- isEmpty() - Method in class com.google.common.truth.MapSubject.MapDifference
- isEmpty() - Method in class com.google.common.truth.MultimapSubject
-
Fails if the multimap is not empty.
- isEmpty() - Method in class com.google.common.truth.OptionalDoubleSubject
-
Fails if the
OptionalDouble
is present or the subject is null. - isEmpty() - Method in class com.google.common.truth.OptionalIntSubject
-
Fails if the
OptionalInt
is present or the subject is null. - isEmpty() - Method in class com.google.common.truth.OptionalLongSubject
-
Fails if the
OptionalLong
is present or the subject is null. - isEmpty() - Method in class com.google.common.truth.OptionalSubject
-
Fails if the
Optional
<T>
is present or the subject is null. - isEmpty() - Method in class com.google.common.truth.StreamSubject
-
Fails if the subject is not empty.
- isEmpty() - Method in class com.google.common.truth.StringSubject
-
Fails if the string is not equal to the zero-length "empty string."
- isEmpty() - Method in class com.google.common.truth.SubjectUtils.DuplicateGroupedAndTyped
- isEmpty() - Method in class com.google.common.truth.SubjectUtils.NonHashingMultiset
- isEmpty() - Method in class com.google.common.truth.TableSubject
-
Fails if the table is not empty.
- isEqualTo(Object) - Method in class com.google.common.truth.BigDecimalSubject
-
Fails if the subject's value and scale is not equal to the given
BigDecimal
. - isEqualTo(Object) - Method in class com.google.common.truth.DoubleSubject
-
Asserts that the subject is exactly equal to the given value, with equality defined as by
Double#equals
. - isEqualTo(Object) - Method in class com.google.common.truth.FloatSubject
-
Asserts that the subject is exactly equal to the given value, with equality defined as by
Float#equals
. - isEqualTo(Object) - Method in class com.google.common.truth.IterableSubject
- isEqualTo(Object) - Method in class com.google.common.truth.MapSubject
- isEqualTo(Object) - Method in class com.google.common.truth.MultimapSubject
- isEqualTo(Object) - Method in class com.google.common.truth.PrimitiveDoubleArraySubject
-
A check that the actual array and
expected
are arrays of the same length and type, containing elements such that each element inexpected
is equal to each element in the actual array, and in the same position, with element equality defined the same way thatArrays.equals(double[], double[])
andDouble.equals(Object)
define it (which is different to the way that the==
operator on primitivedouble
defines it). - isEqualTo(Object) - Method in class com.google.common.truth.PrimitiveFloatArraySubject
-
A check that the actual array and
expected
are arrays of the same length and type, containing elements such that each element inexpected
is equal to each element in the actual array, and in the same position, with element equality defined the same way thatArrays.equals(float[], float[])
andFloat.equals(Object)
define it (which is different to the way that the==
operator on primitivefloat
defines it). - isEqualTo(Object) - Method in class com.google.common.truth.Subject
-
Fails if the subject is not equal to the given object.
- isEqualTo(String) - Method in class com.google.common.truth.StringSubject.CaseInsensitiveStringComparison
-
Fails if the subject is not equal to the given sequence (while ignoring case).
- isEqualToIgnoringScale(long) - Method in class com.google.common.truth.BigDecimalSubject
-
Fails if the subject's value is not equal to the value of the
BigDecimal
created from the expectedlong
(i.e., fails ifactual.comparesTo(new BigDecimal(expected)) != 0
). - isEqualToIgnoringScale(String) - Method in class com.google.common.truth.BigDecimalSubject
-
Fails if the subject's value is not equal to the value of the
BigDecimal
created from the expected string (i.e., fails ifactual.comparesTo(new BigDecimal(expected)) != 0
). - isEqualToIgnoringScale(BigDecimal) - Method in class com.google.common.truth.BigDecimalSubject
-
Fails if the subject's value is not equal to the value of the given
BigDecimal
. - isEquivalentAccordingToCompareTo(Double) - Method in class com.google.common.truth.DoubleSubject
-
Deprecated.Use
DoubleSubject.isWithin(double)
orDoubleSubject.isEqualTo(java.lang.Object)
instead (see documentation for advice). - isEquivalentAccordingToCompareTo(Float) - Method in class com.google.common.truth.FloatSubject
-
Deprecated.Use
FloatSubject.isWithin(float)
orFloatSubject.isEqualTo(java.lang.Object)
instead (see documentation for advice). - isEquivalentAccordingToCompareTo(Integer) - Method in class com.google.common.truth.IntegerSubject
-
Deprecated.Use
Subject.isEqualTo(java.lang.Object)
instead. Integer comparison is consistent with equality. - isEquivalentAccordingToCompareTo(Long) - Method in class com.google.common.truth.LongSubject
-
Deprecated.Use
Subject.isEqualTo(java.lang.Object)
instead. Long comparison is consistent with equality. - isEquivalentAccordingToCompareTo(String) - Method in class com.google.common.truth.StringSubject
-
Deprecated.Use
Subject.isEqualTo(java.lang.Object)
instead. String comparison is consistent with equality. - isEquivalentAccordingToCompareTo(BigDecimal) - Method in class com.google.common.truth.BigDecimalSubject
-
Fails if the subject is not equivalent to the given value according to
Comparable.compareTo(T)
, (i.e., fails ifa.comparesTo(b) != 0
). - isEquivalentAccordingToCompareTo(T) - Method in class com.google.common.truth.ComparableSubject
-
Checks that the subject is equivalent to
other
according toComparable.compareTo(T)
, (i.e., checks thata.comparesTo(b) == 0
). - isFalse() - Method in class com.google.common.truth.BooleanSubject
-
Fails if the subject is true or
null
. - isFinite() - Method in class com.google.common.truth.DoubleSubject
-
Asserts that the subject is finite, i.e.
- isFinite() - Method in class com.google.common.truth.FloatSubject
-
Asserts that the subject is finite, i.e.
- isFromClassDirectly(StackTraceElement, ImmutableSet<Class<?>>) - Static method in class com.google.common.truth.StackTraceCleaner
- isFromClassOrClassNestedInside(StackTraceElement, ImmutableSet<Class<?>>) - Static method in class com.google.common.truth.StackTraceCleaner
- isGreaterThan(int) - Method in class com.google.common.truth.DoubleSubject
-
Checks that the subject is greater than
other
. - isGreaterThan(int) - Method in class com.google.common.truth.FloatSubject
-
Checks that the subject is greater than
other
. - isGreaterThan(int) - Method in class com.google.common.truth.LongSubject
-
Checks that the subject is greater than
other
. - isGreaterThan(T) - Method in class com.google.common.truth.ComparableSubject
-
Checks that the subject is greater than
other
. - isIn(Range<T>) - Method in class com.google.common.truth.ComparableSubject
-
Checks that the subject is in
range
. - isIn(Iterable<?>) - Method in class com.google.common.truth.Subject
-
Fails unless the subject is equal to any element in the given iterable.
- isInOrder() - Method in class com.google.common.truth.IntStreamSubject
-
Fails if the subject is not ordered, according to the natural ordering of its elements.
- isInOrder() - Method in class com.google.common.truth.IterableSubject
-
Fails if the iterable is not ordered, according to the natural ordering of its elements.
- isInOrder() - Method in class com.google.common.truth.LongStreamSubject
-
Fails if the subject is not ordered, according to the natural ordering of its elements.
- isInOrder() - Method in class com.google.common.truth.StreamSubject
-
Fails if the subject is not ordered, according to the natural ordering of its elements.
- isInOrder(Comparator<?>) - Method in class com.google.common.truth.IterableSubject
-
Fails if the iterable is not ordered, according to the given comparator.
- isInOrder(Comparator<?>) - Method in class com.google.common.truth.StreamSubject
-
Fails if the subject is not ordered, according to the given comparator.
- isInOrder(Comparator<? super Integer>) - Method in class com.google.common.truth.IntStreamSubject
-
Fails if the subject is not ordered, according to the given comparator.
- isInOrder(Comparator<? super Long>) - Method in class com.google.common.truth.LongStreamSubject
-
Fails if the subject is not ordered, according to the given comparator.
- isInstanceOf(Class<?>) - Method in class com.google.common.truth.Subject
-
Fails if the subject is not an instance of the given class.
- isInstanceOfType(Object, Class<?>) - Static method in class com.google.common.truth.Platform
-
Returns true if the instance is assignable to the type Clazz.
- isInStrictOrder() - Method in class com.google.common.truth.IntStreamSubject
-
Fails if the subject is not strictly ordered, according to the natural ordering of its elements.
- isInStrictOrder() - Method in class com.google.common.truth.IterableSubject
-
Fails if the iterable is not strictly ordered, according to the natural ordering of its elements.
- isInStrictOrder() - Method in class com.google.common.truth.LongStreamSubject
-
Fails if the subject is not strictly ordered, according to the natural ordering of its elements.
- isInStrictOrder() - Method in class com.google.common.truth.StreamSubject
-
Fails if the subject is not strictly ordered, according to the natural ordering of its elements.
- isInStrictOrder(Comparator<?>) - Method in class com.google.common.truth.IterableSubject
-
Fails if the iterable is not strictly ordered, according to the given comparator.
- isInStrictOrder(Comparator<?>) - Method in class com.google.common.truth.StreamSubject
-
Fails if the subject is not strictly ordered, according to the given comparator.
- isInStrictOrder(Comparator<? super Integer>) - Method in class com.google.common.truth.IntStreamSubject
-
Fails if the subject is not strictly ordered, according to the given comparator.
- isInStrictOrder(Comparator<? super Long>) - Method in class com.google.common.truth.LongStreamSubject
-
Fails if the subject is not strictly ordered, according to the given comparator.
- isIntegralBoxedPrimitive(Object) - Static method in class com.google.common.truth.Subject
- isJUnitIntrastructure(StackTraceElement) - Static method in class com.google.common.truth.StackTraceCleaner
- isLessThan(int) - Method in class com.google.common.truth.DoubleSubject
-
Checks that the subject is less than
other
. - isLessThan(int) - Method in class com.google.common.truth.FloatSubject
-
Checks that the subject is less than
other
. - isLessThan(int) - Method in class com.google.common.truth.LongSubject
-
Checks that the subject is less than
other
. - isLessThan(T) - Method in class com.google.common.truth.ComparableSubject
-
Checks that the subject is less than
other
. - isNaN() - Method in class com.google.common.truth.DoubleSubject
-
Asserts that the subject is
Double.NaN
. - isNaN() - Method in class com.google.common.truth.FloatSubject
-
Asserts that the subject is
Float.NaN
. - isNegativeInfinity() - Method in class com.google.common.truth.DoubleSubject
-
Asserts that the subject is
Double.NEGATIVE_INFINITY
. - isNegativeInfinity() - Method in class com.google.common.truth.FloatSubject
-
Asserts that the subject is
Float.NEGATIVE_INFINITY
. - isNoneOf(Object, Object, Object...) - Method in class com.google.common.truth.IterableSubject
-
Deprecated.You probably meant to call
IterableSubject.containsNoneOf(java.lang.Object, java.lang.Object, java.lang.Object...)
instead. - isNoneOf(Object, Object, Object...) - Method in class com.google.common.truth.Subject
-
Fails if the subject is equal to any of the given elements.
- isNonZero() - Method in class com.google.common.truth.DoubleSubject
-
Asserts that the subject is a non-null value other than zero (i.e.
- isNonZero() - Method in class com.google.common.truth.FloatSubject
-
Asserts that the subject is a non-null value other than zero (i.e.
- isNotEmpty() - Method in class com.google.common.truth.AbstractArraySubject
-
Fails if the array is empty (i.e.
- isNotEmpty() - Method in class com.google.common.truth.IntStreamSubject
-
Fails if the subject is empty.
- isNotEmpty() - Method in class com.google.common.truth.IterableSubject
-
Fails if the subject is empty.
- isNotEmpty() - Method in class com.google.common.truth.LongStreamSubject
-
Fails if the subject is empty.
- isNotEmpty() - Method in class com.google.common.truth.MapSubject
-
Fails if the map is empty.
- isNotEmpty() - Method in class com.google.common.truth.MultimapSubject
-
Fails if the multimap is empty.
- isNotEmpty() - Method in class com.google.common.truth.StreamSubject
-
Fails if the subject is empty.
- isNotEmpty() - Method in class com.google.common.truth.StringSubject
-
Fails if the string is equal to the zero-length "empty string."
- isNotEmpty() - Method in class com.google.common.truth.TableSubject
-
Fails if the table is empty.
- isNotEqualTo(Object) - Method in class com.google.common.truth.DoubleSubject
-
Asserts that the subject is not exactly equal to the given value, with equality defined as by
Double#equals
. - isNotEqualTo(Object) - Method in class com.google.common.truth.FloatSubject
-
Asserts that the subject is not exactly equal to the given value, with equality defined as by
Float#equals
. - isNotEqualTo(Object) - Method in class com.google.common.truth.PrimitiveDoubleArraySubject
-
A check that the actual array and
expected
are not arrays of the same length and type, containing elements such that each element inexpected
is equal to each element in the actual array, and in the same position, with element equality defined the same way thatArrays.equals(double[], double[])
andDouble.equals(Object)
define it (which is different to the way that the==
operator on primitivedouble
defines it). - isNotEqualTo(Object) - Method in class com.google.common.truth.PrimitiveFloatArraySubject
-
A check that the actual array and
expected
are not arrays of the same length and type, containing elements such that each element inexpected
is equal to each element in the actual array, and in the same position, with element equality defined the same way thatArrays.equals(float[], float[])
andFloat.equals(Object)
define it (which is different to the way that the==
operator on primitivefloat
defines it). - isNotEqualTo(Object) - Method in class com.google.common.truth.Subject
-
Fails if the subject is equal to the given object.
- isNotEqualTo(String) - Method in class com.google.common.truth.StringSubject.CaseInsensitiveStringComparison
-
Fails if the subject is equal to the given string (while ignoring case).
- isNotIn(Range<T>) - Method in class com.google.common.truth.ComparableSubject
-
Checks that the subject is not in
range
. - isNotIn(Iterable<?>) - Method in class com.google.common.truth.IterableSubject
-
Deprecated.You probably meant to call
IterableSubject.containsNoneIn(java.lang.Iterable<?>)
instead. - isNotIn(Iterable<?>) - Method in class com.google.common.truth.Subject
-
Fails if the subject is equal to any element in the given iterable.
- isNotInstanceOf(Class<?>) - Method in class com.google.common.truth.Subject
-
Fails if the subject is an instance of the given class.
- isNotNaN() - Method in class com.google.common.truth.DoubleSubject
-
Asserts that the subject is a non-null value other than
Double.NaN
(but it may beDouble.POSITIVE_INFINITY
orDouble.NEGATIVE_INFINITY
). - isNotNaN() - Method in class com.google.common.truth.FloatSubject
-
Asserts that the subject is a non-null value other than
Float.NaN
(but it may beFloat.POSITIVE_INFINITY
orFloat.NEGATIVE_INFINITY
). - isNotNull() - Method in class com.google.common.truth.Subject
-
Fails if the subject is null.
- isNotSameInstanceAs(Object) - Method in class com.google.common.truth.Subject
-
Fails if the subject is the same instance as the given object.
- isNotWithin(double) - Method in class com.google.common.truth.DoubleSubject
-
Prepares for a check that the subject is a finite number not within the given tolerance of an expected value that will be provided in the next call in the fluent chain.
- isNotWithin(float) - Method in class com.google.common.truth.FloatSubject
-
Prepares for a check that the subject is a finite number not within the given tolerance of an expected value that will be provided in the next call in the fluent chain.
- isNull() - Method in class com.google.common.truth.Subject
-
Fails if the subject is not null.
- isOnSubjectInstance() - Method in class com.google.common.truth.ActualValueInference.Invocation
- isPositiveInfinity() - Method in class com.google.common.truth.DoubleSubject
-
Asserts that the subject is
Double.POSITIVE_INFINITY
. - isPositiveInfinity() - Method in class com.google.common.truth.FloatSubject
-
Asserts that the subject is
Float.POSITIVE_INFINITY
. - isPresent() - Method in class com.google.common.truth.GuavaOptionalSubject
-
Fails if the
Optional
<T>
is absent or the subject is null. - isPresent() - Method in class com.google.common.truth.OptionalDoubleSubject
-
Fails if the
OptionalDouble
is empty or the subject is null. - isPresent() - Method in class com.google.common.truth.OptionalIntSubject
-
Fails if the
OptionalInt
is empty or the subject is null. - isPresent() - Method in class com.google.common.truth.OptionalLongSubject
-
Fails if the
OptionalLong
is empty or the subject is null. - isPresent() - Method in class com.google.common.truth.OptionalSubject
-
Fails if the
Optional
<T>
is empty or the subject is null. - isSameInstanceAs(Object) - Method in class com.google.common.truth.Subject
-
Fails if the subject is not the same instance as the given object.
- isSet(int, int) - Static method in class com.google.common.truth.ActualValueInference
-
Returns
true
iff all bits inbitmask
are set inflags
. - isStackTraceCleaningDisabled() - Static method in class com.google.common.truth.StackTraceCleaner
-
Returns true if stack trace cleaning is explicitly disabled in a system property.
- isStatic(int) - Static method in class com.google.common.truth.ActualValueInference
- isSubject() - Method in class com.google.common.truth.ActualValueInference.StackEntry
- isSubject() - Method in class com.google.common.truth.ActualValueInference.SubjectEntry
- isThatOrAssertThat(String, String) - Static method in class com.google.common.truth.ActualValueInference
- isTrue() - Method in class com.google.common.truth.BooleanSubject
-
Fails if the subject is false or
null
. - isTruthEntrance(StackTraceElement) - Static method in class com.google.common.truth.StackTraceCleaner
- isUninitialized() - Method in class com.google.common.truth.ActualValueInference.InferredType
-
Is an uninitialized value?
- isWithin(double) - Method in class com.google.common.truth.DoubleSubject
-
Prepares for a check that the subject is a finite number within the given tolerance of an expected value that will be provided in the next call in the fluent chain.
- isWithin(float) - Method in class com.google.common.truth.FloatSubject
-
Prepares for a check that the subject is a finite number within the given tolerance of an expected value that will be provided in the next call in the fluent chain.
- isZero() - Method in class com.google.common.truth.DoubleSubject
-
Asserts that the subject is zero (i.e.
- isZero() - Method in class com.google.common.truth.FloatSubject
-
Asserts that the subject is zero (i.e.
- iterableEntries() - Method in class com.google.common.truth.MultimapSubject
- IterableEntries(FailureMetadata, MultimapSubject, Iterable<?>) - Constructor for class com.google.common.truth.MultimapSubject.IterableEntries
- iterableSubject() - Method in class com.google.common.truth.PrimitiveDoubleArraySubject
- iterableSubject() - Method in class com.google.common.truth.PrimitiveFloatArraySubject
- IterableSubject - Class in com.google.common.truth
-
Propositions for
Iterable
subjects. - IterableSubject(FailureMetadata, Iterable<?>) - Constructor for class com.google.common.truth.IterableSubject
-
Constructor for use by subclasses.
- IterableSubject.ElementFactGrouping - Enum Class in com.google.common.truth
-
Whether to output each missing/unexpected item as its own
Fact
or to group all those items together into a singleFact
. - IterableSubject.PairwiseChecker - Interface in com.google.common.truth
- IterableSubject.UsingCorrespondence<A,
E> - Class in com.google.common.truth -
A partially specified check in which the actual elements (normally the elements of the
Iterable
under test) are compared to expected elements using aCorrespondence
. - IterableSubject.UsingCorrespondence.Pairer - Class in com.google.common.truth
-
A class which knows how to pair the actual and expected elements (see
IterableSubject.UsingCorrespondence.displayingDiffsPairedBy(com.google.common.base.Function<? super E, ?>)
). - IterableSubject.UsingCorrespondence.Pairing - Class in com.google.common.truth
-
An description of a pairing between expected and actual values.
- IterableSubjectWithInheritedToString(FailureMetadata, Iterable<?>) - Constructor for class com.google.common.truth.PrimitiveDoubleArraySubject.IterableSubjectWithInheritedToString
- IterableSubjectWithInheritedToString(FailureMetadata, Iterable<?>) - Constructor for class com.google.common.truth.PrimitiveFloatArraySubject.IterableSubjectWithInheritedToString
- iterablesWithCustomDoubleToString() - Method in class com.google.common.truth.PrimitiveDoubleArraySubject
- iterablesWithCustomFloatToString() - Method in class com.google.common.truth.PrimitiveFloatArraySubject
- iterableToCollection(Iterable<T>) - Static method in class com.google.common.truth.SubjectUtils
- iterableToList(Iterable<T>) - Static method in class com.google.common.truth.SubjectUtils
- iterableToStringWithTypeInfo(Iterable<?>) - Static method in class com.google.common.truth.SubjectUtils
-
Makes a String representation of
items
with additional class info.
J
- JavaLikeOptions() - Constructor for class com.google.common.truth.Platform.JavaLikeOptions
- JUNIT_INFRASTRUCTURE_CLASSES - Static variable in class com.google.common.truth.StackTraceCleaner
K
- key - Variable in class com.google.common.truth.Fact
- keyForExpected - Variable in enum class com.google.common.truth.Subject.EqualityCheck
- keyToGoWithElementsString(String, SubjectUtils.DuplicateGroupedAndTyped) - Static method in class com.google.common.truth.IterableSubject
- keyToServeAsHeader(String, SubjectUtils.DuplicateGroupedAndTyped) - Static method in class com.google.common.truth.IterableSubject
L
- labelsSeen - Variable in class com.google.common.truth.ActualValueInference.InferenceMethodVisitor
-
The ASM labels that we've seen so far, which we use to look up the closest line number for each assertion.
- lastStackFrameElementWrapper - Variable in class com.google.common.truth.StackTraceCleaner
- LazyMessage - Class in com.google.common.truth
- LazyMessage(String, Object...) - Constructor for class com.google.common.truth.LazyMessage
- leaveRuleContext() - Method in class com.google.common.truth.ExpectFailure
-
Leaves rule context and verify if a failure has been caught if it's expected.
- leaveRuleContext(Throwable) - Method in class com.google.common.truth.Expect.ExpectationGatherer
- length() - Method in class com.google.common.truth.AbstractArraySubject
- lineNumbers(ImmutableList<Label>, ImmutableSetMultimap<Label, Integer>) - Static method in class com.google.common.truth.ActualValueInference.InferenceMethodVisitor
- lineNumbersAtLabel - Variable in class com.google.common.truth.ActualValueInference.InferenceMethodVisitor
-
The mapping from label to line number.
- loadClass(String) - Static method in class com.google.common.truth.StackTraceCleaner
- locals - Variable in class com.google.common.truth.AutoValue_ActualValueInference_FrameInfo
- locals() - Method in class com.google.common.truth.ActualValueInference.FrameInfo
- locals() - Method in class com.google.common.truth.AutoValue_ActualValueInference_FrameInfo
- localVariableSlots - Variable in class com.google.common.truth.ActualValueInference.InferenceMethodVisitor
- LONG - Static variable in class com.google.common.truth.ActualValueInference.InferredType
- longStreams() - Static method in class com.google.common.truth.LongStreamSubject
- LongStreamSubject - Class in com.google.common.truth
-
Propositions for
LongStream
subjects. - LongStreamSubject(FailureMetadata, LongStream) - Constructor for class com.google.common.truth.LongStreamSubject
- LongSubject - Class in com.google.common.truth
-
Propositions for
long
subjects. - LongSubject(FailureMetadata, Long) - Constructor for class com.google.common.truth.LongSubject
-
Constructor for use by subclasses.
M
- makeDiff(String, String) - Static method in class com.google.common.truth.Platform
- makeElementFacts(String, SubjectUtils.DuplicateGroupedAndTyped, IterableSubject.ElementFactGrouping) - Static method in class com.google.common.truth.IterableSubject
-
Returns a list of facts (zero, one, or many, depending on the number of elements and the grouping policy) describing the given missing, unexpected, or near-miss elements.
- makeElementFactsForBoth(String, Collection<?>, String, Collection<?>) - Static method in class com.google.common.truth.IterableSubject
- makeFacts(ImmutableList<Fact>, ImmutableList<Fact>, String, String) - Static method in exception class com.google.common.truth.ComparisonFailureWithFacts
- makeMessage(ImmutableList<String>, ImmutableList<Fact>) - Static method in class com.google.common.truth.Fact
-
Formats the given messages and facts into a string for use as the message of a test failure.
- MapDifference(Map<K, E>, Map<K, A>, Map<K, MapSubject.ValueDifference<A, E>>, Set<K>) - Constructor for class com.google.common.truth.MapSubject.MapDifference
- MapInOrder(Map<?, ?>, String) - Constructor for class com.google.common.truth.MapSubject.MapInOrder
- MapSubject - Class in com.google.common.truth
-
Propositions for
Map
subjects. - MapSubject(FailureMetadata, Map<?, ?>) - Constructor for class com.google.common.truth.MapSubject
-
Constructor for use by subclasses.
- MapSubject.MapDifference<K,
A, - Class in com.google.common.truthE> - MapSubject.MapInOrder - Class in com.google.common.truth
- MapSubject.TypedToStringWrapper - Class in com.google.common.truth
- MapSubject.UsingCorrespondence<A,
E> - Class in com.google.common.truth -
A partially specified check in which the actual values (i.e.
- MapSubject.ValueDifference<A,
E> - Class in com.google.common.truth - MapSubject.ValueTester<A,
E> - Interface in com.google.common.truth - matches(String) - Method in class com.google.common.truth.StringSubject
-
Fails if the string does not match the given regex.
- matches(Pattern) - Method in class com.google.common.truth.StringSubject
-
Fails if the string does not match the given regex.
- MathUtil - Class in com.google.common.truth
-
Math utilities to be shared by numeric subjects.
- MathUtil() - Constructor for class com.google.common.truth.MathUtil
- maximumCardinalityBipartiteMatching(Multimap<U, V>) - Static method in class com.google.common.truth.GraphMatching
- messages - Variable in class com.google.common.truth.FailureMetadata
- metadata - Variable in class com.google.common.truth.CustomSubjectBuilder
- metadata - Variable in class com.google.common.truth.SimpleSubjectBuilder
- metadata - Variable in class com.google.common.truth.Subject
- metadata() - Method in class com.google.common.truth.CustomSubjectBuilder
- metadata() - Method in class com.google.common.truth.StandardSubjectBuilder
- metadataDoNotReferenceDirectly - Variable in class com.google.common.truth.StandardSubjectBuilder
- methodArguments - Variable in class com.google.common.truth.Correspondence.StoredException
- methodName - Variable in class com.google.common.truth.Correspondence.StoredException
- methodNameToVisit - Variable in class com.google.common.truth.ActualValueInference.InferenceClassVisitor
-
The method to visit.
- methodSignature - Variable in class com.google.common.truth.ActualValueInference.InferenceMethodVisitor
-
For debugging purpose.
- missing - Variable in class com.google.common.truth.MapSubject.MapDifference
- moveElements(List<?>, Collection<Object>, int) - Static method in class com.google.common.truth.IterableSubject
-
Removes at most the given number of available elements from the input list and adds them to the given output collection.
- MultimapInOrder(String, Multimap<?, ?>) - Constructor for class com.google.common.truth.MultimapSubject.MultimapInOrder
- MultimapSubject - Class in com.google.common.truth
-
Propositions for
Multimap
subjects. - MultimapSubject(FailureMetadata, Multimap<?, ?>) - Constructor for class com.google.common.truth.MultimapSubject
-
Constructor for use by subclasses.
- MultimapSubject(FailureMetadata, Multimap<?, ?>, String) - Constructor for class com.google.common.truth.MultimapSubject
- MultimapSubject.EntryCorrespondence<K,
A, - Class in com.google.common.truthE> - MultimapSubject.IterableEntries - Class in com.google.common.truth
- MultimapSubject.MultimapInOrder - Class in com.google.common.truth
- MultimapSubject.UsingCorrespondence<A,
E> - Class in com.google.common.truth -
A partially specified check in which the actual values (i.e.
- MultisetSubject - Class in com.google.common.truth
-
Propositions for
Multiset
subjects. - MultisetSubject(FailureMetadata, Multiset<?>) - Constructor for class com.google.common.truth.MultisetSubject
N
- name - Variable in class com.google.common.truth.AutoValue_ActualValueInference_Invocation.Builder
- name - Variable in class com.google.common.truth.AutoValue_ActualValueInference_Invocation
- name - Variable in enum class com.google.common.truth.StackTraceCleaner.StackFrameType
- name() - Method in class com.google.common.truth.ActualValueInference.Invocation
- name() - Method in class com.google.common.truth.AutoValue_ActualValueInference_Invocation
- nameAsFacts() - Method in class com.google.common.truth.Subject
- NativeRegExp(String) - Constructor for class com.google.common.truth.Platform.NativeRegExp
- NEG_ZERO_BITS - Static variable in class com.google.common.truth.DoubleSubject
- NEG_ZERO_BITS - Static variable in class com.google.common.truth.FloatSubject
- NEVER_REMOVE - Enum constant in enum class com.google.common.truth.StackTraceCleaner.StackFrameType
- NonHashingMultiset() - Constructor for class com.google.common.truth.SubjectUtils.NonHashingMultiset
- notEqualWithinTolerance(double, double, double) - Static method in class com.google.common.truth.MathUtil
-
Returns true iff
left
andright
are finite values not withintolerance
of each other. - notEqualWithinTolerance(float, float, float) - Static method in class com.google.common.truth.MathUtil
-
Returns true iff
left
andright
are finite values not withintolerance
of each other. - NULL - Static variable in class com.google.common.truth.ActualValueInference.InferredType
-
The value NULL
- numberString(int, int) - Static method in class com.google.common.truth.IterableSubject
O
- ObjectArraySubject<T> - Class in com.google.common.truth
-
A Subject for
Object[]
and more genericallyT[]
. - ObjectArraySubject(FailureMetadata, T[], String) - Constructor for class com.google.common.truth.ObjectArraySubject
- objectToTypeName(Object) - Static method in class com.google.common.truth.SubjectUtils
- of(double) - Method in class com.google.common.truth.DoubleSubject.TolerantDoubleComparison
-
Fails if the subject was expected to be within the tolerance of the given value but was not or if it was expected not to be within the tolerance but was.
- of(float) - Method in class com.google.common.truth.FloatSubject.TolerantFloatComparison
-
Fails if the subject was expected to be within the tolerance of the given value but was not or if it was expected not to be within the tolerance but was.
- OldAndNewValuesAreSimilar() - Constructor for enum class com.google.common.truth.FailureMetadata.OldAndNewValuesAreSimilar
- opaque(ActualValueInference.InferredType) - Static method in class com.google.common.truth.ActualValueInference
- OpaqueEntry() - Constructor for class com.google.common.truth.ActualValueInference.OpaqueEntry
- operandStack - Variable in class com.google.common.truth.ActualValueInference.InferenceMethodVisitor
- optionalDoubles() - Static method in class com.google.common.truth.OptionalDoubleSubject
- OptionalDoubleSubject - Class in com.google.common.truth
-
Propositions for Java 8
OptionalDouble
subjects. - OptionalDoubleSubject(FailureMetadata, OptionalDouble, String) - Constructor for class com.google.common.truth.OptionalDoubleSubject
- optionalInts() - Static method in class com.google.common.truth.OptionalIntSubject
- OptionalIntSubject - Class in com.google.common.truth
-
Propositions for Java 8
OptionalInt
subjects. - OptionalIntSubject(FailureMetadata, OptionalInt, String) - Constructor for class com.google.common.truth.OptionalIntSubject
- optionalLongs() - Static method in class com.google.common.truth.OptionalLongSubject
- OptionalLongSubject - Class in com.google.common.truth
-
Propositions for Java 8
OptionalLong
subjects. - OptionalLongSubject(FailureMetadata, OptionalLong, String) - Constructor for class com.google.common.truth.OptionalLongSubject
- optionals() - Static method in class com.google.common.truth.OptionalSubject
- OptionalSubject - Class in com.google.common.truth
-
Propositions for Java 8
Optional
subjects. - OptionalSubject(FailureMetadata, Optional<?>, String) - Constructor for class com.google.common.truth.OptionalSubject
- Ordered - Interface in com.google.common.truth
-
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. - overBipartiteGraph(Multimap<U, V>) - Static method in class com.google.common.truth.GraphMatching.HopcroftKarp
-
Factory method which returns an instance ready to perform the algorithm over the bipartite graph described by the given multimap.
P
- pair(List<? extends E>, List<? extends A>, Correspondence.ExceptionStore) - Method in class com.google.common.truth.IterableSubject.UsingCorrespondence.Pairer
-
Returns a
IterableSubject.UsingCorrespondence<A,
of the given expected and actual values, orE>.Pairing null
if the expected values are not uniquely keyed. - pairedKeysToActualValues - Variable in class com.google.common.truth.IterableSubject.UsingCorrespondence.Pairing
-
Multimap from keys used in the pairing to the actual values with that key.
- pairedKeysToExpectedValues - Variable in class com.google.common.truth.IterableSubject.UsingCorrespondence.Pairing
-
Map from keys used in the pairing to the expected value with that key.
- pairer - Variable in class com.google.common.truth.IterableSubject.UsingCorrespondence
- Pairer(Function<? super A, ?>, Function<? super E, ?>) - Constructor for class com.google.common.truth.IterableSubject.UsingCorrespondence.Pairer
- Pairing() - Constructor for class com.google.common.truth.IterableSubject.UsingCorrespondence.Pairing
- pairOne(E, Iterable<? extends A>, Correspondence.ExceptionStore) - Method in class com.google.common.truth.IterableSubject.UsingCorrespondence.Pairer
- pairwiseCheck(String, IterableSubject.PairwiseChecker) - Method in class com.google.common.truth.IterableSubject
- paths() - Static method in class com.google.common.truth.PathSubject
- PathSubject - Class in com.google.common.truth
-
Assertions for
Path
instances. - PathSubject(FailureMetadata, Path) - Constructor for class com.google.common.truth.PathSubject
- perform() - Method in class com.google.common.truth.GraphMatching.HopcroftKarp
-
Performs the algorithm, and returns a bimap describing the matching found.
- pickGrouping(Iterable<Multiset.Entry<?>>, Iterable<Multiset.Entry<?>>) - Static method in class com.google.common.truth.IterableSubject
- PLACEHOLDER_ERR - Static variable in class com.google.common.truth.LazyMessage
- Platform - Class in com.google.common.truth
-
Extracted routines that need to be swapped in for GWT, to allow for minimal deltas between the GWT and non-GWT version.
- Platform() - Constructor for class com.google.common.truth.Platform
- Platform.JavaLikeOptions - Class in com.google.common.truth
- Platform.JUnitTestRule - Interface in com.google.common.truth
-
A GWT-swapped version of test rule interface that does nothing.
- Platform.NativeNumber - Interface in com.google.common.truth
- Platform.NativeRegExp - Class in com.google.common.truth
- Platform.PlatformComparisonFailure - Exception Class in com.google.common.truth
- Platform.ToLocaleStringOptions - Interface in com.google.common.truth
- PlatformComparisonFailure(String, String, String, Throwable) - Constructor for exception class com.google.common.truth.Platform.PlatformComparisonFailure
- pop() - Method in class com.google.common.truth.ActualValueInference.InferenceMethodVisitor
- pop(int) - Method in class com.google.common.truth.ActualValueInference.InferenceMethodVisitor
-
Pop elements from the end of the operand stack, and return the last popped element.
- popDescriptor(String) - Method in class com.google.common.truth.ActualValueInference.InferenceMethodVisitor
- predicate - Variable in class com.google.common.truth.Correspondence.FromBinaryPredicate
- prefixes - Variable in enum class com.google.common.truth.StackTraceCleaner.StackFrameType
- prependNameIfAny(ImmutableList<Fact>) - Method in class com.google.common.truth.Subject
- previousFrame - Variable in class com.google.common.truth.ActualValueInference.InferenceMethodVisitor
- PRIMITIVE_WRAPPERS - Static variable in class com.google.common.truth.ActualValueInference
- PrimitiveBooleanArraySubject - Class in com.google.common.truth
-
A Subject for
boolean[]
. - PrimitiveBooleanArraySubject(FailureMetadata, boolean[], String) - Constructor for class com.google.common.truth.PrimitiveBooleanArraySubject
- PrimitiveByteArraySubject - Class in com.google.common.truth
-
A Subject for
byte[]
. - PrimitiveByteArraySubject(FailureMetadata, byte[], String) - Constructor for class com.google.common.truth.PrimitiveByteArraySubject
- PrimitiveCharArraySubject - Class in com.google.common.truth
-
A Subject for
char[]
. - PrimitiveCharArraySubject(FailureMetadata, char[], String) - Constructor for class com.google.common.truth.PrimitiveCharArraySubject
- PrimitiveDoubleArraySubject - Class in com.google.common.truth
-
A Subject for
double[]
. - PrimitiveDoubleArraySubject(FailureMetadata, double[], String) - Constructor for class com.google.common.truth.PrimitiveDoubleArraySubject
- PrimitiveDoubleArraySubject.DoubleArrayAsIterable - Class in com.google.common.truth
-
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: seePrimitiveDoubleArraySubject.usingExactEquality()
andPrimitiveDoubleArraySubject.usingTolerance(double)
. - PrimitiveDoubleArraySubject.IterableSubjectWithInheritedToString - Class in com.google.common.truth
- PrimitiveFloatArraySubject - Class in com.google.common.truth
-
A Subject for
float[]
. - PrimitiveFloatArraySubject(FailureMetadata, float[], String) - Constructor for class com.google.common.truth.PrimitiveFloatArraySubject
- PrimitiveFloatArraySubject.FloatArrayAsIterable - Class in com.google.common.truth
-
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: seePrimitiveFloatArraySubject.usingExactEquality()
andPrimitiveFloatArraySubject.usingTolerance(double)
. - PrimitiveFloatArraySubject.IterableSubjectWithInheritedToString - Class in com.google.common.truth
- PrimitiveIntArraySubject - Class in com.google.common.truth
-
A Subject for
int[]
. - PrimitiveIntArraySubject(FailureMetadata, int[], String) - Constructor for class com.google.common.truth.PrimitiveIntArraySubject
- PrimitiveLongArraySubject - Class in com.google.common.truth
-
A Subject for
long[]
. - PrimitiveLongArraySubject(FailureMetadata, long[], String) - Constructor for class com.google.common.truth.PrimitiveLongArraySubject
- PrimitiveShortArraySubject - Class in com.google.common.truth
-
A Subject for
short[]
. - PrimitiveShortArraySubject(FailureMetadata, short[], String) - Constructor for class com.google.common.truth.PrimitiveShortArraySubject
- printSubsequentFailure(StackTraceElement[], AssertionError) - Method in class com.google.common.truth.Expect.ExpectationGatherer
- push(ActualValueInference.InferredType) - Method in class com.google.common.truth.ActualValueInference.InferenceMethodVisitor
- push(ActualValueInference.StackEntry) - Method in class com.google.common.truth.ActualValueInference.InferenceMethodVisitor
- pushDescriptor(String) - Method in class com.google.common.truth.ActualValueInference.InferenceMethodVisitor
- pushDescriptorAndMaybeProcessMethodCall(String, ActualValueInference.Invocation) - Method in class com.google.common.truth.ActualValueInference.InferenceMethodVisitor
-
Pushes entries onto the stack for the given arguments, and, if the descriptor is for a method call, records the assertion made by that call (if any).
- pushMaybeDescribed(ActualValueInference.InferredType, ActualValueInference.Invocation, boolean) - Method in class com.google.common.truth.ActualValueInference.InferenceMethodVisitor
R
- receiver - Variable in class com.google.common.truth.AutoValue_ActualValueInference_Invocation.Builder
- receiver - Variable in class com.google.common.truth.AutoValue_ActualValueInference_Invocation
- receiver() - Method in class com.google.common.truth.ActualValueInference.Invocation
-
The receiver of this call, if it is an instance call.
- receiver() - Method in class com.google.common.truth.AutoValue_ActualValueInference_Invocation
- record(AssertionError) - Method in class com.google.common.truth.Expect.ExpectationGatherer
- REFLECTION - Enum constant in enum class com.google.common.truth.StackTraceCleaner.StackFrameType
- remove(E) - Method in class com.google.common.truth.SubjectUtils.NonHashingMultiset
- removeBackFromList(ImmutableList<ActualValueInference.StackEntry>, int) - Static method in class com.google.common.truth.ActualValueInference.InferenceMethodVisitor
- removeCommonPrefixAndSuffix(String, String) - Static method in exception class com.google.common.truth.ComparisonFailureWithFacts
- replaceUninitializedTypeInStack(ActualValueInference.InferredType, ActualValueInference.InferredType) - Method in class com.google.common.truth.ActualValueInference.InferenceMethodVisitor
- retainMatchingToString(Iterable<?>, Iterable<?>) - Static method in class com.google.common.truth.SubjectUtils
-
Returns a new collection containing all elements in
items
for which there exists at least one element initemsToCheck
that has the sametoString()
value without being equal. - rootCause() - Method in class com.google.common.truth.FailureMetadata
-
Returns the first
Throwable
in the chain of actual values. - rootUnlessThrowable() - Method in class com.google.common.truth.FailureMetadata
-
Returns the root actual value, if we know it's "different enough" from the final actual value.
S
- safeCompare(A, E, Correspondence.ExceptionStore) - Method in class com.google.common.truth.Correspondence
-
Invokes
Correspondence.compare(A, E)
, catching any exceptions. - safeFormatDiff(A, E, Correspondence.ExceptionStore) - Method in class com.google.common.truth.Correspondence
-
Invokes
Correspondence.formatDiff(A, E)
, catching any exceptions. - SAME_INSTANCE - Enum constant in enum class com.google.common.truth.Subject.EqualityCheck
- sandwich(E, E[], E) - Static method in class com.google.common.truth.SubjectUtils
- seenJump - Variable in class com.google.common.truth.ActualValueInference.InferenceMethodVisitor
-
Set to
true
whenever a method permits multiple execution paths. - setActualValue(ActualValueInference.StackEntry) - Method in class com.google.common.truth.ActualValueInference.Invocation.Builder
- setActualValue(ActualValueInference.StackEntry) - Method in class com.google.common.truth.AutoValue_ActualValueInference_Invocation.Builder
- setBoxingInput(ActualValueInference.StackEntry) - Method in class com.google.common.truth.ActualValueInference.Invocation.Builder
- setBoxingInput(ActualValueInference.StackEntry) - Method in class com.google.common.truth.AutoValue_ActualValueInference_Invocation.Builder
- setLocalVariable(int, ActualValueInference.StackEntry) - Method in class com.google.common.truth.ActualValueInference.InferenceMethodVisitor
- setName(String) - Method in class com.google.common.truth.ActualValueInference.Invocation.Builder
- setName(String) - Method in class com.google.common.truth.AutoValue_ActualValueInference_Invocation.Builder
- setReceiver(ActualValueInference.StackEntry) - Method in class com.google.common.truth.ActualValueInference.Invocation.Builder
- setReceiver(ActualValueInference.StackEntry) - Method in class com.google.common.truth.AutoValue_ActualValueInference_Invocation.Builder
- SIMILAR - Enum constant in enum class com.google.common.truth.FailureMetadata.OldAndNewValuesAreSimilar
- SimpleAssertionError(String, Throwable) - Constructor for exception class com.google.common.truth.Truth.SimpleAssertionError
- simpleFact(String) - Static method in class com.google.common.truth.Fact
-
Creates a fact with no value, which will be printed in the format "key" (with no colon or value).
- SimpleSubjectBuilder<SubjectT,
ActualT> - Class in com.google.common.truth -
In a fluent assertion chain, exposes the most common
that
method, which accepts a value under test and returns aSubject
. - SimpleSubjectBuilder(FailureMetadata, Subject.Factory<SubjectT, ActualT>) - Constructor for class com.google.common.truth.SimpleSubjectBuilder
- stack - Variable in class com.google.common.truth.AutoValue_ActualValueInference_FrameInfo
- stack() - Method in class com.google.common.truth.ActualValueInference.FrameInfo
- stack() - Method in class com.google.common.truth.AutoValue_ActualValueInference_FrameInfo
- StackEntry() - Constructor for class com.google.common.truth.ActualValueInference.StackEntry
- stackFrameType - Variable in class com.google.common.truth.StackTraceCleaner.StackTraceElementWrapper
- StackFrameType(String, String...) - Constructor for enum class com.google.common.truth.StackTraceCleaner.StackFrameType
-
Each type of stack frame has a name of the summary displayed in the cleaned trace.
- StackTraceCleaner - Class in com.google.common.truth
-
Utility that cleans stack traces to remove noise from common frameworks.
- StackTraceCleaner(Throwable) - Constructor for class com.google.common.truth.StackTraceCleaner
-
A new instance is instantiated for each throwable to be cleaned.
- StackTraceCleaner.StackFrameType - Enum Class in com.google.common.truth
-
Enum of the package or class-name based categories of stack frames that might be removed or collapsed by the cleaner.
- StackTraceCleaner.StackTraceElementWrapper - Class in com.google.common.truth
-
Wrapper around a
StackTraceElement
for calculating and holding the metadata used to clean the stack trace. - stackTraceElement - Variable in class com.google.common.truth.StackTraceCleaner.StackTraceElementWrapper
- StackTraceElementWrapper(StackTraceElement) - Constructor for class com.google.common.truth.StackTraceCleaner.StackTraceElementWrapper
-
Creates a wrapper with the given frame with frame type inferred from frame's class name.
- StackTraceElementWrapper(StackTraceElement, StackTraceCleaner.StackFrameType) - Constructor for class com.google.common.truth.StackTraceCleaner.StackTraceElementWrapper
-
Creates a wrapper with the given frame and the given frame type.
- STANDARD_SUBJECT_BUILDER_CLASS - Static variable in class com.google.common.truth.StackTraceCleaner
- standardIsEqualTo(Object) - Method in class com.google.common.truth.Subject
- standardIsNotEqualTo(Object) - Method in class com.google.common.truth.Subject
- StandardSubjectBuilder - Class in com.google.common.truth
-
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)
. - StandardSubjectBuilder(FailureMetadata) - Constructor for class com.google.common.truth.StandardSubjectBuilder
- startsWith(String) - Method in class com.google.common.truth.StringSubject
-
Fails if the string does not start with the given string.
- Step(Subject, Function<String, String>, FailureMetadata.OldAndNewValuesAreSimilar) - Constructor for class com.google.common.truth.FailureMetadata.Step
- steps - Variable in class com.google.common.truth.FailureMetadata
- StoredException(Exception, String, List<Object>) - Constructor for class com.google.common.truth.Correspondence.StoredException
- strategy - Variable in class com.google.common.truth.ExpectFailure
- strategy - Variable in class com.google.common.truth.FailureMetadata
- streams() - Static method in class com.google.common.truth.StreamSubject
- StreamSubject - Class in com.google.common.truth
-
Propositions for
Stream
subjects. - StreamSubject(FailureMetadata, Stream<?>) - Constructor for class com.google.common.truth.StreamSubject
- stringableIterable(Object[]) - Static method in class com.google.common.truth.Subject
- STRINGIFY - Static variable in class com.google.common.truth.Subject
- stringRepresentation - Variable in class com.google.common.truth.MultimapSubject.IterableEntries
- StringSubject - Class in com.google.common.truth
-
Propositions for string subjects.
- StringSubject(FailureMetadata, String) - Constructor for class com.google.common.truth.StringSubject
-
Constructor for use by subclasses.
- StringSubject.CaseInsensitiveStringComparison - Class in com.google.common.truth
-
Case insensitive propositions for string subjects.
- subject - Variable in class com.google.common.truth.FailureMetadata.Step
- subject - Variable in class com.google.common.truth.IterableSubject.UsingCorrespondence
- Subject - Class in com.google.common.truth
-
An object that lets you perform checks on the value under test.
- Subject(FailureMetadata, Object) - Constructor for class com.google.common.truth.Subject
-
Constructor for use by subclasses.
- Subject(FailureMetadata, Object, String) - Constructor for class com.google.common.truth.Subject
-
Special constructor that lets subclasses provide a description of the type they're testing.
- SUBJECT_CLASS - Static variable in class com.google.common.truth.StackTraceCleaner
- Subject.ComparisonResult - Class in com.google.common.truth
-
The result of comparing two objects for equality.
- Subject.EqualityCheck - Enum Class in com.google.common.truth
- Subject.Factory<SubjectT,
ActualT> - Interface in com.google.common.truth - subjectCreation(Subject) - Static method in class com.google.common.truth.FailureMetadata.Step
- SubjectEntry() - Constructor for class com.google.common.truth.ActualValueInference.SubjectEntry
- subjectFactory - Variable in class com.google.common.truth.SimpleSubjectBuilder
- subjectFor(ActualValueInference.InferredType, ActualValueInference.StackEntry) - Static method in class com.google.common.truth.ActualValueInference
- SubjectUtils - Class in com.google.common.truth
-
Utility methods used in
Subject
implementors. - SubjectUtils() - Constructor for class com.google.common.truth.SubjectUtils
- SubjectUtils.DuplicateGroupedAndTyped - Class in com.google.common.truth
-
Missing or unexpected values from a collection assertion, with equal objects grouped together and, in some cases, type information added.
- SubjectUtils.NonHashingMultiset<E> - Class in com.google.common.truth
T
- TableSubject - Class in com.google.common.truth
-
Propositions for
Table
subjects. - TableSubject(FailureMetadata, Table<?, ?, ?>) - Constructor for class com.google.common.truth.TableSubject
- test(A, E) - Method in interface com.google.common.truth.MapSubject.ValueTester
- test(String) - Method in class com.google.common.truth.Platform.NativeRegExp
- TEST_FRAMEWORK - Enum constant in enum class com.google.common.truth.StackTraceCleaner.StackFrameType
- TestPhase() - Constructor for enum class com.google.common.truth.Expect.TestPhase
- that(boolean[]) - Method in class com.google.common.truth.StandardSubjectBuilder
- that(byte[]) - Method in class com.google.common.truth.StandardSubjectBuilder
- that(char[]) - Method in class com.google.common.truth.StandardSubjectBuilder
- that(double[]) - Method in class com.google.common.truth.StandardSubjectBuilder
- that(float[]) - Method in class com.google.common.truth.StandardSubjectBuilder
- that(int[]) - Method in class com.google.common.truth.StandardSubjectBuilder
- that(long[]) - Method in class com.google.common.truth.StandardSubjectBuilder
- that(short[]) - Method in class com.google.common.truth.StandardSubjectBuilder
- that(ActualT) - Method in class com.google.common.truth.SimpleSubjectBuilder
- that(Optional<?>) - Method in class com.google.common.truth.StandardSubjectBuilder
- that(Multimap<?, ?>) - Method in class com.google.common.truth.StandardSubjectBuilder
- that(Multiset<?>) - Method in class com.google.common.truth.StandardSubjectBuilder
- that(Table<?, ?, ?>) - Method in class com.google.common.truth.StandardSubjectBuilder
- that(ComparableT) - Method in class com.google.common.truth.StandardSubjectBuilder
- that(Boolean) - Method in class com.google.common.truth.StandardSubjectBuilder
- that(Class<?>) - Method in class com.google.common.truth.StandardSubjectBuilder
- that(Double) - Method in class com.google.common.truth.StandardSubjectBuilder
- that(Float) - Method in class com.google.common.truth.StandardSubjectBuilder
- that(Integer) - Method in class com.google.common.truth.StandardSubjectBuilder
- that(Iterable<?>) - Method in class com.google.common.truth.StandardSubjectBuilder
- that(Long) - Method in class com.google.common.truth.StandardSubjectBuilder
- that(Object) - Method in class com.google.common.truth.StandardSubjectBuilder
- that(String) - Method in class com.google.common.truth.StandardSubjectBuilder
- that(Throwable) - Method in class com.google.common.truth.StandardSubjectBuilder
- that(BigDecimal) - Method in class com.google.common.truth.StandardSubjectBuilder
- that(Map<?, ?>) - Method in class com.google.common.truth.StandardSubjectBuilder
- that(T[]) - Method in class com.google.common.truth.StandardSubjectBuilder
- THROW_ASSERTION_ERROR - Static variable in class com.google.common.truth.Truth
- THROW_ASSUMPTION_ERROR - Static variable in class com.google.common.truth.TruthJUnit
- throwable - Variable in class com.google.common.truth.StackTraceCleaner
- ThrowableAssumptionViolatedException(String, Throwable) - Constructor for exception class com.google.common.truth.TruthJUnit.ThrowableAssumptionViolatedException
- ThrowableSubject - Class in com.google.common.truth
-
Propositions for
Throwable
subjects. - ThrowableSubject(FailureMetadata, Throwable) - Constructor for class com.google.common.truth.ThrowableSubject
-
Constructor for use by subclasses.
- ThrowableSubject(FailureMetadata, Throwable, String) - Constructor for class com.google.common.truth.ThrowableSubject
- tolerance - Variable in class com.google.common.truth.Correspondence.TolerantNumericEquality
- tolerance(double) - Static method in class com.google.common.truth.Correspondence
-
Returns a
Correspondence
betweenNumber
instances that considers instances to correspond (i.e. - TolerantDoubleComparison() - Constructor for class com.google.common.truth.DoubleSubject.TolerantDoubleComparison
- TolerantFloatComparison() - Constructor for class com.google.common.truth.FloatSubject.TolerantFloatComparison
- TolerantNumericEquality(double) - Constructor for class com.google.common.truth.Correspondence.TolerantNumericEquality
- toLocaleString(double) - Static method in class com.google.common.truth.Platform
- toLocaleString(Object, Platform.ToLocaleStringOptions) - Method in interface com.google.common.truth.Platform.NativeNumber
- top() - Method in class com.google.common.truth.ActualValueInference.InferenceMethodVisitor
- TOP - Static variable in class com.google.common.truth.ActualValueInference.InferredType
-
Not a real value.
- toString() - Method in class com.google.common.truth.ActualValueInference.DescribedEntry
- toString() - Method in class com.google.common.truth.ActualValueInference.InferredType
- toString() - Method in class com.google.common.truth.ActualValueInference.OpaqueEntry
- toString() - Method in class com.google.common.truth.ActualValueInference.SubjectEntry
- toString() - Method in exception class com.google.common.truth.AssertionErrorWithFacts
- toString() - Method in class com.google.common.truth.AutoValue_ActualValueInference_FrameInfo
- toString() - Method in class com.google.common.truth.AutoValue_ActualValueInference_Invocation
- toString() - Method in class com.google.common.truth.Correspondence.FormattingDiffs
- toString() - Method in class com.google.common.truth.Correspondence.FromBinaryPredicate
- toString() - Method in class com.google.common.truth.Correspondence.TolerantNumericEquality
- toString() - Method in class com.google.common.truth.Correspondence
-
Returns a description of the correspondence, suitable to fill the gap in a failure message of the form
"<some actual element> is an element that ... <some expected element>"
. - toString() - Method in class com.google.common.truth.Correspondence.Transforming
- toString() - Method in class com.google.common.truth.Expect.ExpectationGatherer
- toString() - Method in class com.google.common.truth.Fact
-
Returns a simple string representation for the fact.
- toString() - Method in class com.google.common.truth.LazyMessage
- toString() - Method in class com.google.common.truth.MapSubject.TypedToStringWrapper
- toString() - Method in class com.google.common.truth.MultimapSubject.EntryCorrespondence
- toString() - Method in exception class com.google.common.truth.Platform.PlatformComparisonFailure
- toString() - Method in class com.google.common.truth.Subject
- toString() - Method in class com.google.common.truth.SubjectUtils.DuplicateGroupedAndTyped
- toString() - Method in class com.google.common.truth.SubjectUtils.NonHashingMultiset
- toString() - Method in exception class com.google.common.truth.Truth.SimpleAssertionError
- toStringWithBrackets() - Method in class com.google.common.truth.SubjectUtils.NonHashingMultiset
- totalCopies() - Method in class com.google.common.truth.SubjectUtils.DuplicateGroupedAndTyped
- totalCopies() - Method in class com.google.common.truth.SubjectUtils.NonHashingMultiset
- transforming(Function<A, ?>, Function<E, ?>, String) - Static method in class com.google.common.truth.Correspondence
-
Constructs a
Correspondence
that compares elements by transforming the actual and the expected elements using the given functions and testing the transformed values for equality. - transforming(Function<A, ? extends E>, String) - Static method in class com.google.common.truth.Correspondence
-
Constructs a
Correspondence
that compares elements by transforming the actual elements using the given function and testing for equality with the expected elements. - Transforming(Function<? super A, ?>, Function<? super E, ?>, String) - Constructor for class com.google.common.truth.Correspondence.Transforming
- truncateStackTrace(Exception, Class<?>) - Static method in class com.google.common.truth.Correspondence.ExceptionStore
- Truth - Class in com.google.common.truth
-
The primary entry point for Truth, a library for fluent test assertions.
- Truth() - Constructor for class com.google.common.truth.Truth
- Truth.SimpleAssertionError - Exception Class in com.google.common.truth
-
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. - Truth8 - Class in com.google.common.truth
-
The primary entry point for assertions about Java 8 types.
- Truth8() - Constructor for class com.google.common.truth.Truth8
- truthFailures() - Static method in class com.google.common.truth.TruthFailureSubject
-
Factory for creating
TruthFailureSubject
instances. - TruthFailureSubject - Class in com.google.common.truth
-
Subject for
AssertionError
objects thrown by Truth. - TruthFailureSubject(FailureMetadata, AssertionError, String) - Constructor for class com.google.common.truth.TruthFailureSubject
- TruthJUnit - Class in com.google.common.truth
-
Provides a way to use Truth to perform JUnit "assumptions." An assumption is a check that, if false, aborts (skips) the test.
- TruthJUnit() - Constructor for class com.google.common.truth.TruthJUnit
- TruthJUnit.ThrowableAssumptionViolatedException - Exception Class in com.google.common.truth
- tryFailForEmptyString(Object) - Method in class com.google.common.truth.Subject
-
Checks whether the actual and expected values are empty strings.
- tryFailForTrailingWhitespaceOnly(Object) - Method in class com.google.common.truth.Subject
-
Checks whether the actual and expected values are strings that match except for trailing whitespace.
- type - Variable in class com.google.common.truth.AutoValue_ActualValueInference_DescribedEntry
- type - Variable in class com.google.common.truth.AutoValue_ActualValueInference_OpaqueEntry
- type - Variable in class com.google.common.truth.AutoValue_ActualValueInference_SubjectEntry
- type() - Method in class com.google.common.truth.ActualValueInference.StackEntry
- type() - Method in class com.google.common.truth.AutoValue_ActualValueInference_DescribedEntry
- type() - Method in class com.google.common.truth.AutoValue_ActualValueInference_OpaqueEntry
- type() - Method in class com.google.common.truth.AutoValue_ActualValueInference_SubjectEntry
- typeDescription() - Method in class com.google.common.truth.Subject
- typeDescriptionOrGuess(Class<? extends Subject>, String) - Static method in class com.google.common.truth.Subject
- typeDescriptionOverride - Variable in class com.google.common.truth.Subject
- TypedToStringWrapper(Object) - Constructor for class com.google.common.truth.MapSubject.TypedToStringWrapper
U
- unexpected - Variable in class com.google.common.truth.MapSubject.MapDifference
- UNINITIALIZED - Static variable in class com.google.common.truth.ActualValueInference.InferredType
- UNINITIALIZED_PREFIX - Static variable in class com.google.common.truth.ActualValueInference.InferredType
- UNINITIALIZED_THIS - Static variable in class com.google.common.truth.ActualValueInference.InferredType
- unpairedActualValues - Variable in class com.google.common.truth.IterableSubject.UsingCorrespondence.Pairing
-
List of the actual values not used in the pairing.
- unpairedExpectedValues - Variable in class com.google.common.truth.IterableSubject.UsingCorrespondence.Pairing
-
List of the expected values not used in the pairing.
- unwrapKey - Variable in class com.google.common.truth.SubjectUtils.NonHashingMultiset
- updateForCheckCall() - Method in class com.google.common.truth.FailureMetadata
- updateForCheckCall(FailureMetadata.OldAndNewValuesAreSimilar, Function<String, String>) - Method in class com.google.common.truth.FailureMetadata
- updateForSubject(Subject) - Method in class com.google.common.truth.FailureMetadata
-
Returns a new instance that includes the given subject in its chain of values.
- used - Variable in class com.google.common.truth.ActualValueInference.InferenceMethodVisitor
- UsingCorrespondence(Correspondence<? super A, ? super E>) - Constructor for class com.google.common.truth.MapSubject.UsingCorrespondence
- UsingCorrespondence(Correspondence<? super A, ? super E>) - Constructor for class com.google.common.truth.MultimapSubject.UsingCorrespondence
- UsingCorrespondence(IterableSubject, Correspondence<? super A, ? super E>) - Constructor for class com.google.common.truth.IterableSubject.UsingCorrespondence
- UsingCorrespondence(IterableSubject, Correspondence<? super A, ? super E>, IterableSubject.UsingCorrespondence.Pairer) - Constructor for class com.google.common.truth.IterableSubject.UsingCorrespondence
- usingExactEquality() - Method in class com.google.common.truth.PrimitiveDoubleArraySubject
-
Starts a method chain for a check in which the actual values (i.e.
- usingExactEquality() - Method in class com.google.common.truth.PrimitiveFloatArraySubject
-
Starts a method chain for a check in which the actual values (i.e.
- usingTolerance(double) - Method in class com.google.common.truth.PrimitiveDoubleArraySubject
-
Starts a method chain for a check in which the actual values (i.e.
- usingTolerance(double) - Method in class com.google.common.truth.PrimitiveFloatArraySubject
-
Starts a method chain for a check in which the actual values (i.e.
V
- validSurrogatePairAt(CharSequence, int) - Static method in exception class com.google.common.truth.ComparisonFailureWithFacts
- value - Variable in class com.google.common.truth.Fact
- VALUE_DIFFERENCE_FORMAT - Static variable in class com.google.common.truth.MapSubject
-
A formatting function for value differences when compared for equality.
- valueCorrespondence - Variable in class com.google.common.truth.MultimapSubject.EntryCorrespondence
- ValueDifference(A, E) - Constructor for class com.google.common.truth.MapSubject.ValueDifference
- valueDiffFormat(Correspondence.ExceptionStore) - Method in class com.google.common.truth.MapSubject.UsingCorrespondence
-
Returns a formatting function for value differences when compared using the current correspondence.
- valueOf(String) - Static method in enum class com.google.common.truth.Expect.TestPhase
-
Returns the enum constant of this class with the specified name.
- valueOf(String) - Static method in enum class com.google.common.truth.FailureMetadata.OldAndNewValuesAreSimilar
-
Returns the enum constant of this class with the specified name.
- valueOf(String) - Static method in enum class com.google.common.truth.IterableSubject.ElementFactGrouping
-
Returns the enum constant of this class with the specified name.
- valueOf(String) - Static method in enum class com.google.common.truth.StackTraceCleaner.StackFrameType
-
Returns the enum constant of this class with the specified name.
- valueOf(String) - Static method in enum class com.google.common.truth.Subject.EqualityCheck
-
Returns the enum constant of this class with the specified name.
- values() - Static method in enum class com.google.common.truth.Expect.TestPhase
-
Returns an array containing the constants of this enum class, in the order they are declared.
- values() - Static method in enum class com.google.common.truth.FailureMetadata.OldAndNewValuesAreSimilar
-
Returns an array containing the constants of this enum class, in the order they are declared.
- values() - Static method in enum class com.google.common.truth.IterableSubject.ElementFactGrouping
-
Returns an array containing the constants of this enum class, in the order they are declared.
- values() - Static method in enum class com.google.common.truth.StackTraceCleaner.StackFrameType
-
Returns an array containing the constants of this enum class, in the order they are declared.
- values() - Static method in enum class com.google.common.truth.Subject.EqualityCheck
-
Returns an array containing the constants of this enum class, in the order they are declared.
- valuesAndMaybeTypes - Variable in class com.google.common.truth.SubjectUtils.DuplicateGroupedAndTyped
- valuesAreEqual() - Method in class com.google.common.truth.Subject.ComparisonResult
- valuesAreSimilar - Variable in class com.google.common.truth.FailureMetadata.Step
- valuesForKey(Object) - Method in class com.google.common.truth.MultimapSubject
-
Returns a context-aware
Subject
for making assertions about the values for the given key within theMultimap
. - verb - Variable in class com.google.common.truth.MultimapSubject.MultimapInOrder
- visit(int, int, String, String, String, String[]) - Method in class com.google.common.truth.ActualValueInference.InferenceClassVisitor
- visitCode() - Method in class com.google.common.truth.ActualValueInference.InferenceMethodVisitor
- visitEnd() - Method in class com.google.common.truth.ActualValueInference.InferenceMethodVisitor
- visitFieldInsn(int, String, String, String) - Method in class com.google.common.truth.ActualValueInference.InferenceMethodVisitor
- visitFrame(int, int, Object[], int, Object[]) - Method in class com.google.common.truth.ActualValueInference.InferenceMethodVisitor
- visitIincInsn(int, int) - Method in class com.google.common.truth.ActualValueInference.InferenceMethodVisitor
- visitInsn(int) - Method in class com.google.common.truth.ActualValueInference.InferenceMethodVisitor
- visitIntInsn(int, int) - Method in class com.google.common.truth.ActualValueInference.InferenceMethodVisitor
- visitInvokeDynamicInsn(String, String, Handle, Object...) - Method in class com.google.common.truth.ActualValueInference.InferenceMethodVisitor
- visitJumpInsn(int, Label) - Method in class com.google.common.truth.ActualValueInference.InferenceMethodVisitor
- visitLabel(Label) - Method in class com.google.common.truth.ActualValueInference.InferenceMethodVisitor
- visitLdcInsn(Object) - Method in class com.google.common.truth.ActualValueInference.InferenceMethodVisitor
- visitLineNumber(int, Label) - Method in class com.google.common.truth.ActualValueInference.InferenceMethodVisitor
- visitLookupSwitchInsn(Label, int[], Label[]) - Method in class com.google.common.truth.ActualValueInference.InferenceMethodVisitor
- visitMethod(int, String, String, String, String[]) - Method in class com.google.common.truth.ActualValueInference.InferenceClassVisitor
- visitMethodInsn(int, String, String, String, boolean) - Method in class com.google.common.truth.ActualValueInference.InferenceMethodVisitor
- visitMultiANewArrayInsn(String, int) - Method in class com.google.common.truth.ActualValueInference.InferenceMethodVisitor
- visitTableSwitchInsn(int, int, Label, Label...) - Method in class com.google.common.truth.ActualValueInference.InferenceMethodVisitor
- visitTryCatchBlock(Label, Label, Label, String) - Method in class com.google.common.truth.ActualValueInference.InferenceMethodVisitor
- visitTypeInsn(int, String) - Method in class com.google.common.truth.ActualValueInference.InferenceMethodVisitor
- visitVarInsn(int, int) - Method in class com.google.common.truth.ActualValueInference.InferenceMethodVisitor
W
- whenTesting() - Method in class com.google.common.truth.ExpectFailure
-
Returns a test verb that expects the chained assertion to fail, and makes the failure available via
ExpectFailure.getFailure()
. - withMessage(String) - Method in class com.google.common.truth.StandardSubjectBuilder
-
Returns a new instance that will output the given message before the main failure message.
- withMessage(String, Object[]) - Method in class com.google.common.truth.FailureMetadata
-
Returns a new instance whose failures will contain the given message.
- withMessage(String, Object...) - Method in class com.google.common.truth.StandardSubjectBuilder
-
Returns a new instance that will output the given message before the main failure message.
- withoutDescription() - Method in class com.google.common.truth.Subject.ComparisonResult
-
Returns an instance with the same "equal"/"not-equal" bit but with no description.
- WORTH_HIDING - Static variable in exception class com.google.common.truth.ComparisonFailureWithFacts
- wrongValues - Variable in class com.google.common.truth.MapSubject.MapDifference
All Classes and Interfaces|All Packages|Constant Field Values|Serialized Form