Throws an exception to fail this assertion when two values are not equal.
Throws an exception to fail this assertion when two values are not equal.
Override this method to customize the error message. For example, it may be helpful to generate an image/HTML file if you're comparing visual values. Anything is possible, use your imagination!
should ideally throw a org.junit.ComparisonFailException in order to support the IntelliJ diff viewer.
A type-class that is used to compare values in MUnit assertions.
By default, uses == and allows comparison between any two types as long they have a supertype/subtype relationship. For example:
- Compare[T, T] OK - Compare[Some[Int], Option[Int]] OK, subtype - Compare[Option[Int], Some[Int]] OK, supertype - Compare[List[Int], collection.Seq[Int]] OK, subtype - Compare[List[Int], Vector[Int]] Error, requires upcast to
Seq[Int]