capture

fun <T> MokkeryMatcherScope.capture(container: Capture<T>, matcher: T = any()): T(source)

Matches an argument with matcher and captures matching arguments into capture. Arguments are captured only if all other matchers match.


fun <T> MokkeryMatcherScope.capture(list: MutableList<T>, matcher: T = any()): T(source)

Matches an argument with matcher and captures matching arguments into list. Arguments are captured only if all other matchers match.