Skip to content

Latest commit

 

History

History
16 lines (13 loc) · 396 Bytes

File metadata and controls

16 lines (13 loc) · 396 Bytes
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")