Discussion :: JUnit MCQs
- To listen to events during a test, which class has to be extended?
A.
org.junit.runner.notification.RunListener
|
B.
org.junit.runner.Listener
|
C.
org.junit.runner.notification.Listener
|
D.
org.junit.runner.RunListener
|
Answer : Option A
Explanation :
To respond to events during a test run, RunListener is extended and the appropriate methods overridden. If a listener throws an exception during a test event, it is removed for the remainder of the test run.
Be The First To Comment