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)
| 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: |