class ExplanatoryDownCastFailureHandler<T : Any, TSub : T> : DownCastFailureHandler<T, TSub>
Represents an AnyNarrow.DownCastFailureHandler which wraps subsequent assertions into an ExplanatoryAssertionGroup.
T
- The type of the AssertionPlant.subject.
T
- The type to which the AssertionPlant.subject should have been down-casted.
ExplanatoryDownCastFailureHandler()
Represents an AnyNarrow.DownCastFailureHandler which wraps subsequent assertions into an ExplanatoryAssertionGroup. |
fun createAndAddAssertionToPlant(subType: KClass<TSub>, subjectPlant: BaseAssertionPlant<T?, *>, failingAssertion: Assertion, assertionCreator: AssertionPlant<TSub>.() -> Unit): Unit
Wraps the assertions which might be created by assertionCreator into an ExplanatoryAssertionGroup and adds it to the given subjectPlant. |