Skip to content

Commit 90f031f

Browse files
committed
Add headings to Javadoc for @tempdir
1 parent 3ab9ca9 commit 90f031f

File tree

1 file changed

+6
-0
lines changed
  • junit-jupiter-api/src/main/java/org/junit/jupiter/api/io

1 file changed

+6
-0
lines changed

junit-jupiter-api/src/main/java/org/junit/jupiter/api/io/TempDir.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@
3434
* parameters. Please use field injection instead, by annotating an
3535
* instance field with {@code @TempDir}.
3636
*
37+
* <h3>Temporary Directory Creation</h3>
38+
*
3739
* <p>The temporary directory is only created if a field in a test class or a
3840
* parameter in a lifecycle method or test method is annotated with
3941
* {@link TempDir @TempDir}. If the field type or parameter type is neither
@@ -43,6 +45,8 @@
4345
* addition, a {@code ParameterResolutionException} will be thrown for a
4446
* constructor parameter annotated with {@code @TempDir}.
4547
*
48+
* <h3>Temporary Directory Scope</h3>
49+
*
4650
* <p>The scope of the temporary directory depends on where the first
4751
* {@code @TempDir} annotation is encountered when executing a test class. The
4852
* temporary directory will be shared by all tests in a class when the
@@ -53,6 +57,8 @@
5357
* or {@link org.junit.jupiter.api.AfterEach @AfterEach} methods &mdash; each test
5458
* will use its own temporary directory.
5559
*
60+
* <h3>Temporary Directory Deletion</h3>
61+
*
5662
* <p>When the end of the scope of a temporary directory is reached, i.e. when
5763
* the test method or class has finished execution, JUnit will attempt to
5864
* recursively delete all files and directories in the temporary directory

0 commit comments

Comments
 (0)