doc / ch.tutteli.atrium.api.infix.en_GB / toHaveElementsAnd

toHaveElementsAnd

infix fun <E, T : Iterable<E>> Expect<T>.toHaveElementsAnd(noDuplicates: noDuplicates): Expect<T> (source)

Expects that the subject of this expectation (an Iterable) does not have duplicate elements.

expect(listOf("A", "B")) toHaveElementsAnd noDuplicates

fails {
    expect(listOf("A", "B", "C", "A")) toHaveElementsAnd noDuplicates
}

Return
an Expect for the subject of this expectation.

Since
0.17.0