doc / ch.tutteli.atrium.api.cc.en_UK / isA

isA

inline fun <reified TSub : Any> IAssertionPlant<Any>.isA(noinline assertionCreator: IAssertionPlant<TSub>.() -> Unit): Unit

Makes the assertion that IAssertionPlant.subject is a TSub (the same type or a sub-type) and if so, uses assertionCreator which could create further assertions which are added as a group.

Exceptions

AssertionError - Might throw an AssertionError if the assertion made is not correct.

Return
Notice, that this assertion function cannot provide a fluent API because it depends on whether the first assertion (IAssertionPlant.subject is a TSub) holds or not. Define subsequent assertions via the assertionCreator lambda.