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

message

fun <T : Throwable> Assert<T>.message(assertionCreator: Assert<String>.() -> Unit): Unit
Deprecated: Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.

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

Exceptions

AssertionError - Might throw an AssertionError in case message is null or if an additionally created Assertions (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 is not null) holds or not. Define subsequent assertions via the assertionCreator lambda.