Annotation Type SnapshotDirectory
-
@Retention(RUNTIME) @Target(TYPE) @API(status=EXPERIMENTAL, since="1.7.0") public @interface SnapshotDirectoryDrop in replacement forEnableSnapshotTests.snapshotDirectory(). Allows to customize the snapshot directory globally for a test class.If you don't customize the snapshot directory at all, then snapshots will by default be stored in a directory structure according to the package name of the test class. If you already specified a custom directory using the DSL (via
SnapshotDsl.ChooseDirectory.in(java.nio.file.Path)) then this annotation will have no effect for that particular assertion.You can either specify
value()which will interpret the string as directory relative to this project's src/test/resources directory. Or you can specify the type of a class that implementsSnapshotDirectoryStrategyusingdeterminedBy(). With the strategy you are no longer bounded to use a directory relative to src/test/resources.- Since:
- 1.7.0
- See Also:
SnapshotDirectoryStrategy,SnapshotDsl.ChooseDirectory
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description java.lang.Class<? extends SnapshotDirectoryStrategy>determinedBySpecify the type of a class that implementsSnapshotDirectoryStrategy.java.lang.StringvalueDefine the snapshot directory relative tosrc/test/resources.
-
-
-
Element Detail
-
value
java.lang.String value
Define the snapshot directory relative tosrc/test/resources.Note: If you specify a custom
SnapshotDirectoryStrategyusingdeterminedBy(), the strategy implementation might apply custom semantics to this value. Check with the respective strategy's documentation.- Returns:
- The relative directory to store the snapshots.
- Default:
- ""
-
-
-
determinedBy
java.lang.Class<? extends SnapshotDirectoryStrategy> determinedBy
Specify the type of a class that implementsSnapshotDirectoryStrategy. The strategy will be used to determine the actual snapshot directory.By default, there is no strategy in place, meaning that the default semantics as described in the documentation to the
value()property apply.- Returns:
- The strategy to use.
- Default:
- de.skuzzle.test.snapshots.DefaultSnapshotDirectoryStrategy.class
-
-