fun createAndAddAssertionToPlant(subType: KClass<TSub>, subjectPlant: IBaseAssertionPlant<T?, *>, failingAssertion: IAssertion, assertionCreator: IAssertionPlant<TSub>.() -> Unit): Unit
Wraps the assertions which might be created by assertionCreator into an ExplanatoryAssertionGroup and adds it to the given subjectPlant.
subType
- The type to which the subjectPlant's subject should have been
down-casted.
subjectPlant
- The plant to which additional assertions would have been added.
assertionCreator
- The lambda which could have created subsequent assertions for the down-casted
IAssertionPlant.subject.
AssertionError
- Might throw an AssertionError depending on the subjectPlant.