站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > Spring Framework 2.1.0 API 文档英文版

DirtiesContext (Spring Framework API 2.1) - Spring Framework 2.1.0 API 文档英文版


The Spring Framework

org.springframework.test.annotation
Annotation Type DirtiesContext


@Target(value=METHOD)
@Retention(value=RUNTIME)
@Inherited
@Documented
public @interface DirtiesContext

Test annotation to indicate that a test method dirties the context for the current test. Using this annotation is less error-prone than calling setDirty() explicitly because the call to setDirty() is guaranteed to occur, even if the test failed. If only a particular code path in the test dirties the context, prefer calling setDirty() explicitly--and take care!

Since:
2.0
Author:
Rod Johnson
See Also:
AbstractDependencyInjectionSpringContextTests


The Spring Framework

Copyright © 2002-2007 The Spring Framework.