Support for JUnit-Specific Features

If JUnit 4 (or greater) is in the classpath, failures of

  • isEqualTo(String) in StringAssert
  • isEqualTo(Object) in ObjectAssert (only if both the expected and the actual values are Strings)
throw ComparisonFailure.

This feature can be useful when using tools that have support for this exception. For example, Eclipse provides a nice GUI that shows the differences between the expected and actual values: