public static enum DirtiesContext.HierarchyMode extends Enum<DirtiesContext.HierarchyMode>
@DirtiesContext
is used in a test whose context is
configured as part of a hierarchy via
@ContextHierarchy
.Enum Constant and Description |
---|
CURRENT_LEVEL
The
ApplicationContext for the current level in the
context hierarchy and all contexts in subhierarchies of the current
level will be removed from the context cache and closed. |
EXHAUSTIVE
The context cache will be cleared using an exhaustive algorithm
that includes not only the current level
but also all other context hierarchies that share an ancestor context
common to the current test.
|
Modifier and Type | Method and Description |
---|---|
static DirtiesContext.HierarchyMode |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static DirtiesContext.HierarchyMode[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final DirtiesContext.HierarchyMode EXHAUSTIVE
All ApplicationContexts
that reside in a subhierarchy of
the common ancestor context will be removed from the context cache and
closed.
public static final DirtiesContext.HierarchyMode CURRENT_LEVEL
ApplicationContext
for the current level in the
context hierarchy and all contexts in subhierarchies of the current
level will be removed from the context cache and closed.
The current level refers to the ApplicationContext
at the lowest level in the context hierarchy that is visible from the
current test.
public static DirtiesContext.HierarchyMode[] values()
for (DirtiesContext.HierarchyMode c : DirtiesContext.HierarchyMode.values()) System.out.println(c);
public static DirtiesContext.HierarchyMode valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null