https://docs.junit.org/6.0.3/writing-tests/built-in-extensions.html#TempDirectory
@Test
void writeItemsToFile(@TempDir Path tempDir) throws IOException {
Path file = tempDir.resolve("test.txt");
new ListWriter(file).write("a", "b", "c");
assertEquals(List.of("a,b,c"), Files.readAllLines(file));
}
This code snippet and others use ListWriter.
ListWriter is not a part of the JUnit API nor the JDK.
Please rewrite the example to only use JDK or JUnit API, thanks.
This should be improved in the 5.x and 6.x docs.
https://docs.junit.org/6.0.3/writing-tests/built-in-extensions.html#TempDirectory
This code snippet and others use
ListWriter.ListWriteris not a part of the JUnit API nor the JDK.Please rewrite the example to only use JDK or JUnit API, thanks.
This should be improved in the
5.xand6.xdocs.