doc / ch.tutteli.atrium.domain.builders.utils / ArgumentMapperBuilder

ArgumentMapperBuilder

class ArgumentMapperBuilder<out T>
Deprecated: Use ArgumentMapperBuilder, mapArguments respectively, from atrium-logic; will be removed with 1.0.0

Builder to map variable length arguments formulated as (first: T, vararg others : T) to something else.

Constructors

<init>

ArgumentMapperBuilder(first: T, others: Array<out T>)

Builder to map variable length arguments formulated as (first: T, vararg others : T) to something else.

Properties

first

val first: T

others

val others: Array<out T>

Functions

to

fun <R> to(mapper: (T) -> R): Pair<R, Array<out R>>

Maps each argument to the given type R by using the given mapper

toAssert

fun <R : Any> toAssert(assertionCreator: Assert<R>.(T) -> Unit): Pair<Assert<R>.() -> Unit, Array<Assert<R>.() -> Unit>>

Maps each argument to an Assert<R> lambda with receiver using the given assertionCreator (passing in the argument).

toAssertionPlantNullable

fun <R> toAssertionPlantNullable(assertionCreator: AssertionPlantNullable<R>.(T) -> Unit): Pair<AssertionPlantNullable<R>.() -> Unit, Array<AssertionPlantNullable<R>.() -> Unit>>

Maps each argument to an AssertionPlantNullable<R> lambda with receiver by using the given assertionCreator (passing in the argument).

toExpect

fun <R> toExpect(assertionCreator: Expect<R>.(T) -> Unit): Pair<Expect<R>.() -> Unit, Array<Expect<R>.() -> Unit>>

Maps each argument to an Expect<R> lambda with receiver using the given assertionCreator (passing in the argument).

Extension Functions

toNullOr

fun <T : Any> ArgumentMapperBuilder<T?>.toNullOr(): ArgumentToNullOrMapperBuilder<T>

Maps each argument to null if it is already null and if not, then ...