Class EngineTestKit.Builder
- java.lang.Object
-
- org.junit.platform.testkit.engine.EngineTestKit.Builder
-
- Enclosing class:
- EngineTestKit
public static final class EngineTestKit.Builder extends Object
TestEngine
execution builder.See
EngineTestKit.engine(String)
andEngineTestKit.engine(TestEngine)
for example usage.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description EngineTestKit.Builder
configurationParameter(String key, String value)
Add the supplied configuration parameter.EngineTestKit.Builder
configurationParameters(Map<String,String> configurationParameters)
Add all of the supplied configuration parameters.EngineExecutionResults
execute()
Execute tests for the configuredTestEngine
, discovery selectors, discovery filters, and configuration parameters.EngineTestKit.Builder
filters(DiscoveryFilter<?>... filters)
Add all of the supplied discovery filters.EngineTestKit.Builder
selectors(DiscoverySelector... selectors)
Add all of the supplied discovery selectors.
-
-
-
Method Detail
-
selectors
public EngineTestKit.Builder selectors(DiscoverySelector... selectors)
Add all of the supplied discovery selectors.Built-in discovery selectors can be created via the static factory methods in
DiscoverySelectors
.- Parameters:
selectors
- the discovery selectors to add; nevernull
- Returns:
- this builder for method chaining
- See Also:
filters(DiscoveryFilter...)
,configurationParameter(String, String)
,configurationParameters(Map)
,execute()
-
filters
public EngineTestKit.Builder filters(DiscoveryFilter<?>... filters)
Add all of the supplied discovery filters.Built-in discovery filters can be created via the static factory methods in
ClassNameFilter
andPackageNameFilter
.- Parameters:
filters
- the discovery filters to add; nevernull
- Returns:
- this builder for method chaining
- See Also:
selectors(DiscoverySelector...)
,configurationParameter(String, String)
,configurationParameters(Map)
,execute()
-
configurationParameter
public EngineTestKit.Builder configurationParameter(String key, String value)
Add the supplied configuration parameter.- Parameters:
key
- the configuration parameter key under which to store the value; nevernull
or blankvalue
- the value to store- Returns:
- this builder for method chaining
- See Also:
selectors(DiscoverySelector...)
,filters(DiscoveryFilter...)
,configurationParameters(Map)
,execute()
,ConfigurationParameters
-
configurationParameters
public EngineTestKit.Builder configurationParameters(Map<String,String> configurationParameters)
Add all of the supplied configuration parameters.- Parameters:
configurationParameters
- the map of configuration parameters to add; nevernull
- Returns:
- this builder for method chaining
- See Also:
selectors(DiscoverySelector...)
,filters(DiscoveryFilter...)
,configurationParameter(String, String)
,execute()
,ConfigurationParameters
-
execute
public EngineExecutionResults execute()
Execute tests for the configuredTestEngine
, discovery selectors, discovery filters, and configuration parameters.- Returns:
- the recorded
EngineExecutionResults
- See Also:
selectors(DiscoverySelector...)
,filters(DiscoveryFilter...)
,configurationParameter(String, String)
,configurationParameters(Map)
-
-