Top Description Fields Constructors Methods
org.junit.jupiter.api.io

public final Enum CleanupMode

extends Enum<CleanupMode>
Class Inheritance
Annotations
@API
status:EXPERIMENTAL
since:5.9
Static Imports
org.apiguardian.api.API.Status.EXPERIMENTAL

Enumeration of cleanup modes for @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.

Since
5.9
See Also
TempDir

Field Summary

Modifier and TypeField and Description
public static final CleanupMode
ALWAYS

Always clean up a temporary directory after the test has completed.

public static final CleanupMode
DEFAULT

Use the default cleanup mode.

public static final CleanupMode
NEVER

Never clean up a temporary directory after the test has completed.

public static final CleanupMode
ON_SUCCESS

Only clean up a temporary directory if the test completed successfully.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static CleanupMode
public static CleanupMode[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

ALWAYSback to summary
public static final CleanupMode ALWAYS

Always clean up a temporary directory after the test has completed.

DEFAULTback to summary
public static final CleanupMode DEFAULT

Use the default cleanup mode.

See Also
TempDir#DEFAULT_CLEANUP_MODE_PROPERTY_NAME
NEVERback to summary
public static final CleanupMode NEVER

Never clean up a temporary directory after the test has completed.

ON_SUCCESSback to summary
public static final CleanupMode ON_SUCCESS

Only clean up a temporary directory if the test completed successfully.

Constructor Detail

CleanupModeback to summary
private CleanupMode()

Method Detail

valueOfback to summary
public static CleanupMode valueOf(String name)
valuesback to summary
public static CleanupMode[] values()