Home / CSE MCQs / JUnit MCQs :: Discussion

Discussion :: JUnit MCQs

  1. The _________ rule can be used to test both exception type and message.
  2. A.
    Expected
    B.
    ExpectedException
    C.
    CatchException
    D.
    Catch

    View Answer

    Workspace

    Answer : Option B

    Explanation :

    Since JUnit 4.7, ExpectedException can be used to test both exception type and message.


Be The First To Comment