dave08
11/27/2018, 4:32 PMfun <T : Iterable<E>, E> Assertion.Builder<T>.only(expected: Int, predicate: Assertion.Builder<E>.() -> Unit): Assertion.Builder<T> =
compose("only $expected elements match:") { subject ->
subject.forEach { element ->
get("%s") { element }.apply(predicate)
}
} then {
// I need the amount of assertions that passed here... anyPassed doesn't help here...
if (anyPassed) pass() else fail()
}
@robfletcher