java.lang.Object
org.junit.platform.engine.discovery.FileSelector
- All Implemented Interfaces:
 DiscoverySelector
@API(status=STABLE,
     since="1.0")
public class FileSelector
extends Object
implements DiscoverySelector
A 
DiscoverySelector that selects a file so that
 TestEngines
 can discover tests or containers based on files in the
 file system.- Since:
 - 1.0
 - See Also:
 
- 
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class - 
Method Summary
Modifier and TypeMethodDescriptionbooleangetFile()Get the selected file as aFile.getPath()Get the selected position within the file as aFilePosition.Get the selected file as a raw path.inthashCode()Return the identifier of this selector.toString() 
- 
Method Details
- 
getFile
Get the selected file as aFile.- See Also:
 
 - 
getPath
- See Also:
 
 - 
getRawPath
Get the selected file as a raw path.- See Also:
 
 - 
getPosition
Get the selected position within the file as aFilePosition. - 
equals
 - 
hashCode
 - 
toString
 - 
toIdentifier
Description copied from interface:DiscoverySelectorReturn 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.- Specified by:
 toIdentifierin interfaceDiscoverySelector- Returns:
 - an 
Optionalcontaining the identifier of this selector; nevernullbut potentially empty if the selector does not support identifiers 
 
 -