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

isNotIn

fun <T> Expect<T>.isNotIn(expected: IterableLike): Expect<T> (source)
Deprecated: Use notToBeIn; will be removed with 1.0.0 at the latest

Expects that the subject of this expectation is not (equal to) any value of expected.

Notice that a runtime check applies which assures that only Iterable, Sequence or one of the Array types are passed. This function expects IterableLike (which is a typealias for Any) to avoid cluttering the API.

expect(99).isNotIn(listOf(1, 2, 3, 4))

fails {
    expect(1).isNotIn(listOf(1, 2, 3, 4))
}

Exceptions

IllegalArgumentException - in case the iterable is empty.

Return
an Expect for the subject of this expectation.

Since
0.13.0