-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Closed
Labels
Description
Currently the assertItem prints by the following statements, focus on "expected to be"
private void assertItem(T expected, int i) {
T actual = values.get(i);
if (expected == null) {
// check for null equality
if (actual != null) {
assertionError("Value at index: " + i + " expected to be [null] but was: [" + actual + "]\n");
}
} else if (!expected.equals(actual)) {
assertionError("Value at index: " + i
+ " expected to be [" + expected + "] (" + expected.getClass().getSimpleName()
+ ") but was: [" + actual + "] (" + (actual != null ? actual.getClass().getSimpleName() : "null") + ")\n");
}
}
However, it does not match any of the IntelliJ assertion regex patterns, thus making it very difficult to visually compare expected and actual values. We forked assertItem() using one of the following patterns from this and could immediately see the <Click to see difference> link in the IDE.