atrium-domain-builders-jvm / ch.tutteli.atrium.domain.builders.creating / AnyTypeTransformationAssertionsBuilder

AnyTypeTransformationAssertionsBuilder

object AnyTypeTransformationAssertionsBuilder (source)
Deprecated: Switch from `Assert` to `Expect` and use `ExpectImpl` instead; will be removed with 1.0.0

Delegates inter alia to the implementation of AnyTypeTransformationAssertions. In detail, it implements AnyTypeTransformationAssertions by delegating to anyTypeTransformationAssertions which in turn delegates to the implementation via loadSingleService.

Properties

failureHandlers

val failureHandlers: AnyTypeTransformationFailureHandlerFactoryBuilder

Returns AnyTypeTransformationFailureHandlerFactoryBuilder which inter alia delegates to the implementation of FailureHandlerFactory.

Functions

downCast

fun <T : Any, TSub : T> downCast(description: <ERROR CLASS>, subType: KClass<TSub>, subjectPlant: <ERROR CLASS><T?, out <ERROR CLASS>>, assertionCreator: <ERROR CLASS><TSub>.() -> Unit, failureHandler: <ERROR CLASS><T, TSub>): <ERROR CLASS>

isA

fun <TSub : Any> isA(plant: <ERROR CLASS><Any>, subType: KClass<TSub>, assertionCreator: <ERROR CLASS><TSub>.() -> Unit): <ERROR CLASS>

isNotNull

fun <T : Any> isNotNull(plant: <ERROR CLASS><T?>, type: KClass<T>, assertionCreator: <ERROR CLASS><T>.() -> Unit): <ERROR CLASS>

transform

fun <S : Any, T : Any> transform(parameterObject: <ERROR CLASS><S, T>, canBeTransformed: (S) -> Boolean, transform: (S) -> T, failureHandler: <ERROR CLASS><S, T>): <ERROR CLASS>

Extension Functions

asExpect

fun <T, A> A.asExpect(): <ERROR CLASS><T>
fun <T : Any, A> A.asExpect(assertionCreator: <ERROR CLASS><T>.() -> Unit): A

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