Class RunNotifierSupplier

  • All Implemented Interfaces:
    java.util.function.Supplier<java.util.Optional<org.junit.runner.notification.RunNotifier>>

    @Component("tapirRunNotifierSupplier")
    public class RunNotifierSupplier
    extends java.lang.Object
    implements java.util.function.Supplier<java.util.Optional<org.junit.runner.notification.RunNotifier>>
    Supplies a RunNotifier. The run notifier is passed to TapirJUnitBootstrapper.run(RunNotifier) and is not present when the tapir application is bootstrapped. Therefore we need this Supplier in order to provide the run notifier instance lazily.
    Since:
    2.0.0
    Author:
    Oliver Libutzki <[email protected]>
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Optional<org.junit.runner.notification.RunNotifier> get()
      Returns the optional run notifier
      void set​(org.junit.runner.notification.RunNotifier runNotifier)
      Sets the run notifier.
      • Methods inherited from class java.lang.Object

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

      • RunNotifierSupplier

        public RunNotifierSupplier()
    • Method Detail

      • set

        public void set​(org.junit.runner.notification.RunNotifier runNotifier)
        Sets the run notifier.
        Parameters:
        runNotifier - the runNotifier to use
        Throws:
        java.lang.NullPointerException - thrown if runNotifier is null
      • get

        public java.util.Optional<org.junit.runner.notification.RunNotifier> get()
        Returns the optional run notifier
        Specified by:
        get in interface java.util.function.Supplier<java.util.Optional<org.junit.runner.notification.RunNotifier>>
        Returns:
        the run notifier