程序包 org.springframework.test.annotation
Support classes for annotation-driven tests.
接口概要 接口 说明 ProfileValueSource Strategy interface for retrieving profile values for a given testing environment.类概要 类 说明 ProfileValueUtils General utility methods for working with profile values.SystemProfileValueSource Implementation ofProfileValueSource
which uses system properties as the underlying source.TestAnnotationUtils Collection of utility methods for working with Spring's core testing annotations.枚举概要 枚举 说明 DirtiesContext.ClassMode Defines modes which determine how@DirtiesContext
is interpreted when used to annotate a test class.DirtiesContext.HierarchyMode Defines modes which determine how the context cache is cleared when@DirtiesContext
is used in a test whose context is configured as part of a hierarchy via@ContextHierarchy
.DirtiesContext.MethodMode Defines modes which determine how@DirtiesContext
is interpreted when used to annotate a test method.注释类型概要 注释类型 说明 Commit @Commit
is a test annotation that is used to indicate that a test-managed transaction should be committed after the test method has completed.DirtiesContext Test annotation which indicates that theApplicationContext
associated with a test is dirty and should therefore be closed and removed from the context cache.IfProfileValue Test annotation for use with JUnit 4 to indicate whether a test is enabled or disabled for a specific testing profile.ProfileValueSourceConfiguration ProfileValueSourceConfiguration
is a class-level annotation for use with JUnit 4 which is used to specify what type ofProfileValueSource
to use when retrieving profile values configured via@IfProfileValue
.Repeat Test annotation for use with JUnit 4 to indicate that a test method should be invoked repeatedly.Rollback @Rollback
is a test annotation that is used to indicate whether a test-managed transaction should be rolled back after the test method has completed.Timed Test annotation for use with JUnit 4 to indicate that a test method has to finish execution in a specified time period.