Class AnnotationBasedTestRule

  • All Implemented Interfaces:
    org.junit.rules.TestRule
    Direct Known Subclasses:
    ConditionalFail, SkipTestRule

    public abstract class AnnotationBasedTestRule
    extends Object
    implements org.junit.rules.TestRule
    A base TestRule that allows easy writing of test rules based on method annotations.
    Author:
    Jiri Pechanec
    • Constructor Detail

      • AnnotationBasedTestRule

        public AnnotationBasedTestRule()
    • Method Detail

      • emptyStatement

        protected static org.junit.runners.model.Statement emptyStatement​(String reason,
                                                                          org.junit.runner.Description description)
      • hasAnnotation

        protected <T extends Annotation> T hasAnnotation​(org.junit.runner.Description description,
                                                         Class<T> annotationClass)