doc / ch.tutteli.atrium.api.fluent.en_GB / mismatches

mismatches

fun <T : CharSequence> Expect<T>.mismatches(expected: Regex): Expect<T> (source)
Deprecated: Use notToMatch; will be removed with 1.0.0 at the latest

Expects that the subject of this expectation (a CharSequence) mismatches the given expected.

In contrast to containsNot.regex it does not look for a partial match but for an entire match.

expect("ABC").mismatches("A".toRegex()) // subject isn't fully matched

fails { // because subject is fully matched, use containsNot.regex for partial matching
    expect("ABC").mismatches("A(B)?C".toRegex())
}

Return
an Expect for the subject of this expectation.

Since
0.9.0