MCPcopy
hub / github.com/assertj/assertj / failure

Method failure

src/main/java/org/assertj/core/internal/Failures.java:73–77  ·  view source on GitHub ↗

Creates a AssertionError following this pattern: creates a AssertionError using AssertionInfo#overridingErrorMessage() as the error message if such value is not null, or uses the given {@link AssertionErro

(AssertionInfo info, AssertionErrorFactory factory)

Source from the content-addressed store, hash-verified

71 * @return the created <code>{@link AssertionError}</code>.
72 */
73 public AssertionError failure(AssertionInfo info, AssertionErrorFactory factory) {
74 AssertionError error = failureIfErrorMessageIsOverriden(info);
75 if (error != null) return error;
76 return factory.newAssertionError(info.description(), info.representation());
77 }
78
79 /**
80 * Creates a <code>{@link AssertionError}</code> following this pattern:

Calls 6

newAssertionErrorMethod · 0.65
descriptionMethod · 0.65
representationMethod · 0.65
createMethod · 0.65