capture

inline fun <T : Any> capture(lst: MutableList<T>): T


inline fun <T : Any> capture(lst: CapturingSlot<T>): T

Captures a non-nullable value to a CapturingSlot.

See also

io.mockk.slot

to create capturing slot.

for nullable arguments.

Samples