1.

The _________ rule can be used to test both exception type and message.(a) Expected(b) ExpectedException(c) CatchException(d) CatchThe question was asked in an internship interview.I would like to ask this question from Testing Exception Handling topic in portion Mastering JUnit of JUnit

Answer» RIGHT ANSWER is (B) ExpectedException

For explanation: Since JUnit 4.7, ExpectedException can be used to TEST both exception type and message.


Discussion

No Comment Found

Related InterviewSolutions