I would like to be able to print in the logs a message for which intellij idea would present a nice way of comparing two objects (strings). This happens automatically for the er
IntelliJ IDEA is using the hardcoded regular expression. If the text matches the pattern, it will suggest to click to view the difference.
The pattern is:
expected: but was:
Output should match the format of assertEquals
or assertThat
.
The exact patterns are somewhat scattered around the code in IDEA, but some are e.g. here.