java.lang.Object | |
↳ | org.junit.runner.notification.RunNotifier |
If you write custom runners, you may need to notify JUnit of your progress running tests.
Do this by invoking the RunNotifier
passed to your implementation of
run(RunNotifier)
. Future evolution of this class is likely to
move fireTestRunStarted(Description)
and fireTestRunFinished(Result)
to a separate class since they should only be called once per run.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Internal use only.
| |||||||||||
Internal use only
| |||||||||||
Invoke to tell listeners that an atomic test flagged that it assumed
something false.
| |||||||||||
Invoke to tell listeners that an atomic test failed.
| |||||||||||
Invoke to tell listeners that an atomic test finished.
| |||||||||||
Invoke to tell listeners that an atomic test was ignored.
| |||||||||||
Do not invoke.
| |||||||||||
Do not invoke.
| |||||||||||
Invoke to tell listeners that an atomic test is about to start.
| |||||||||||
Ask that the tests run stop before starting the next test.
| |||||||||||
Internal use only
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Internal use only. The Result's listener must be first.
Invoke to tell listeners that an atomic test flagged that it assumed something false.
failure | the description of the test that failed and the
AssumptionViolatedException thrown
|
---|
Invoke to tell listeners that an atomic test failed.
failure | the description of the test that failed and the exception thrown |
---|
Invoke to tell listeners that an atomic test finished. Always invoke
fireTestFinished(Description)
if you invoke fireTestStarted(Description)
as listeners are likely to expect them to come in pairs.
description | the description of the test that finished |
---|
Invoke to tell listeners that an atomic test was ignored.
description | the description of the ignored test |
---|
Invoke to tell listeners that an atomic test is about to start.
description | the description of the atomic test (generally a class and method name) |
---|
StoppedByUserException | thrown if a user has requested that the test run stop |
---|
Ask that the tests run stop before starting the next test. Phrased politely because
the test currently running will not be interrupted. It seems a little odd to put this
functionality here, but the RunNotifier
is the only object guaranteed
to be shared amongst the many runners involved.