doc / ch.tutteli.atrium / AtriumFactory / newDownCastBuilder

newDownCastBuilder

inline fun <reified TSub : T, T : Any> newDownCastBuilder(description: String, commonFields: CommonFields<T?>): DownCastBuilder<T, TSub> (source)

Prepares a down cast; use DownCastBuilder.cast to perform the down cast.

Call DownCastBuilder.withLazyAssertions/DownCastBuilder.withNullRepresentation to specialise the down-cast.

Parameters

description - The description of the down-cast.

commonFields - The commonFields which will be used to create a DownCastBuilder.

Return
The newly created DownCastBuilder.

See Also

DownCastBuilder

fun <TSub : T, T : Any> newDownCastBuilder(description: String, clazz: KClass<TSub>, commonFields: CommonFields<T?>): DownCastBuilder<T, TSub> (source)

Use the overload with reified type parameter whenever possible.

Prepares a down cast; use DownCastBuilder.cast to perform the down cast.

Call DownCastBuilder.withLazyAssertions/DownCastBuilder.withNullRepresentation to specialise the down-cast.

Parameters

description - The description of the down-cast.

commonFields - The commonFields which will be used to create a DownCastBuilder.

Return
The newly created DownCastBuilder.

See Also

DownCastBuilder