Module org.junit.platform.launcher
Package org.junit.platform.launcher
Class LauncherDiscoveryListener
- java.lang.Object
-
- org.junit.platform.launcher.LauncherDiscoveryListener
-
- All Implemented Interfaces:
EngineDiscoveryListener
@API(status=EXPERIMENTAL, since="1.6") public abstract class LauncherDiscoveryListener extends Object implements EngineDiscoveryListener
Register a concrete implementation of this interface with aLauncherDiscoveryRequestBuilder
to be notified of events that occur during test discovery.All methods in this interface have empty default implementations. Concrete implementations may therefore override one or more of these methods to be notified of the selected events.
JUnit provides default implementations that are created via the factory methods in
LauncherDiscoveryListeners
.The methods declared in this interface are called by the
Launcher
created via theLauncherFactory
during test discovery.- Since:
- 1.6
- See Also:
LauncherDiscoveryListeners
,LauncherDiscoveryRequest.getDiscoveryListener()
-
-
Field Summary
Fields Modifier and Type Field Description static LauncherDiscoveryListener
NOOP
No-op implementation ofLauncherDiscoveryListener
-
Constructor Summary
Constructors Constructor Description LauncherDiscoveryListener()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
engineDiscoveryFinished(UniqueId engineId, EngineDiscoveryResult result)
Called when test discovery has finished for an engine.void
engineDiscoveryStarted(UniqueId engineId)
Called when test discovery is about to be started for an engine.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.junit.platform.engine.EngineDiscoveryListener
selectorProcessed
-
-
-
-
Field Detail
-
NOOP
public static final LauncherDiscoveryListener NOOP
No-op implementation ofLauncherDiscoveryListener
-
-
Method Detail
-
engineDiscoveryStarted
public void engineDiscoveryStarted(UniqueId engineId)
Called when test discovery is about to be started for an engine.- Parameters:
engineId
- the unique ID of the engine descriptor
-
engineDiscoveryFinished
public void engineDiscoveryFinished(UniqueId engineId, EngineDiscoveryResult result)
Called when test discovery has finished for an engine.Exceptions thrown by implementations of this method will cause the complete test discovery to be aborted.
- Parameters:
engineId
- the unique ID of the engine descriptorresult
- the discovery result of the supplied engine- See Also:
EngineDiscoveryResult
-
-