kotest-assertions-core / io.kotest.matchers.string / kotlin.String / shouldNotBeEqualIgnoringCase

shouldNotBeEqualIgnoringCase

infix fun String?.shouldNotBeEqualIgnoringCase(other: String): Unit

Asserts that this is NOT equal to other (ignoring case)

Verifies that this string is NOT equal to other, ignoring case. Opposite of shouldBeEqualIgnoringCase

"foo" shouldNotBeEqualIgnoringCase "FoO" // Assertion fails
"foo" shouldNotBeEqualIgnoringCase "foo" // Assertion fails

"foo" shouldNotBeEqualIgnoringCase "bar" // Assertion passes

See Also

shouldBeEqualIgnoringCase

beEqualIgnoringCase