@API(status=EXPERIMENTAL,
since="5.9")
public enum CleanupMode
extends java.lang.Enum<CleanupMode>
@TempDir.
When a test with a temporary directory completes, it might be useful in
some cases to be able to view the contents of the temporary directory used by
the test. CleanupMode allows you to control how a TempDir
is cleaned up.
TempDir| Enum Constant and Description |
|---|
ALWAYS
Always clean up a temporary directory after the test has completed.
|
DEFAULT
Use the default cleanup mode.
|
NEVER
Never clean up a temporary directory after the test has completed.
|
ON_SUCCESS
Only clean up a temporary directory if the test completed successfully.
|
| Modifier and Type | Method and Description |
|---|---|
static CleanupMode |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static CleanupMode[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final CleanupMode DEFAULT
public static final CleanupMode ALWAYS
public static final CleanupMode ON_SUCCESS
public static final CleanupMode NEVER
public static CleanupMode[] values()
for (CleanupMode c : CleanupMode.values()) System.out.println(c);
public static CleanupMode valueOf(java.lang.String name)
name - the name of the enum constant to be returned.java.lang.IllegalArgumentException - if this enum type has no constant with the specified namejava.lang.NullPointerException - if the argument is null