kotest-assertions-core / io.kotest.matchers.comparables / shouldNotBeEqualComparingTo

shouldNotBeEqualComparingTo

infix fun <T : Comparable<T>> T.shouldNotBeEqualComparingTo(other: T): Unit

Verifies that this is NOT equal to other using compareTo

Opposite of shouldBeEqualComparingTo

This function will check for the result of Comparable.compareTo and result accordingly. This will pass if the value is NOT equal to other (compareTo doesn't return 0).

fun <T : Comparable<T>> T.shouldNotBeEqualComparingTo(other: T, comparator: Comparator<T>): Unit

Verifies that this is NOT equal to other using compare from comparator

This function will check for the result of comparator.compare and result accordingly. This will pass if the value is NOT equal to other (compare doesn't return 0).