Top Description Inners Methods
org.junit.platform.engine.support.discovery

public Interface SelectorResolver

Known Direct Implementers
org.junit.platform.engine.support.discovery.ClassContainerSelectorResolver, org.junit.platform.engine.support.discovery.ResourceContainerSelectorResolver
Annotations
@API
status:STABLE
since:1.10
Static Imports
java.util.Collections.emptySet, org.apiguardian.api.API.Status.MAINTAINED, .API.Status.STABLE

A resolver that supports resolving one or multiple types of DiscoverySelectors.

An implementation of a resolve() method is typically comprised of the following steps:

  1. Check whether the selector is applicable for the current org.junit.platform.engine.TestEngine and the current org.junit.platform.engine.EngineDiscoveryRequest (e.g. for a test class: is it relevant for the current engine and does it pass all filters in the request?).
  2. If so, use the supplied Context, to add one or multiple TestDescriptors to the designated parent (see Context for details) and return a match or multiple matches. Alternatively, convert the supplied selector into one or multiple other selectors (e.g. a PackageSelector into a set of ClassSelectors). Otherwise, return unresolved().
Since
1.5

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static interface
SelectorResolver.Context

The context for resolving a DiscoverySelector and adding it to the test tree.

public static class
SelectorResolver.Match

An exact or partial match for resolving a DiscoverySelector into a TestDescriptor.

public static class
SelectorResolver.Resolution

The result of an attempt to resolve a DiscoverySelector.

Method Summary

Modifier and TypeMethod and Description
public default SelectorResolver.Resolution

Returns:

a Resolution of unresolved(), selectors(), or matches(); never null
resolve
(ClasspathResourceSelector
the selector to be resolved; never null
selector
,
SelectorResolver.Context
the context to be used for resolving the selector; never null
context
)

Resolve the supplied ClasspathResourceSelector using the supplied Context.

public default SelectorResolver.Resolution

Returns:

a Resolution of unresolved(), selectors(), or matches(); never null
resolve
(ClasspathRootSelector
the selector to be resolved; never null
selector
,
SelectorResolver.Context
the context to be used for resolving the selector; never null
context
)

Resolve the supplied ClasspathRootSelector using the supplied Context.

public default SelectorResolver.Resolution

Returns:

a Resolution of unresolved(), selectors(), or matches(); never null
resolve
(ClassSelector
the selector to be resolved; never null
selector
,
SelectorResolver.Context
the context to be used for resolving the selector; never null
context
)

Resolve the supplied ClassSelector using the supplied Context.

public default SelectorResolver.Resolution

Returns:

a Resolution of unresolved(), selectors(), or matches(); never null
resolve
(NestedClassSelector
the selector to be resolved; never null
selector
,
SelectorResolver.Context
the context to be used for resolving the selector; never null
context
)

Resolve the supplied NestedClassSelector using the supplied Context.

public default SelectorResolver.Resolution

Returns:

a Resolution of unresolved(), selectors(), or matches(); never null
resolve
(DirectorySelector
the selector to be resolved; never null
selector
,
SelectorResolver.Context
the context to be used for resolving the selector; never null
context
)

Resolve the supplied DirectorySelector using the supplied Context.

public default SelectorResolver.Resolution

Returns:

a Resolution of unresolved(), selectors(), or matches(); never null
resolve
(FileSelector
the selector to be resolved; never null
selector
,
SelectorResolver.Context
the context to be used for resolving the selector; never null
context
)

Resolve the supplied FileSelector using the supplied Context.

public default SelectorResolver.Resolution

Returns:

a Resolution of unresolved(), selectors(), or matches(); never null
resolve
(MethodSelector
the selector to be resolved; never null
selector
,
SelectorResolver.Context
the context to be used for resolving the selector; never null
context
)

Resolve the supplied MethodSelector using the supplied Context.

public default SelectorResolver.Resolution

Returns:

a Resolution of unresolved(), selectors(), or matches(); never null
resolve
(NestedMethodSelector
the selector to be resolved; never null
selector
,
SelectorResolver.Context
the context to be used for resolving the selector; never null
context
)

Resolve the supplied NestedMethodSelector using the supplied Context.

public default SelectorResolver.Resolution

Returns:

a Resolution of unresolved(), selectors(), or matches(); never null
resolve
(ModuleSelector
the selector to be resolved; never null
selector
,
SelectorResolver.Context
the context to be used for resolving the selector; never null
context
)

Resolve the supplied ModuleSelector using the supplied Context.

public default SelectorResolver.Resolution

Returns:

a Resolution of unresolved(), selectors(), or matches(); never null
resolve
(PackageSelector
the selector to be resolved; never null
selector
,
SelectorResolver.Context
the context to be used for resolving the selector; never null
context
)

Resolve the supplied PackageSelector using the supplied Context.

public default SelectorResolver.Resolution

Returns:

a Resolution of unresolved(), selectors(), or matches(); never null
resolve
(UniqueIdSelector
the selector to be resolved; never null
selector
,
SelectorResolver.Context
the context to be used for resolving the selector; never null
context
)

Resolve the supplied UniqueIdSelector using the supplied Context.

public default SelectorResolver.Resolution

Returns:

a Resolution of unresolved(), selectors(), or matches(); never null
resolve
(UriSelector
the selector to be resolved; never null
selector
,
SelectorResolver.Context
the context to be used for resolving the selector; never null
context
)

Resolve the supplied UriSelector using the supplied Context.

public default SelectorResolver.Resolution

Returns:

a Resolution of unresolved(), selectors(), or matches(); never null
resolve
(IterationSelector
the selector to be resolved; never null
selector
,
SelectorResolver.Context
the context to be used for resolving the selector; never null
context
)

Resolve the supplied IterationSelector using the supplied Context.

public default SelectorResolver.Resolution

Returns:

a Resolution of unresolved(), selectors(), or matches(); never null
resolve
(DiscoverySelector
the selector to be resolved; never null
selector
,
SelectorResolver.Context
the context to be used for resolving the selector; never null
context
)

Resolve the supplied DiscoverySelector using the supplied Context.