Tag: junit

63 votes
30 answers
1.6K views
How do you assert that a certain exception is thrown in JUnit 4 tests?

How can I use JUnit4 idiomatically to test that some code throws an exception? While I can certainly do somet

avatar
Hallie
0 1 0 9
asked 07 September, 2021