doc / ch.tutteli.atrium.assertions.any.typetransformation / AnyTypeTransformation / TypeTransformationFailureHandler / createAndAddAssertionToPlant

createAndAddAssertionToPlant

abstract fun createAndAddAssertionToPlant(warningTransformationFailed: Translatable, subjectPlant: BaseAssertionPlant<T?, *>, failingAssertion: Assertion, assertionCreator: AssertionPlant<TSub>.() -> Unit): Unit

Makes something with the given assertionCreator lambda; might add assertions to subjectPlant.

Parameters

warningTransformationFailed - Explains why the subjectPlant's subject could not be should have been down-casted. subjectPlant - The plant to which additional assertions would have been added. failingAssertion - The failing Assertion representing that subjectPlant's subject can be transformed to TSub. assertionCreator - The lambda which could have created subsequent assertions for the transformed AssertionPlant.subject.

Exceptions

AssertionError - Might throw an AssertionError depending on the subjectPlant.