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=EXPERIMENTAL, since="1.5") public static class EngineDiscoveryRequestResolver.Builder<T extends TestDescriptor> extends Object
Builder forEngineDiscoveryRequestResolver
.- Since:
- 1.5
-
-
Method Summary
-
-
-
Method Detail
-
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
public EngineDiscoveryRequestResolver.Builder<T> addSelectorResolver(SelectorResolver resolver)
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:
EngineDiscoveryRequestResolver.InitializationContext
-
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:
EngineDiscoveryRequestResolver.InitializationContext
-
build
public EngineDiscoveryRequestResolver<T> build()
Build theEngineDiscoveryRequestResolver
that has been configured via this builder.
-
-