capture

inline fun <T> ArgMatchersScope.capture(container: Capture<T>, matcher: T = any()): T

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


inline fun <T> ArgMatchersScope.capture(list: MutableList<T>, matcher: T = any()): T

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