doc / / messageEnthaelt


fun <T : Throwable> Assert<T>.messageEnthaelt(expected: Any, vararg otherExpected: Any): Unit
Deprecated: api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0

Creates the assertion that the Throwable's message is not null (see message) contains expected's toString representation and the toString representation of the otherExpected (if given), using a non disjoint search.

It is a shortcut for message { enthaelt.zumindest(1).werte(expected, otherExpected) }

Notice that a runtime check applies which assures that only CharSequence, Number and Char are passed (this function expects Any for your convenience, so that you can mix String and Int for instance).


AssertionError - Might throw an AssertionError in case message is null or does not contain expected or otherExpected.

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.