open fun <T, R> changeToNullableSubject(originalPlant: BaseAssertionPlant<T, *>, subjectProvider: () -> R): AssertionPlantNullable<R>
Creates a new AssertionPlantNullable based on the given subjectProvider whereas the AssertionPlant delegates assertion checking to the given originalPlant.
This method is useful if you want to make feature assertion(s) but you do not want that the feature is shown up
in reporting. For instance, if a class can behave as another class (e.g. Sequence::asIterable
) or you want to
hide a conversion (e.g. Int::toChar
) then you can use this function.
Notice, if you do not require the resulting AssertionPlantNullable but merely want to make feature assertions so that you can use them as part of a bigger assertion, then use collector instead.
open fun <T, R : Any> changeToNullableSubject(originalAssertionCreator: Expect<T>, transformation: (T) -> R): Expect<R>