interface IDownCastFailureHandler<T : Any, TSub : T>
A handler which decides how the lambda -- which could have created subsequent assertions for the down-casted IAssertionPlant.subject, in case the down-cast of the IAssertionPlant.subject to type TSub did not have fail -- should be used in reporting.
T
- The type of IAssertionPlant.subject.
TSub
- The type to which IAssertionPlant.subject should have been be down-casted, hence needs to be a
subtype of T.
abstract fun createAndAddAssertionToPlant(subType: KClass<TSub>, subjectPlant: IBaseAssertionPlant<T?, *>, failingAssertion: IAssertion, assertionCreator: IAssertionPlant<TSub>.() -> Unit): Unit
Makes something with the given assertionCreator lambda; might add assertions to subjectPlant. |
class ExplanatoryDownCastFailureHandler<T : Any, TSub : T> : IDownCastFailureHandler<T, TSub>
Represents an IAnyNarrow.IDownCastFailureHandler which wraps subsequent assertions into an ExplanatoryAssertionGroup. |