doc / ch.tutteli.atrium.creating / IDownCastBuilder / withLazyAssertions

withLazyAssertions

abstract fun withLazyAssertions(createAssertions: IAssertionPlant<TSub>.() -> Unit): IDownCastBuilder<T, TSub>

Use this method if you want to add several assertions which are checked lazily after the down cast is performed.

Or in other words, the given createAssertions function will be called, which might add additional IAssertions to the newly created IAssertionPlant, which are then lazily checked in cast after the down-cast was performed and before the newly created IAssertionPlant is returned.

Parameters

createAssertions - A function which is called after the down-cast has been performed in cast using the newly created IAssertionPlant as receiver.

Return
This builder to support a fluent-style API.