Package de.skuzzle.test.snapshots
Class ContextFiles
- java.lang.Object
-
- de.skuzzle.test.snapshots.ContextFiles
-
@API(status=EXPERIMENTAL, since="1.8.0") public final class ContextFiles extends java.lang.ObjectHolds the paths to all files that might have been generated by a single snapshot assertion.Depending on the configuration (i.e. SnapshotTestOptions )
- Since:
- 1.8.0
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.nio.file.PathactualResultFile()Path to the file in which the latest actual result will be stored.voiddeleteFiles()Deletes all the context files that are existing.static ContextFilesof(java.nio.file.Path snapshotFile, java.nio.file.Path actualResultFile, java.nio.file.Path rawActualResultFile)java.nio.file.PathrawActualResultFile()Path to the file in which the latest raw actual result will be stored (without the snapshot header).java.nio.file.PathsnapshotFile()The snapshot file.
-
-
-
Method Detail
-
of
public static ContextFiles of(java.nio.file.Path snapshotFile, java.nio.file.Path actualResultFile, java.nio.file.Path rawActualResultFile)
-
snapshotFile
public java.nio.file.Path snapshotFile()
The snapshot file. Note that it is possible that the file does not exist in case thatSnapshotTestResult.status()isSnapshotTestResult.SnapshotStatus.DISABLED.- Returns:
- The snapshot file.
- See Also:
actualResultFile(),rawActualResultFile()
-
actualResultFile
public java.nio.file.Path actualResultFile()
Path to the file in which the latest actual result will be stored. The file will only exist if the recent snapshot assertion was executed withSnapshotTestOptions.alwaysPersistActualResult()being true.- Returns:
- The path to the file with the latest actual result file.
- See Also:
snapshotFile(),rawActualResultFile(),SnapshotTestOptions.alwaysPersistActualResult()
-
rawActualResultFile
public java.nio.file.Path rawActualResultFile()
Path to the file in which the latest raw actual result will be stored (without the snapshot header). The file will only exist if the recent snapshot assertion was executed withSnapshotTestOptions.alwaysPersistRawResult()being true.- Returns:
- The path to the file with the latest raw actual result file.
- See Also:
snapshotFile(),actualResultFile(),SnapshotTestOptions.alwaysPersistRawResult()
-
deleteFiles
public void deleteFiles()
Deletes all the context files that are existing.
-
-