Uses of Class
com.google.common.truth.Fact
-
-
Uses of Fact in com.google.common.truth
Fields in com.google.common.truth declared as Fact Modifier and Type Field Description (package private) static Fact
TruthFailureSubject. HOW_TO_TEST_KEYS_WITHOUT_VALUES
Fields in com.google.common.truth with type parameters of type Fact Modifier and Type Field Description (package private) com.google.common.collect.ImmutableList<Fact>
AssertionErrorWithFacts. facts
(package private) com.google.common.collect.ImmutableList<Fact>
ComparisonFailureWithFacts. facts
private java.lang.Iterable<Fact>
Facts. facts
private com.google.common.collect.ImmutableList<Fact>
Subject.ComparisonResult. facts
Methods in com.google.common.truth that return Fact Modifier and Type Method Description (package private) Fact
Subject. butWas()
Returns a "but was:" string. (package private) Fact
Correspondence. describeForIterable()
Returns aFact
describing how this correspondence compares elements of an iterable.(package private) Fact
Correspondence. describeForMapValues()
Returns aFact
describing how this correspondence compares values in a map (or multimap).static Fact
Fact. fact(java.lang.String key, java.lang.Object value)
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 callingString.valueOf
on it.private Fact
IterableSubject. fullContents()
static Fact
Fact. simpleFact(java.lang.String key)
Creates a fact with no value, which will be printed in the format "key" (with no colon or value).Methods in com.google.common.truth that return types with arguments of type Fact Modifier and Type Method Description (package private) java.lang.Iterable<Fact>
Facts. asIterable()
Returns the facts wrapped by this instance.private com.google.common.collect.ImmutableList<Fact>
FailureMetadata. description()
Returns a description of the final actual value, if it appears "interesting" enough to show.com.google.common.collect.ImmutableList<Fact>
AssertionErrorWithFacts. facts()
com.google.common.collect.ImmutableList<Fact>
ComparisonFailureWithFacts. facts()
com.google.common.collect.ImmutableList<Fact>
ErrorWithFacts. facts()
(package private) com.google.common.collect.ImmutableList<Fact>
Subject.ComparisonResult. factsOrEmpty()
private static com.google.common.collect.ImmutableList<Fact>
TruthFailureSubject. factsWithName(ErrorWithFacts error, java.lang.String key)
(package private) static com.google.common.collect.ImmutableList<Fact>
ComparisonFailureWithFacts. formatExpectedAndActual(java.lang.String expected, java.lang.String actual)
Returns one or more facts describing the difference between the given expected and actual values.(package private) static com.google.common.collect.ImmutableList<Fact>
Platform. makeDiff(java.lang.String expected, java.lang.String actual)
private static com.google.common.collect.ImmutableList<Fact>
IterableSubject. makeElementFacts(java.lang.String label, SubjectUtils.DuplicateGroupedAndTyped elements, IterableSubject.ElementFactGrouping grouping)
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.private static com.google.common.collect.ImmutableList<Fact>
IterableSubject. makeElementFactsForBoth(java.lang.String firstKey, java.util.Collection<?> firstCollection, java.lang.String secondKey, java.util.Collection<?> secondCollection)
private static com.google.common.collect.ImmutableList<Fact>
ComparisonFailureWithFacts. makeFacts(com.google.common.collect.ImmutableList<Fact> headFacts, com.google.common.collect.ImmutableList<Fact> tailFacts, java.lang.String expected, java.lang.String actual)
private com.google.common.collect.ImmutableList<Fact>
Subject. nameAsFacts()
private com.google.common.collect.ImmutableList<Fact>
Subject. prependNameIfAny(com.google.common.collect.ImmutableList<Fact> facts)
private static com.google.common.collect.ImmutableList<Fact>
ComparisonFailureWithFacts. removeCommonPrefixAndSuffix(java.lang.String expected, java.lang.String actual)
private com.google.common.collect.ImmutableList<Fact>
FailureMetadata. rootUnlessThrowable()
Returns the root actual value, if we know it's "different enough" from the final actual value.Methods in com.google.common.truth with parameters of type Fact Modifier and Type Method Description (package private) Facts
Facts. and(Fact... moreFacts)
Returns an instance concatenating the facts wrapped by the current instance followed by the given facts.(package private) static Subject.ComparisonResult
Subject.ComparisonResult. differentWithDescription(Fact... facts)
Returns a non-equal result with the given description.(package private) static Facts
Facts. facts(Fact... facts)
Returns an instance wrapping the given facts.private void
Subject. failEqualityCheckNoComparisonFailure(Subject.ComparisonResult difference, Fact... facts)
protected void
Subject. failWithActual(Fact first, Fact... rest)
Fails, reporting a message with the given facts, followed by an automatically added fact of the form: but was: actual value.protected void
Subject. failWithoutActual(Fact first, Fact... rest)
Fails, reporting a message with the given facts, without automatically adding the actual value.Method parameters in com.google.common.truth with type arguments of type Fact Modifier and Type Method Description private void
Subject. doFail(com.google.common.collect.ImmutableList<Fact> facts)
(package private) static Facts
Facts. facts(java.lang.Iterable<Fact> facts)
Returns an instance wrapping the given facts.(package private) void
FailureMetadata. fail(com.google.common.collect.ImmutableList<Fact> facts)
(package private) void
FailureMetadata. failEqualityCheck(com.google.common.collect.ImmutableList<Fact> headFacts, com.google.common.collect.ImmutableList<Fact> tailFacts, java.lang.String expected, java.lang.String actual)
(package private) void
Subject. failWithActual(java.lang.Iterable<Fact> facts)
(package private) void
Subject. failWithoutActual(java.lang.Iterable<Fact> facts)
private static com.google.common.collect.ImmutableList<Fact>
ComparisonFailureWithFacts. makeFacts(com.google.common.collect.ImmutableList<Fact> headFacts, com.google.common.collect.ImmutableList<Fact> tailFacts, java.lang.String expected, java.lang.String actual)
private com.google.common.collect.ImmutableList<Fact>
Subject. prependNameIfAny(com.google.common.collect.ImmutableList<Fact> facts)
Constructor parameters in com.google.common.truth with type arguments of type Fact Constructor Description ComparisonResult(com.google.common.collect.ImmutableList<Fact> facts)
Facts(java.lang.Iterable<Fact> facts)
-