I need an `assertFailsWith<ExceptionType> { }` tha...
# test
z
I need an
assertFailsWith<ExceptionType> { }
that also asserts against the exception message. example: I want to catch
RuntimeException("chicken")
that would only work with
RuntimeException
instances that have the message
"chicken"
.
"beef"
would not match, for example. does something like this exist in the standard test library?
r
assertFailsWith
returns the exception, you can then assert on that one further
👍 1