类 TestAnnotationUtils


  • public class TestAnnotationUtils
    extends Object
    Collection of utility methods for working with Spring's core testing annotations.
    从以下版本开始:
    4.2
    作者:
    Sam Brannen
    • 方法详细资料

      • getTimeout

        public static long getTimeout​(Method method)
        Get the timeout configured via the @Timed annotation on the supplied method.

        Negative configured values will be converted to 0.

        返回:
        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 supplied method.

        Non-negative configured values will be converted to 1.

        返回:
        the configured repeat count, or 1 if the method is not annotated with @Repeat