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


inline infix fun <reified E, T : Iterable<E>> Expect<T>.containsExactlyElementsOf(expectedIterableLike: IterableLike): Expect<T> (source)
Deprecated: Use toContainExactlyElementsOf; will be removed with 1.0.0 at the latest

Expects that the subject of this expectation (an Iterable) contains only elements of expectedIterableLike in same order

It is a shortcut for 'contains.inOrder.only.elementsOf(anotherList)'

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.


IllegalArgumentException - in case expectedIterableLike is not an Iterable, Sequence or one of the Array types or the given expectedIterableLike does not have elements (is empty).

an Expect for the subject of this expectation.