strikt-core / strikt.assertions / withElementAt

withElementAt

fun <T : Iterable<E>, E> Builder<T>.withElementAt(index: Int, block: Builder<E>.() -> Unit): Builder<T>

Runs a group of assertions on the element at index in the subject iterable.

Parameters

block - a closure that can perform multiple assertions that will all be evaluated regardless of whether preceding ones pass or fail.

Return
this builder, to facilitate chaining.