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.RunNotifier
ExtendsJUnit notifier
, encapsulates several different types ofJUnit listeners
, and fires events to listeners.- Since:
- 2.19
-
-
Field Summary
Fields Modifier and Type Field 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
-
Constructor Summary
Constructors Modifier Constructor Description private
Notifier()
Notifier(JUnit4RunListener reporter, int skipAfterFailureCount)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method 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)
void
asFailFast(boolean enableFailFast)
void
copyListenersTo(Notifier copyTo)
private void
fireStopEvent()
Fire stop even to plugin process and/or callRunNotifier.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()
-
-
-
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:
fireTestStarted
in classorg.junit.runner.notification.RunNotifier
- Throws:
org.junit.runner.notification.StoppedByUserException
-
fireTestFailure
public final void fireTestFailure(org.junit.runner.notification.Failure failure)
- Overrides:
fireTestFailure
in classorg.junit.runner.notification.RunNotifier
-
addListener
public final void addListener(org.junit.runner.notification.RunListener listener)
- Overrides:
addListener
in 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:
removeListener
in 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()
.
-
-