strikt-core / strikt.assertions / withLast

withLast

fun <T : Iterable<E>, E> Builder<T>.withLast(block: Builder<E>.() -> Unit): Builder<T>

Runs a group of assertions on the last element 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.