Introduce a new Throwable.assertHasNotBlankMessage function checking that this throwable has a not blank message.
import kotools.assert.assertFailsWith
/** Asserts that this exception has a not blank message. */
fun <A : Throwable> A.assertHasNotBlankMessage(): Unit = TODO()
fun test() {
assertFailsWith<Throwable> { /* ... */ }
.assertHasNotBlankMessage()
}
Description
The problem
For checking if an exception has a message, users have to do the following boilerplate code in each test:
The solution
Introduce a new
Throwable.assertHasNotBlankMessage
function checking that this throwable has a not blank message.Checklist
Work in progress
section in changelog.