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

toHaveElements

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

Expects that the subject of this expectation (an Iterable) has a next element (Iterator.hasNext returns true).

expect(listOf("A", 1, 3f)).toHaveElements()

fails {
    expect(emptyList<Int>()).toHaveElements()
}

Return
an Expect for the subject of this expectation.

Since
0.17.0