MCPcopy Create free account
hub / github.com/google/truth / fact

Method fact

core/src/main/java/com/google/common/truth/Fact.java:49–51  ·  view source on GitHub ↗

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.

(String key, @Nullable Object value)

Source from the content-addressed store, hash-verified

47 * value." The value is converted to a string by calling {@code String.valueOf} on it.
48 */
49 public static Fact fact(String key, @Nullable Object value) {
50 return new Fact(key, stringValueForFailure(value), /* padStart= */ false);
51 }
52
53 /**
54 * Creates a fact with no value, which will be printed in the format "key" (with no colon or

Callers 15

factFromSupplierMethod · 0.95
stringMethod · 0.80
oneFactsMethod · 0.80
twoFactsMethod · 0.80
newlineMethod · 0.80
newlineWithoutValueMethod · 0.80
withMessageMethod · 0.80
factKeysMethod · 0.80
factKeysFailMethod · 0.80
factValueMethod · 0.80

Calls 1

stringValueForFailureMethod · 0.45

Tested by 15

stringMethod · 0.64
oneFactsMethod · 0.64
twoFactsMethod · 0.64
newlineMethod · 0.64
newlineWithoutValueMethod · 0.64
withMessageMethod · 0.64
factKeysMethod · 0.64
factKeysFailMethod · 0.64
factValueMethod · 0.64