Module org.junit.platform.engine
Class EngineDiscoveryRequestResolver.Builder<T extends TestDescriptor>
java.lang.Object
org.junit.platform.engine.support.discovery.EngineDiscoveryRequestResolver.Builder<T>
- Type Parameters:
T
- the type of the engine's descriptor
- Enclosing class:
- EngineDiscoveryRequestResolver<T extends TestDescriptor>
@API(status=STABLE,
since="1.10")
public static class EngineDiscoveryRequestResolver.Builder<T extends TestDescriptor>
extends Object
Builder for
EngineDiscoveryRequestResolver
.- Since:
- 1.5
-
Method Summary
Modifier and TypeMethodDescriptionaddClassContainerSelectorResolver
(Predicate<Class<?>> classFilter) Add a predefined resolver that resolvesClasspathRootSelectors
,ModuleSelectors
, andPackageSelectors
intoClassSelectors
by scanning for classes that satisfy the supplied predicate in the respective class containers to this builder.addSelectorResolver
(Function<EngineDiscoveryRequestResolver.InitializationContext<T>, SelectorResolver> resolverCreator) Add a context sensitiveSelectorResolver
to this builder.addSelectorResolver
(SelectorResolver resolver) Add a context insensitiveSelectorResolver
to this builder.addTestDescriptorVisitor
(Function<EngineDiscoveryRequestResolver.InitializationContext<T>, TestDescriptor.Visitor> visitorCreator) Add a context sensitiveTestDescriptor.Visitor
to this builder.build()
Build theEngineDiscoveryRequestResolver
that has been configured via this builder.
-
Method Details
-
addClassContainerSelectorResolver
public EngineDiscoveryRequestResolver.Builder<T> addClassContainerSelectorResolver(Predicate<Class<?>> classFilter) Add a predefined resolver that resolvesClasspathRootSelectors
,ModuleSelectors
, andPackageSelectors
intoClassSelectors
by scanning for classes that satisfy the supplied predicate in the respective class containers to this builder.- Parameters:
classFilter
- predicate the resolved classes must satisfy; nevernull
- Returns:
- this builder for method chaining
-
addSelectorResolver
Add a context insensitiveSelectorResolver
to this builder.- Parameters:
resolver
- the resolver to add; nevernull
- Returns:
- this builder for method chaining
-
addSelectorResolver
public EngineDiscoveryRequestResolver.Builder<T> addSelectorResolver(Function<EngineDiscoveryRequestResolver.InitializationContext<T>, SelectorResolver> resolverCreator) Add a context sensitiveSelectorResolver
to this builder.- Parameters:
resolverCreator
- the function that will be called to create theSelectorResolver
to be added.- Returns:
- this builder for method chaining
- See Also:
-
addTestDescriptorVisitor
public EngineDiscoveryRequestResolver.Builder<T> addTestDescriptorVisitor(Function<EngineDiscoveryRequestResolver.InitializationContext<T>, TestDescriptor.Visitor> visitorCreator) Add a context sensitiveTestDescriptor.Visitor
to this builder.- Parameters:
visitorCreator
- the function that will be called to create theTestDescriptor.Visitor
to be added.- Returns:
- this builder for method chaining
- See Also:
-
build
Build theEngineDiscoveryRequestResolver
that has been configured via this builder.
-