Interface SelectorResolver
DiscoverySelectors
.
An implementation of a resolve()
method is typically comprised
of the following steps:
-
Check whether the selector is applicable for the current
TestEngine
and the currentEngineDiscoveryRequest
(e.g. for a test class: is it relevant for the current engine and does it pass all filters in the request?). -
If so, use the supplied
Context
, to add one or multipleTestDescriptors
to the designated parent (seeContext
for details) and return a match or multiple matches. Alternatively, convert the supplied selector into one or multiple other selectors (e.g. aPackageSelector
into a set ofClassSelectors
). Otherwise, returnunresolved()
.
- Since:
- 1.5
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
The context for resolving aDiscoverySelector
and adding it to the test tree.static class
An exact or partial match for resolving aDiscoverySelector
into aTestDescriptor
.static class
The result of an attempt to resolve aDiscoverySelector
. -
Method Summary
Modifier and TypeMethodDescriptiondefault SelectorResolver.Resolution
resolve(ClasspathResourceSelector selector, SelectorResolver.Context context)
Resolve the suppliedClasspathResourceSelector
using the suppliedContext
.default SelectorResolver.Resolution
resolve(ClasspathRootSelector selector, SelectorResolver.Context context)
Resolve the suppliedClasspathRootSelector
using the suppliedContext
.default SelectorResolver.Resolution
resolve(ClassSelector selector, SelectorResolver.Context context)
Resolve the suppliedClassSelector
using the suppliedContext
.default SelectorResolver.Resolution
resolve(DirectorySelector selector, SelectorResolver.Context context)
Resolve the suppliedDirectorySelector
using the suppliedContext
.default SelectorResolver.Resolution
resolve(FileSelector selector, SelectorResolver.Context context)
Resolve the suppliedFileSelector
using the suppliedContext
.default SelectorResolver.Resolution
resolve(MethodSelector selector, SelectorResolver.Context context)
Resolve the suppliedMethodSelector
using the suppliedContext
.default SelectorResolver.Resolution
resolve(ModuleSelector selector, SelectorResolver.Context context)
Resolve the suppliedModuleSelector
using the suppliedContext
.default SelectorResolver.Resolution
resolve(NestedClassSelector selector, SelectorResolver.Context context)
Resolve the suppliedNestedClassSelector
using the suppliedContext
.default SelectorResolver.Resolution
resolve(NestedMethodSelector selector, SelectorResolver.Context context)
Resolve the suppliedNestedMethodSelector
using the suppliedContext
.default SelectorResolver.Resolution
resolve(PackageSelector selector, SelectorResolver.Context context)
Resolve the suppliedPackageSelector
using the suppliedContext
.default SelectorResolver.Resolution
resolve(UniqueIdSelector selector, SelectorResolver.Context context)
Resolve the suppliedUniqueIdSelector
using the suppliedContext
.default SelectorResolver.Resolution
resolve(UriSelector selector, SelectorResolver.Context context)
Resolve the suppliedUriSelector
using the suppliedContext
.default SelectorResolver.Resolution
resolve(DiscoverySelector selector, SelectorResolver.Context context)
Resolve the suppliedDiscoverySelector
using the suppliedContext
.
-
Method Details
-
resolve
default SelectorResolver.Resolution resolve(ClasspathResourceSelector selector, SelectorResolver.Context context)Resolve the suppliedClasspathResourceSelector
using the suppliedContext
.The default implementation delegates to
resolve(DiscoverySelector, Context)
.- Parameters:
selector
- the selector to be resolved; nevernull
context
- the context to be used for resolving the selector; nevernull
- Returns:
- a
Resolution
ofunresolved()
,selectors()
, ormatches()
; nevernull
- See Also:
resolve(DiscoverySelector, Context)
-
resolve
default SelectorResolver.Resolution resolve(ClasspathRootSelector selector, SelectorResolver.Context context)Resolve the suppliedClasspathRootSelector
using the suppliedContext
.The default implementation delegates to
resolve(DiscoverySelector, Context)
.- Parameters:
selector
- the selector to be resolved; nevernull
context
- the context to be used for resolving the selector; nevernull
- Returns:
- a
Resolution
ofunresolved()
,selectors()
, ormatches()
; nevernull
- See Also:
resolve(DiscoverySelector, Context)
-
resolve
default SelectorResolver.Resolution resolve(ClassSelector selector, SelectorResolver.Context context)Resolve the suppliedClassSelector
using the suppliedContext
.The default implementation delegates to
resolve(DiscoverySelector, Context)
.- Parameters:
selector
- the selector to be resolved; nevernull
context
- the context to be used for resolving the selector; nevernull
- Returns:
- a
Resolution
ofunresolved()
,selectors()
, ormatches()
; nevernull
- See Also:
resolve(DiscoverySelector, Context)
-
resolve
default SelectorResolver.Resolution resolve(NestedClassSelector selector, SelectorResolver.Context context)Resolve the suppliedNestedClassSelector
using the suppliedContext
.The default implementation delegates to
resolve(DiscoverySelector, Context)
.- Parameters:
selector
- the selector to be resolved; nevernull
context
- the context to be used for resolving the selector; nevernull
- Returns:
- a
Resolution
ofunresolved()
,selectors()
, ormatches()
; nevernull
- See Also:
resolve(DiscoverySelector, Context)
-
resolve
default SelectorResolver.Resolution resolve(DirectorySelector selector, SelectorResolver.Context context)Resolve the suppliedDirectorySelector
using the suppliedContext
.The default implementation delegates to
resolve(DiscoverySelector, Context)
.- Parameters:
selector
- the selector to be resolved; nevernull
context
- the context to be used for resolving the selector; nevernull
- Returns:
- a
Resolution
ofunresolved()
,selectors()
, ormatches()
; nevernull
- See Also:
resolve(DiscoverySelector, Context)
-
resolve
default SelectorResolver.Resolution resolve(FileSelector selector, SelectorResolver.Context context)Resolve the suppliedFileSelector
using the suppliedContext
.The default implementation delegates to
resolve(DiscoverySelector, Context)
.- Parameters:
selector
- the selector to be resolved; nevernull
context
- the context to be used for resolving the selector; nevernull
- Returns:
- a
Resolution
ofunresolved()
,selectors()
, ormatches()
; nevernull
- See Also:
resolve(DiscoverySelector, Context)
-
resolve
default SelectorResolver.Resolution resolve(MethodSelector selector, SelectorResolver.Context context)Resolve the suppliedMethodSelector
using the suppliedContext
.The default implementation delegates to
resolve(DiscoverySelector, Context)
.- Parameters:
selector
- the selector to be resolved; nevernull
context
- the context to be used for resolving the selector; nevernull
- Returns:
- a
Resolution
ofunresolved()
,selectors()
, ormatches()
; nevernull
- See Also:
resolve(DiscoverySelector, Context)
-
resolve
default SelectorResolver.Resolution resolve(NestedMethodSelector selector, SelectorResolver.Context context)Resolve the suppliedNestedMethodSelector
using the suppliedContext
.The default implementation delegates to
resolve(DiscoverySelector, Context)
.- Parameters:
selector
- the selector to be resolved; nevernull
context
- the context to be used for resolving the selector; nevernull
- Returns:
- a
Resolution
ofunresolved()
,selectors()
, ormatches()
; nevernull
- See Also:
resolve(DiscoverySelector, Context)
-
resolve
default SelectorResolver.Resolution resolve(ModuleSelector selector, SelectorResolver.Context context)Resolve the suppliedModuleSelector
using the suppliedContext
.The default implementation delegates to
resolve(DiscoverySelector, Context)
.- Parameters:
selector
- the selector to be resolved; nevernull
context
- the context to be used for resolving the selector; nevernull
- Returns:
- a
Resolution
ofunresolved()
,selectors()
, ormatches()
; nevernull
- See Also:
resolve(DiscoverySelector, Context)
-
resolve
default SelectorResolver.Resolution resolve(PackageSelector selector, SelectorResolver.Context context)Resolve the suppliedPackageSelector
using the suppliedContext
.The default implementation delegates to
resolve(DiscoverySelector, Context)
.- Parameters:
selector
- the selector to be resolved; nevernull
context
- the context to be used for resolving the selector; nevernull
- Returns:
- a
Resolution
ofunresolved()
,selectors()
, ormatches()
; nevernull
- See Also:
resolve(DiscoverySelector, Context)
-
resolve
default SelectorResolver.Resolution resolve(UniqueIdSelector selector, SelectorResolver.Context context)Resolve the suppliedUniqueIdSelector
using the suppliedContext
.The default implementation delegates to
resolve(DiscoverySelector, Context)
.- Parameters:
selector
- the selector to be resolved; nevernull
context
- the context to be used for resolving the selector; nevernull
- Returns:
- a
Resolution
ofunresolved()
,selectors()
, ormatches()
; nevernull
- See Also:
resolve(DiscoverySelector, Context)
-
resolve
default SelectorResolver.Resolution resolve(UriSelector selector, SelectorResolver.Context context)Resolve the suppliedUriSelector
using the suppliedContext
.The default implementation delegates to
resolve(DiscoverySelector, Context)
.- Parameters:
selector
- the selector to be resolved; nevernull
context
- the context to be used for resolving the selector; nevernull
- Returns:
- a
Resolution
ofunresolved()
,selectors()
, ormatches()
; nevernull
- See Also:
resolve(DiscoverySelector, Context)
-
resolve
default SelectorResolver.Resolution resolve(DiscoverySelector selector, SelectorResolver.Context context)Resolve the suppliedDiscoverySelector
using the suppliedContext
.This method is only called if none of the overloaded variants match.
The default implementation returns
unresolved()
.- Parameters:
selector
- the selector to be resolved; nevernull
context
- the context to be used for resolving the selector; nevernull
- Returns:
- a
Resolution
ofunresolved()
,selectors()
, ormatches()
; nevernull
- See Also:
SelectorResolver.Context
-