doc / ch.tutteli.atrium.domain.builders.migration

Package ch.tutteli.atrium.domain.builders.migration

Contains helper functions such as asExpect to ease the migration from deprecated functionality to new functionality

Functions

asAssert

fun <T : Any> Expect<T>.asAssert(): Assert<T>
fun <T : Any> Expect<T>.asAssert(assertionCreator: Assert<T>.() -> Unit): Assert<T>

Turns this Expect into an Assert so that you can use functions which have not yet been migrated to Expect.

asExpect

fun <T, A : BaseAssertionPlant<T, *>> A.asExpect(): Expect<T>
fun <T : Any, A : BaseAssertionPlant<T, *>> A.asExpect(assertionCreator: Expect<T>.() -> Unit): A

Turns Assert or AssertionPlantNullable into an Expect so that you can use new functionality which is not available on Assert/AssertionPlantNullable.

asSubExpect

fun <T : Any> asSubExpect(assertionCreatorOrNull: (Assert<T>.() -> Unit)?): (Expect<T>.() -> Unit)?