- All Known Implementing Classes:
ClasspathResourceSelector
,ClasspathRootSelector
,ClassSelector
,DirectorySelector
,FileSelector
,IterationSelector
,MethodSelector
,ModuleSelector
,NestedClassSelector
,NestedMethodSelector
,PackageSelector
,UniqueIdSelector
,UriSelector
A selector defines what a
TestEngine
can use to discover tests
— for example, the name of a Java class, the path to a file or
directory, etc.- Since:
- 1.0
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptiondefault Optional
<DiscoverySelectorIdentifier> Return the identifier of this selector.
-
Method Details
-
toIdentifier
@API(status=EXPERIMENTAL, since="1.11") default Optional<DiscoverySelectorIdentifier> toIdentifier()Return the identifier of this selector.The returned identifier must be parsable by a corresponding
DiscoverySelectorIdentifierParser
.The default implementation returns
Optional.empty()
. Can be overridden by concrete implementations.- Returns:
- an
Optional
containing the identifier of this selector; nevernull
but potentially empty if the selector does not support identifiers - Since:
- 1.11
-