JUnit 4 Expected Exception type

Posted by Editorial Staff | Updated on

JUnit 4 Expected Exception type. You could either use expected in @Test annotation or provide an explicit catch block and issue a fail if the program flow is not as expected.

If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.

Related Questions & Answers