exactly
Asserts on each item in the iterable, passing if exactly times items pass. The given lambda will be run for each item.
assertThat(listOf(-1, 1, 2)).exactly(2) { it.isPositive() }Content copied to clipboard
Asserts on each item in the sequence, passing if exactly times items pass. The given lambda will be run for each item.
assertThat(sequenceOf(-1, 1, 2)).exactly(2) { it.isPositive() }Content copied to clipboard