Class TestAnnotationUtils
- java.lang.Object
- org.springframework.test.annotation.TestAnnotationUtils
public class TestAnnotationUtils extends Object
Collection of utility methods for working with Spring's core testing annotations.- Since:
- 4.2
- Author:
- Sam Brannen
Constructor Summary
Constructors Constructor Description TestAnnotationUtils()
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static int
getRepeatCount(Method method)
Get the repeat count configured via the@Repeat
annotation on the suppliedmethod
.static long
getTimeout(Method method)
Constructor Detail
TestAnnotationUtils
public TestAnnotationUtils()
Method Detail
getTimeout
public static long getTimeout(Method method)
Get thetimeout
configured via the@Timed
annotation on the suppliedmethod
.Negative configured values will be converted to
0
.- Returns:
- the configured timeout, or
0
if the method is not annotated with@Timed
getRepeatCount
public static int getRepeatCount(Method method)
Get the repeat count configured via the@Repeat
annotation on the suppliedmethod
.Non-negative configured values will be converted to
1
.- Returns:
- the configured repeat count, or
1
if the method is not annotated with@Repeat