类的使用
org.springframework.test.annotation.DirtiesContext.HierarchyMode
使用DirtiesContext.HierarchyMode的程序包 程序包 说明 org.springframework.test.annotation Support classes for annotation-driven tests.org.springframework.test.context This package contains the Spring TestContext Framework which provides annotation-driven unit and integration testing support that is agnostic of the actual testing framework in use.org.springframework.test.context.cache Support for context caching within the Spring TestContext Framework.org.springframework.test.context.support Support classes for the Spring TestContext Framework.org.springframework.test.annotation中DirtiesContext.HierarchyMode的使用
返回DirtiesContext.HierarchyMode的org.springframework.test.annotation中的方法 修饰符和类型 方法 说明 DirtiesContext.HierarchyMode
hierarchyMode()
The context cache clearing mode to use when a context is configured as part of a hierarchy via@ContextHierarchy
.static DirtiesContext.HierarchyMode
DirtiesContext.HierarchyMode. valueOf(String name)
返回带有指定名称的该类型的枚举常量。static DirtiesContext.HierarchyMode[]
DirtiesContext.HierarchyMode. values()
按照声明该枚举类型的常量的顺序, 返回 包含这些常量的数组。org.springframework.test.context中DirtiesContext.HierarchyMode的使用
参数类型为DirtiesContext.HierarchyMode的org.springframework.test.context中的方法 修饰符和类型 方法 说明 void
CacheAwareContextLoaderDelegate. closeContext(MergedContextConfiguration mergedContextConfiguration, DirtiesContext.HierarchyMode hierarchyMode)
Remove the application context for the suppliedMergedContextConfiguration
from theContextCache
and close it if it is an instance ofConfigurableApplicationContext
.void
TestContext. markApplicationContextDirty(DirtiesContext.HierarchyMode hierarchyMode)
Call this method to signal that the application context associated with this test context is dirty and should be removed from the context cache.org.springframework.test.context.cache中DirtiesContext.HierarchyMode的使用
参数类型为DirtiesContext.HierarchyMode的org.springframework.test.context.cache中的方法 修饰符和类型 方法 说明 void
DefaultCacheAwareContextLoaderDelegate. closeContext(MergedContextConfiguration mergedContextConfiguration, DirtiesContext.HierarchyMode hierarchyMode)
void
ContextCache. remove(MergedContextConfiguration key, DirtiesContext.HierarchyMode hierarchyMode)
Remove the context with the given key from the cache and explicitly close it if it is an instance ofConfigurableApplicationContext
.void
DefaultContextCache. remove(MergedContextConfiguration key, DirtiesContext.HierarchyMode hierarchyMode)
Remove the context with the given key from the cache and explicitly close it if it is an instance ofConfigurableApplicationContext
.org.springframework.test.context.support中DirtiesContext.HierarchyMode的使用
参数类型为DirtiesContext.HierarchyMode的org.springframework.test.context.support中的方法 修饰符和类型 方法 说明 protected void
AbstractDirtiesContextTestExecutionListener. dirtyContext(TestContext testContext, DirtiesContext.HierarchyMode hierarchyMode)
Mark the application context of the supplied test context as dirty and setREINJECT_DEPENDENCIES_ATTRIBUTE
in the test context totrue
.void
DefaultTestContext. markApplicationContextDirty(DirtiesContext.HierarchyMode hierarchyMode)
Mark the application context associated with this test context as dirty (i.e., by removing it from the context cache and closing it).