public class Notifier
extends org.junit.runner.notification.RunNotifier
JUnit notifier
,
encapsulates several different types of JUnit listeners
, and
fires events to listeners.Modifier and Type | Field and Description |
---|---|
private boolean |
failFast |
private java.util.Collection<org.junit.runner.notification.RunListener> |
listeners |
private JUnit4RunListener |
reporter |
private java.util.concurrent.atomic.AtomicInteger |
skipAfterFailureCount |
private java.util.Queue<java.lang.String> |
testClassNames |
Modifier | Constructor and Description |
---|---|
private |
Notifier() |
|
Notifier(JUnit4RunListener reporter,
int skipAfterFailureCount) |
Modifier and Type | Method and Description |
---|---|
void |
addListener(org.junit.runner.notification.RunListener listener) |
Notifier |
addListeners(java.util.Collection<org.junit.runner.notification.RunListener> given) |
Notifier |
addListeners(org.junit.runner.notification.RunListener... given) |
Notifier |
asFailFast(boolean failFast) |
void |
copyListenersTo(Notifier copyTo) |
private void |
fireStopEvent()
Fire stop even to plugin process and/or call
RunNotifier.pleaseStop() . |
void |
fireTestFailure(org.junit.runner.notification.Failure failure) |
void |
fireTestStarted(org.junit.runner.Description description) |
java.util.Queue<java.lang.String> |
getRemainingTestClasses() |
boolean |
isFailFast() |
static Notifier |
pureNotifier() |
void |
removeListener(org.junit.runner.notification.RunListener listener) |
void |
removeListeners() |
private final java.util.Collection<org.junit.runner.notification.RunListener> listeners
private final java.util.Queue<java.lang.String> testClassNames
private final java.util.concurrent.atomic.AtomicInteger skipAfterFailureCount
private final JUnit4RunListener reporter
private volatile boolean failFast
public Notifier(JUnit4RunListener reporter, int skipAfterFailureCount)
private Notifier()
public static Notifier pureNotifier()
public Notifier asFailFast(boolean failFast)
public final boolean isFailFast()
public final void fireTestStarted(org.junit.runner.Description description) throws org.junit.runner.notification.StoppedByUserException
fireTestStarted
in class org.junit.runner.notification.RunNotifier
org.junit.runner.notification.StoppedByUserException
public final void fireTestFailure(org.junit.runner.notification.Failure failure)
fireTestFailure
in class org.junit.runner.notification.RunNotifier
public final void addListener(org.junit.runner.notification.RunListener listener)
addListener
in class org.junit.runner.notification.RunNotifier
public final Notifier addListeners(java.util.Collection<org.junit.runner.notification.RunListener> given)
public final Notifier addListeners(org.junit.runner.notification.RunListener... given)
public final void removeListener(org.junit.runner.notification.RunListener listener)
removeListener
in class org.junit.runner.notification.RunNotifier
public final void removeListeners()
public final java.util.Queue<java.lang.String> getRemainingTestClasses()
public final void copyListenersTo(Notifier copyTo)
private void fireStopEvent()
RunNotifier.pleaseStop()
.