doc / ch.tutteli.atrium.domain.creating.any.typetransformation / AnyTypeTransformation / ParameterObject / <init>

<init>

ParameterObject(description: Translatable, representation: Any, subjectPlant: BaseAssertionPlant<S?, *>, assertionCreator: AssertionPlant<T>.() -> Unit, warningTransformationFailed: Translatable)

A parameter object which contains all necessary information to report a failure

Parameters

description - Describes what assertion the type transformation represents, e.g. is a in case of a down cast.

representation - The representation of the expected result, e.g. Int::class in case of a down cast from Number to Int.

subjectPlant - The plant to which the assertion (including additional assertions created by assertionCreator) should be added.

assertionCreator - The lambda which can create subsequent assertions for the transformed AssertionPlant.subject in case the type transformation succeeds

warningTransformationFailed - Explains why the subjectPlant's subject could not be transformed to the desired type.