Package org.junit.rules
Class TemporaryFolder.Builder
- java.lang.Object
-
- org.junit.rules.TemporaryFolder.Builder
-
- Enclosing class:
- TemporaryFolder
public static class TemporaryFolder.Builder extends java.lang.Object
Builds an instance ofTemporaryFolder
.- Since:
- 4.13
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TemporaryFolder.Builder
assureDeletion()
Setting this flag assures that no resources are left undeleted.TemporaryFolder
build()
Builds aTemporaryFolder
instance using the values in this builder.TemporaryFolder.Builder
parentFolder(java.io.File parentFolder)
Specifies which folder to use for creating temporary resources.
-
-
-
Constructor Detail
-
Builder
protected Builder()
-
-
Method Detail
-
parentFolder
public TemporaryFolder.Builder parentFolder(java.io.File parentFolder)
Specifies which folder to use for creating temporary resources. Ifnull
then system default temporary-file directory is used.- Returns:
- this
-
assureDeletion
public TemporaryFolder.Builder assureDeletion()
Setting this flag assures that no resources are left undeleted. Failure to fulfill the assurance results in failure of tests with anAssertionError
.- Returns:
- this
-
build
public TemporaryFolder build()
Builds aTemporaryFolder
instance using the values in this builder.
-
-