Class FileSource
- java.lang.Object
-
- org.junit.platform.engine.support.descriptor.FileSource
-
- All Implemented Interfaces:
Serializable,FileSystemSource,UriSource,TestSource
@API(status=STABLE, since="1.0") public class FileSource extends Object implements FileSystemSource
File basedTestSourcewith an optional position.- Since:
- 1.0
- See Also:
FileSelector, Serialized Form
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)static FileSourcefrom(File file)Create a newFileSourceusing the suppliedfile.static FileSourcefrom(File file, FilePosition filePosition)FilegetFile()Get the source file.Optional<FilePosition>getPosition()Get theFilePosition, if available.URIgetUri()inthashCode()StringtoString()-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.junit.platform.engine.support.descriptor.UriSource
-
-
-
-
Method Detail
-
from
public static FileSource from(File file)
Create a newFileSourceusing the suppliedfile.- Parameters:
file- the source file; must not benull
-
from
public static FileSource from(File file, FilePosition filePosition)
- Parameters:
file- the source file; must not benullfilePosition- the position in the source file; may benull
-
getUri
public final URI getUri()
-
getFile
public final File getFile()
Get the source file.- Specified by:
getFilein interfaceFileSystemSource- Returns:
- the source file; never
null
-
getPosition
public final Optional<FilePosition> getPosition()
Get theFilePosition, if available.
-
-