withNullableArg
inline fun <T : Any> withNullableArg(noinline assertionErrorLogger: (AssertionError) -> Unit = { e -> e.printStackTrace() }, noinline captureBlock: MockKAssertScope.(T?) -> Unit): T(source)
Captures nullable argument and verifies it with provided block.
Return
the captured argument
Parameters
logAllAssertionErrors
if true, all assertion errors inside the captureBlock will be logged. This can cause multiple errors to be logged if the matcher is evaluated multiple times.
captureBlock
block that performs assertions on the captured argument.