类的使用
org.springframework.test.annotation.DirtiesContext.MethodMode
使用DirtiesContext.MethodMode的程序包 程序包 说明 org.springframework.test.annotation Support classes for annotation-driven tests.org.springframework.test.context.support Support classes for the Spring TestContext Framework.org.springframework.test.annotation中DirtiesContext.MethodMode的使用
返回DirtiesContext.MethodMode的org.springframework.test.annotation中的方法 修饰符和类型 方法 说明 DirtiesContext.MethodModemethodMode()The mode to use when a test method is annotated with@DirtiesContext.static DirtiesContext.MethodModeDirtiesContext.MethodMode. valueOf(String name)返回带有指定名称的该类型的枚举常量。static DirtiesContext.MethodMode[]DirtiesContext.MethodMode. values()按照声明该枚举类型的常量的顺序, 返回 包含这些常量的数组。org.springframework.test.context.support中DirtiesContext.MethodMode的使用
参数类型为DirtiesContext.MethodMode的org.springframework.test.context.support中的方法 修饰符和类型 方法 说明 protected voidAbstractDirtiesContextTestExecutionListener. beforeOrAfterTestMethod(TestContext testContext, DirtiesContext.MethodMode requiredMethodMode, DirtiesContext.ClassMode requiredClassMode)Perform the actual work forAbstractTestExecutionListener.beforeTestMethod(org.springframework.test.context.TestContext)andAbstractTestExecutionListener.afterTestMethod(org.springframework.test.context.TestContext)by dirtying the context if appropriate (i.e., according to the required modes).