Class Notifier
- java.lang.Object
-
- org.junit.runner.notification.RunNotifier
-
- org.apache.maven.surefire.common.junit4.Notifier
-
public class Notifier extends org.junit.runner.notification.RunNotifierExtendsJUnit notifier, encapsulates several different types ofJUnit listeners, and fires events to listeners.- Since:
- 2.19
-
-
Field Summary
Fields Modifier and Type Field Description private booleanfailFastprivate java.util.Collection<org.junit.runner.notification.RunListener>listenersprivate JUnit4RunListenerreporterprivate java.util.concurrent.atomic.AtomicIntegerskipAfterFailureCountprivate java.util.Queue<java.lang.String>testClassNames
-
Constructor Summary
Constructors Modifier Constructor Description privateNotifier()Notifier(JUnit4RunListener reporter, int skipAfterFailureCount)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddListener(org.junit.runner.notification.RunListener listener)NotifieraddListeners(java.util.Collection<org.junit.runner.notification.RunListener> given)NotifieraddListeners(org.junit.runner.notification.RunListener... given)voidasFailFast(boolean enableFailFast)voidcopyListenersTo(Notifier copyTo)private voidfireStopEvent()Fire stop even to plugin process and/or callRunNotifier.pleaseStop().voidfireTestFailure(org.junit.runner.notification.Failure failure)voidfireTestStarted(org.junit.runner.Description description)java.util.Queue<java.lang.String>getRemainingTestClasses()booleanisFailFast()static NotifierpureNotifier()voidremoveListener(org.junit.runner.notification.RunListener listener)voidremoveListeners()
-
-
-
Field Detail
-
listeners
private final java.util.Collection<org.junit.runner.notification.RunListener> listeners
-
testClassNames
private final java.util.Queue<java.lang.String> testClassNames
-
skipAfterFailureCount
private final java.util.concurrent.atomic.AtomicInteger skipAfterFailureCount
-
reporter
private final JUnit4RunListener reporter
-
failFast
private volatile boolean failFast
-
-
Constructor Detail
-
Notifier
public Notifier(JUnit4RunListener reporter, int skipAfterFailureCount)
-
Notifier
private Notifier()
-
-
Method Detail
-
pureNotifier
public static Notifier pureNotifier()
-
asFailFast
public void asFailFast(boolean enableFailFast)
-
isFailFast
public final boolean isFailFast()
-
fireTestStarted
public final void fireTestStarted(org.junit.runner.Description description) throws org.junit.runner.notification.StoppedByUserException- Overrides:
fireTestStartedin classorg.junit.runner.notification.RunNotifier- Throws:
org.junit.runner.notification.StoppedByUserException
-
fireTestFailure
public final void fireTestFailure(org.junit.runner.notification.Failure failure)
- Overrides:
fireTestFailurein classorg.junit.runner.notification.RunNotifier
-
addListener
public final void addListener(org.junit.runner.notification.RunListener listener)
- Overrides:
addListenerin classorg.junit.runner.notification.RunNotifier
-
addListeners
public final Notifier addListeners(java.util.Collection<org.junit.runner.notification.RunListener> given)
-
addListeners
public final Notifier addListeners(org.junit.runner.notification.RunListener... given)
-
removeListener
public final void removeListener(org.junit.runner.notification.RunListener listener)
- Overrides:
removeListenerin classorg.junit.runner.notification.RunNotifier
-
removeListeners
public final void removeListeners()
-
getRemainingTestClasses
public final java.util.Queue<java.lang.String> getRemainingTestClasses()
-
copyListenersTo
public final void copyListenersTo(Notifier copyTo)
-
fireStopEvent
private void fireStopEvent()
Fire stop even to plugin process and/or callRunNotifier.pleaseStop().
-
-