Annotation Type MemoryTempDir
@Documented
@Retention(RUNTIME)
@Target({FIELD,PARAMETER,ANNOTATION_TYPE})
@TempDir(factory=MemoryFileSystemTempDirFactory.class)
public @interface MemoryTempDir
A meta-annotation that that configures
TempDirFactory
to use MemoryFileSystemTempDirFactory
.
Usage
class SomeTests {
@MemoryTempDir
Path tempDirectory;
@Test
void someTest() {
Path input = Files.createFile(this.tempDirectory.resolve("input.txt"));
// test code
}
}