Class 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
    Author:
    Tibor Digana (tibor17)
    • Constructor Summary

      Constructors 
      Constructor Description
      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)  
      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()  
      • Methods inherited from class org.junit.runner.notification.RunNotifier

        addFirstListener, fireTestAssumptionFailed, fireTestFinished, fireTestIgnored, fireTestRunFinished, fireTestRunStarted, fireTestSuiteFinished, fireTestSuiteStarted, pleaseStop
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Notifier

        public Notifier​(JUnit4RunListener reporter,
                        int skipAfterFailureCount)
    • 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 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​(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 class org.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)