Package org.junit.platform.launcher.core
Class DefaultLauncherConfig
- java.lang.Object
-
- org.junit.platform.launcher.core.DefaultLauncherConfig
-
- All Implemented Interfaces:
LauncherConfig
class DefaultLauncherConfig extends java.lang.Object implements LauncherConfig
Default implementation of theLauncherConfigAPI.- Since:
- 1.3
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.junit.platform.launcher.core.LauncherConfig
LauncherConfig.Builder
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.Collection<LauncherDiscoveryListener>additionalLauncherDiscoveryListenersprivate java.util.Collection<LauncherSessionListener>additionalLauncherSessionListenersprivate java.util.Collection<PostDiscoveryFilter>additionalPostDiscoveryFiltersprivate java.util.Collection<TestEngine>additionalTestEnginesprivate java.util.Collection<TestExecutionListener>additionalTestExecutionListenersprivate booleanlauncherDiscoveryListenerAutoRegistrationEnabledprivate booleanlauncherSessionListenerAutoRegistrationEnabledprivate booleanpostDiscoveryFilterAutoRegistrationEnabledprivate booleantestEngineAutoRegistrationEnabledprivate booleantestExecutionListenerAutoRegistrationEnabled-
Fields inherited from interface org.junit.platform.launcher.core.LauncherConfig
DEFAULT
-
-
Constructor Summary
Constructors Constructor Description DefaultLauncherConfig(boolean testEngineAutoRegistrationEnabled, boolean launcherSessionListenerAutoRegistrationEnabled, boolean launcherDiscoveryListenerAutoRegistrationEnabled, boolean testExecutionListenerAutoRegistrationEnabled, boolean postDiscoveryFilterAutoRegistrationEnabled, java.util.Collection<TestEngine> additionalTestEngines, java.util.Collection<LauncherSessionListener> additionalLauncherSessionListeners, java.util.Collection<LauncherDiscoveryListener> additionalLauncherDiscoveryListeners, java.util.Collection<TestExecutionListener> additionalTestExecutionListeners, java.util.Collection<PostDiscoveryFilter> additionalPostDiscoveryFilters)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Collection<LauncherDiscoveryListener>getAdditionalLauncherDiscoveryListeners()Get the collection of additional launcher discovery listeners that should be added to theLauncher.java.util.Collection<LauncherSessionListener>getAdditionalLauncherSessionListeners()Get the collection of additional launcher session listeners that should be added to theLauncher.java.util.Collection<PostDiscoveryFilter>getAdditionalPostDiscoveryFilters()Get the collection of additional post discovery filters that should be added to theLauncher.java.util.Collection<TestEngine>getAdditionalTestEngines()Get the collection of additional test engines that should be added to theLauncher.java.util.Collection<TestExecutionListener>getAdditionalTestExecutionListeners()Get the collection of additional test execution listeners that should be added to theLauncher.booleanisLauncherDiscoveryListenerAutoRegistrationEnabled()Determine if launcher discovery listeners should be discovered at runtime using theServiceLoadermechanism and automatically registered.booleanisLauncherSessionListenerAutoRegistrationEnabled()Determine if launcher session listeners should be discovered at runtime using theServiceLoadermechanism and automatically registered.booleanisPostDiscoveryFilterAutoRegistrationEnabled()Determine if post discovery filters should be discovered at runtime using theServiceLoadermechanism and automatically registered.booleanisTestEngineAutoRegistrationEnabled()Determine if test engines should be discovered at runtime using theServiceLoadermechanism and automatically registered.booleanisTestExecutionListenerAutoRegistrationEnabled()Determine if test execution listeners should be discovered at runtime using theServiceLoadermechanism and automatically registered.
-
-
-
Field Detail
-
testEngineAutoRegistrationEnabled
private final boolean testEngineAutoRegistrationEnabled
-
launcherSessionListenerAutoRegistrationEnabled
private final boolean launcherSessionListenerAutoRegistrationEnabled
-
launcherDiscoveryListenerAutoRegistrationEnabled
private final boolean launcherDiscoveryListenerAutoRegistrationEnabled
-
testExecutionListenerAutoRegistrationEnabled
private final boolean testExecutionListenerAutoRegistrationEnabled
-
postDiscoveryFilterAutoRegistrationEnabled
private final boolean postDiscoveryFilterAutoRegistrationEnabled
-
additionalTestEngines
private final java.util.Collection<TestEngine> additionalTestEngines
-
additionalLauncherSessionListeners
private final java.util.Collection<LauncherSessionListener> additionalLauncherSessionListeners
-
additionalLauncherDiscoveryListeners
private final java.util.Collection<LauncherDiscoveryListener> additionalLauncherDiscoveryListeners
-
additionalTestExecutionListeners
private final java.util.Collection<TestExecutionListener> additionalTestExecutionListeners
-
additionalPostDiscoveryFilters
private final java.util.Collection<PostDiscoveryFilter> additionalPostDiscoveryFilters
-
-
Constructor Detail
-
DefaultLauncherConfig
DefaultLauncherConfig(boolean testEngineAutoRegistrationEnabled, boolean launcherSessionListenerAutoRegistrationEnabled, boolean launcherDiscoveryListenerAutoRegistrationEnabled, boolean testExecutionListenerAutoRegistrationEnabled, boolean postDiscoveryFilterAutoRegistrationEnabled, java.util.Collection<TestEngine> additionalTestEngines, java.util.Collection<LauncherSessionListener> additionalLauncherSessionListeners, java.util.Collection<LauncherDiscoveryListener> additionalLauncherDiscoveryListeners, java.util.Collection<TestExecutionListener> additionalTestExecutionListeners, java.util.Collection<PostDiscoveryFilter> additionalPostDiscoveryFilters)
-
-
Method Detail
-
isTestEngineAutoRegistrationEnabled
public boolean isTestEngineAutoRegistrationEnabled()
Description copied from interface:LauncherConfigDetermine if test engines should be discovered at runtime using theServiceLoadermechanism and automatically registered.- Specified by:
isTestEngineAutoRegistrationEnabledin interfaceLauncherConfig- Returns:
trueif test engines should be automatically registered
-
isLauncherSessionListenerAutoRegistrationEnabled
public boolean isLauncherSessionListenerAutoRegistrationEnabled()
Description copied from interface:LauncherConfigDetermine if launcher session listeners should be discovered at runtime using theServiceLoadermechanism and automatically registered.- Specified by:
isLauncherSessionListenerAutoRegistrationEnabledin interfaceLauncherConfig- Returns:
trueif launcher session listeners should be automatically registered
-
isLauncherDiscoveryListenerAutoRegistrationEnabled
public boolean isLauncherDiscoveryListenerAutoRegistrationEnabled()
Description copied from interface:LauncherConfigDetermine if launcher discovery listeners should be discovered at runtime using theServiceLoadermechanism and automatically registered.- Specified by:
isLauncherDiscoveryListenerAutoRegistrationEnabledin interfaceLauncherConfig- Returns:
trueif launcher discovery listeners should be automatically registered
-
isTestExecutionListenerAutoRegistrationEnabled
public boolean isTestExecutionListenerAutoRegistrationEnabled()
Description copied from interface:LauncherConfigDetermine if test execution listeners should be discovered at runtime using theServiceLoadermechanism and automatically registered.- Specified by:
isTestExecutionListenerAutoRegistrationEnabledin interfaceLauncherConfig- Returns:
trueif test execution listeners should be automatically registered
-
isPostDiscoveryFilterAutoRegistrationEnabled
public boolean isPostDiscoveryFilterAutoRegistrationEnabled()
Description copied from interface:LauncherConfigDetermine if post discovery filters should be discovered at runtime using theServiceLoadermechanism and automatically registered.- Specified by:
isPostDiscoveryFilterAutoRegistrationEnabledin interfaceLauncherConfig- Returns:
trueif post discovery filters should be automatically registered
-
getAdditionalTestEngines
public java.util.Collection<TestEngine> getAdditionalTestEngines()
Description copied from interface:LauncherConfigGet the collection of additional test engines that should be added to theLauncher.- Specified by:
getAdditionalTestEnginesin interfaceLauncherConfig- Returns:
- the collection of additional test engines; never
nullbut potentially empty
-
getAdditionalLauncherSessionListeners
public java.util.Collection<LauncherSessionListener> getAdditionalLauncherSessionListeners()
Description copied from interface:LauncherConfigGet the collection of additional launcher session listeners that should be added to theLauncher.- Specified by:
getAdditionalLauncherSessionListenersin interfaceLauncherConfig- Returns:
- the collection of additional launcher session listeners; never
nullbut potentially empty
-
getAdditionalLauncherDiscoveryListeners
public java.util.Collection<LauncherDiscoveryListener> getAdditionalLauncherDiscoveryListeners()
Description copied from interface:LauncherConfigGet the collection of additional launcher discovery listeners that should be added to theLauncher.- Specified by:
getAdditionalLauncherDiscoveryListenersin interfaceLauncherConfig- Returns:
- the collection of additional launcher discovery listeners; never
nullbut potentially empty
-
getAdditionalTestExecutionListeners
public java.util.Collection<TestExecutionListener> getAdditionalTestExecutionListeners()
Description copied from interface:LauncherConfigGet the collection of additional test execution listeners that should be added to theLauncher.- Specified by:
getAdditionalTestExecutionListenersin interfaceLauncherConfig- Returns:
- the collection of additional test execution listeners; never
nullbut potentially empty
-
getAdditionalPostDiscoveryFilters
public java.util.Collection<PostDiscoveryFilter> getAdditionalPostDiscoveryFilters()
Description copied from interface:LauncherConfigGet the collection of additional post discovery filters that should be added to theLauncher.- Specified by:
getAdditionalPostDiscoveryFiltersin interfaceLauncherConfig- Returns:
- the collection of additional post discovery filters; never
nullbut potentially empty
-
-