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
Extends JUnit notifier, encapsulates several different types of JUnit listeners, and fires events to listeners.
Since:
2.19
  • Field Details

    • listeners

      private final Collection<org.junit.runner.notification.RunListener> listeners
    • testClassNames

      private final Queue<String> testClassNames
    • skipAfterFailureCount

      private final AtomicInteger skipAfterFailureCount
    • reporter

      private final JUnit4RunListener reporter
    • failFast

      private volatile boolean failFast
  • Constructor Details

    • Notifier

      public Notifier(JUnit4RunListener reporter, int skipAfterFailureCount)
    • Notifier

      private Notifier()
  • Method Details

    • 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 class org.junit.runner.notification.RunNotifier
      Throws:
      org.junit.runner.notification.StoppedByUserException
    • fireTestFailure

      public final void fireTestFailure(org.junit.runner.notification.Failure failure)
      Overrides:
      fireTestFailure in class org.junit.runner.notification.RunNotifier
    • addListener

      public final void addListener(org.junit.runner.notification.RunListener listener)
      Overrides:
      addListener in class org.junit.runner.notification.RunNotifier
    • addListeners

      public final Notifier addListeners(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 class org.junit.runner.notification.RunNotifier
    • removeListeners

      public final void removeListeners()
    • getRemainingTestClasses

      public final Queue<String> getRemainingTestClasses()
    • copyListenersTo

      public final void copyListenersTo(Notifier copyTo)
    • fireStopEvent

      private void fireStopEvent()
      Fire stop even to plugin process and/or call RunNotifier.pleaseStop().