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

Method simpleFact

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

Creates a fact with no value, which will be printed in the format "key" (with no colon or value). In most cases, prefer plain #fact key-value facts, which give Truth more flexibility in how to format the fact for display. simpleFact is useful primarily for: messages fr

(String key)

Source from the content-addressed store, hash-verified

66 * </ul>
67 */
68 public static Fact simpleFact(String key) {
69 return new Fact(key, null, /* padStart= */ false);
70 }
71
72 /** Creates a fact with the given key and the value returned by the given {@link Supplier}. */
73 static Fact factFromSupplier(String key, Supplier<?> valueSupplier) {

Callers 15

nullPointerTesterMethod · 0.80
stringWithoutValueMethod · 0.80
oneFactWithoutValueMethod · 0.80
newlineWithoutValueMethod · 0.80
isEqualToMethod · 0.80
factKeysNoValueMethod · 0.80
factValueFailNoValueMethod · 0.80
factValueFailNullMethod · 0.80

Calls

no outgoing calls

Tested by 15

nullPointerTesterMethod · 0.64
stringWithoutValueMethod · 0.64
oneFactWithoutValueMethod · 0.64
newlineWithoutValueMethod · 0.64
isEqualToMethod · 0.64
factKeysNoValueMethod · 0.64
factValueFailNoValueMethod · 0.64
factValueFailNullMethod · 0.64