id | title | sidebar_label | slug |
---|---|---|---|
exceptions |
Testing Exceptions |
Exceptions |
exceptions.html |
Testing for exceptions is easy with Kotest:
val exception = shouldThrow<IllegalAccessException> {
// code in here that you expect to throw an IllegalAccessException
}
exception.message should startWith("Something went wrong")