类 TestAnnotationUtils
- java.lang.Object
- org.springframework.test.annotation.TestAnnotationUtils
public abstract class TestAnnotationUtils extends Object
Collection of utility methods for working with Spring's core testing annotations.- 从以下版本开始:
- 4.2
- 作者:
- Sam Brannen
构造器概要
构造器 构造器 说明 TestAnnotationUtils()
方法概要
所有方法 静态方法 具体方法 修饰符和类型 方法 说明 static intgetRepeatCount(Method method)Get the repeat count configured via the@Repeatannotation on the suppliedmethod.static longgetTimeout(Method method)
构造器详细资料
TestAnnotationUtils
public TestAnnotationUtils()
方法详细资料
getTimeout
public static long getTimeout(Method method)
Get thetimeoutconfigured via the@Timedannotation on the suppliedmethod.Negative configured values will be converted to
0.- 返回:
- the configured timeout, or
0if the method is not annotated with@Timed
getRepeatCount
public static int getRepeatCount(Method method)
Get the repeat count configured via the@Repeatannotation on the suppliedmethod.Non-negative configured values will be converted to
1.- 返回:
- the configured repeat count, or
1if the method is not annotated with@Repeat