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

notToHaveElements

fun <E, T : Iterable<E>> Expect<T>.notToHaveElements(): Expect<T> (source)

Expects that the subject of this expectation (an Iterable) does not have a next element (Iterator.hasNext returns false).

expect(setOf<String>()).notToHaveElements()

fails {
    expect(listOf("A", "B")).notToHaveElements()
}

Return
an Expect for the subject of this expectation.

Since
0.17.0