public static class SubDirTestWatcher.Builder extends Object
SubDirTestWatcher. Create an instance of the builder, configure it, and then call the build() to create a
SubDirTestWatcher.| Constructor and Description |
|---|
Builder(File baseDir)
Initializes a builder for a
SubDirTestWatcher with the given baseDir. |
| Modifier and Type | Method and Description |
|---|---|
SubDirTestWatcher.Builder |
addSubDir(Path subDir)
Adds a sub directory to be managed by the
SubDirTestWatcher. |
SubDirTestWatcher |
build()
Builds a
SubDirTestWatcher. |
SubDirTestWatcher.Builder |
setCreateAtBeginning(boolean createAtBeginning)
Sets the createAtBeginning flag.
|
SubDirTestWatcher.Builder |
setDeleteAtEnd(boolean deleteAtEnd)
Sets the deleteAtEnd flag.
|
public Builder(File baseDir)
SubDirTestWatcher with the given baseDir.baseDir - The baseDir is the parent directory in which all sub directories are created.public SubDirTestWatcher.Builder setCreateAtBeginning(boolean createAtBeginning)
createAtBeginning - This flag determines whether the SubDirTestWatcher creates the configured sub directories at a beginning of a test. Setting
This to true will cause the SubDirTestWatcher to create the configured sub directories at the beginning of each test. Setting
This to false will prevent the SubDirTestWatcher from attempting to create the configured sub directories at the beginning of
at test. Setting this to false is useful for scenarios where you only want to delete directories created in the middle of your tests. By
default this flag is true.SubDirTestWatcher.Builder.public SubDirTestWatcher.Builder setDeleteAtEnd(boolean deleteAtEnd)
deleteAtEnd - This flag determines whether the SubDirTestWatcher deletes the sub directories it manages at the end of a test.SubDirTestWatcher.Builder.public SubDirTestWatcher.Builder addSubDir(Path subDir)
SubDirTestWatcher.subDir - The relative path of the sub directory to be added.SubDirTestWatcher.Builder.public SubDirTestWatcher build()
SubDirTestWatcher.SubDirTestWatcher.Copyright © 2021 The Apache Software Foundation. All rights reserved.