doc / ch.tutteli.atrium.domain.creating.any.typetransformation.creators / AnyTypeTransformationAssertions

AnyTypeTransformationAssertions

interface AnyTypeTransformationAssertions
Deprecated: Switch from `Assert` to `Expect` and use AnyAssertions instead; will be removed with 1.0.0

Defines the minimum set of assertion functions representing a type transformation, which an implementation of the domain of Atrium has to provide.

Functions

downCast

abstract fun <T : Any, TSub : T> downCast(description: Translatable, subType: KClass<TSub>, subjectPlant: BaseAssertionPlant<T?, *>, assertionCreator: AssertionPlant<TSub>.() -> Unit, failureHandler: AnyTypeTransformation.FailureHandler<T, TSub>): Unit

isA

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

isNotNull

abstract fun <T : Any> isNotNull(plant: AssertionPlantNullable<T?>, type: KClass<T>, assertionCreator: AssertionPlant<T>.() -> Unit): Unit

transform

abstract fun <S : Any, T : Any> transform(parameterObject: AnyTypeTransformation.ParameterObject<S, T>, canBeTransformed: (S) -> Boolean, transform: (S) -> T, failureHandler: AnyTypeTransformation.FailureHandler<S, T>): Unit

Inheritors

AnyTypeTransformationAssertionsBuilder

object AnyTypeTransformationAssertionsBuilder : AnyTypeTransformationAssertions

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.