Henrik Gustafsson

View Original

Checking for exceptions in JUnit

Sometimes I just want to check for an exception without

  1. Exiting the test case
  2. Adding a lot of exception handling crap in the test code.

Java 8 to the rescue!

See this content in the original post