doc / ch.tutteli.atrium.logic.utils / ArgumentToNullOrMapperBuilder / toExpect

toExpect

inline fun <R : Any> toExpect(crossinline assertionCreator: Expect<R>.(T) -> Unit): Pair<(Expect<R>.() -> Unit)?, Array<(Expect<R>.() -> Unit)?>> (source)

Maps each argument to null if it is already null and if not, then to an Expect<R> lambda with receiver by using the given assertionCreator (passing in the argument).

Returns
The mapped arguments.