Class RuleTestRunner

  • All Implemented Interfaces:
    org.junit.runner.Describable, org.junit.runner.manipulation.Filterable, org.junit.runner.manipulation.Orderable, org.junit.runner.manipulation.Sortable

    public class RuleTestRunner
    extends org.junit.runners.ParentRunner<TestDescriptor>
    A JUnit Runner, that executes all declared rule tests in the class. It supports Before and After methods as well as TestRules.
    Author:
    Andreas Dangel
    • Constructor Detail

      • RuleTestRunner

        public RuleTestRunner​(Class<? extends RuleTst> testClass)
                       throws org.junit.runners.model.InitializationError
        Throws:
        org.junit.runners.model.InitializationError
    • Method Detail

      • describeChild

        protected org.junit.runner.Description describeChild​(TestDescriptor testCase)
        Specified by:
        describeChild in class org.junit.runners.ParentRunner<TestDescriptor>
      • hasUnitTests

        public boolean hasUnitTests()
        Checks whether this test class has additionally unit test methods.
        Returns:
        true if there is at least one unit test method.
      • runChild

        protected void runChild​(TestDescriptor testCase,
                                org.junit.runner.notification.RunNotifier notifier)
        Specified by:
        runChild in class org.junit.runners.ParentRunner<TestDescriptor>
      • isIgnored

        protected boolean isIgnored​(TestDescriptor child)
        Overrides:
        isIgnored in class org.junit.runners.ParentRunner<TestDescriptor>