1.

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.RunListenerThe question was posed to me by my college professor while I was bunking the class.This interesting question is from JUnit Test Runners topic in portion Exploring Core JUnit of JUnit

Answer» RIGHT option is (a) org.junit.runner.notification.RunListener

The explanation is: 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.


Discussion

No Comment Found

Related InterviewSolutions