Class RunNotifierSupplier
- java.lang.Object
-
- de.bmiag.tapir.junitexecution.bootstrap.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 aRunNotifier
. The run notifier is passed toTapirJUnitBootstrapper.run(RunNotifier)
and is not present when the tapir application is bootstrapped. Therefore we need thisSupplier
in order to provide the run notifier instance lazily.- Since:
- 2.0.0
- Author:
- Oliver Libutzki <[email protected]>
-
-
Constructor Summary
Constructors Constructor Description RunNotifierSupplier()
-
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 notifiervoid
set(org.junit.runner.notification.RunNotifier runNotifier)
Sets the run notifier.
-
-
-
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 interfacejava.util.function.Supplier<java.util.Optional<org.junit.runner.notification.RunNotifier>>
- Returns:
- the run notifier
-
-