doc / ch.tutteli.atrium.api.cc.de_CH / message

message

fun <T : Throwable> IAssertionPlant<T>.message(assertionCreator: IAssertionPlant<String>.() -> Unit): Unit

Creates an IAssertionPlantNullable for the message of the plant's subject (which is an Throwable) and makes the assertion that message istNichtNull and uses assertionCreator which might create further IAssertions which are lazily evaluated at the end.

Exceptions

AssertionError - Might throw an AssertionError in case message is null or if an additionally created IAssertions (by calling assertionCreator) does not hold.

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