-
- All Known Subinterfaces:
LauncherDiscoveryRequest
@API(status=STABLE, since="1.0") public interface EngineDiscoveryRequest
EngineDiscoveryRequest
provides aTestEngine
access to the information necessary to discover tests and containers.A request is comprised of selectors and filters. While the former select resources that engines can use to discover tests, the latter specify how such resources are to be filtered. All of the filters have to include a resource for it to end up in the test plan.
In addition, the supplied configuration parameters can be used to influence the discovery process.
- Since:
- 1.0
- See Also:
TestEngine
,TestDescriptor
,DiscoverySelector
,DiscoveryFilter
,ConfigurationParameters
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description ConfigurationParameters
getConfigurationParameters()
Get theConfigurationParameters
for this request.default EngineDiscoveryListener
getDiscoveryListener()
Get theEngineDiscoveryListener
for this request.<T extends DiscoveryFilter<?>>
List<T>getFiltersByType(Class<T> filterType)
Get theDiscoveryFilters
for this request, filtered by a particular type.<T extends DiscoverySelector>
List<T>getSelectorsByType(Class<T> selectorType)
Get theDiscoverySelectors
for this request, filtered by a particular type.
-
-
-
Method Detail
-
getSelectorsByType
<T extends DiscoverySelector> List<T> getSelectorsByType(Class<T> selectorType)
Get theDiscoverySelectors
for this request, filtered by a particular type.- Parameters:
selectorType
- the type ofDiscoverySelector
to filter by- Returns:
- all selectors of this request that are instances of
selectorType
; nevernull
but potentially empty
-
getFiltersByType
<T extends DiscoveryFilter<?>> List<T> getFiltersByType(Class<T> filterType)
Get theDiscoveryFilters
for this request, filtered by a particular type.The returned filters are to be combined using AND semantics, i.e. all of them have to include a resource for it to end up in the test plan.
- Parameters:
filterType
- the type ofDiscoveryFilter
to filter by- Returns:
- all filters of this request that are instances of
filterType
; nevernull
but potentially empty
-
getConfigurationParameters
ConfigurationParameters getConfigurationParameters()
Get theConfigurationParameters
for this request.- Returns:
- the configuration parameters; never
null
-
getDiscoveryListener
@API(status=EXPERIMENTAL, since="1.6") default EngineDiscoveryListener getDiscoveryListener()
Get theEngineDiscoveryListener
for this request.The default implementation returns a no-op listener that ignores all calls so that engines that call this methods can be used with an earlier version of the JUnit Platform that did not yet include this API.
- Returns:
- the discovery listener; never
null
- Since:
- 1.6
-
-