Class IgnoredTestsRunnerBuilder


  • public class IgnoredTestsRunnerBuilder
    extends org.junit.internal.builders.AllDefaultPossibilitiesBuilder
    This class builds Runners that run only tests annotated with Ignore. For JUnit3 tests, this is limited to class-level granularity: applying @Ignore to a JUnit3 test method has no effect. Tests annotated with RunWith are run only if they are Suites or are @RunWith(JUnit4.class), as in general it's impossible to know how a custom runner will behave. Most notably, this means Parameterized tests are not run (yet).

    AllDefaultPossibilitiesBuilder builds a Runner by querying the 5 sub-builders obtained from calling ignoredBuilder(), annotatedBuilder(), suiteMethodBuilder(), junit3Builder(), and junit4Builder() in turn until one of them returns a non-null runner. Here we override some of these methods to return RunnerBuilders that create runners that invert the sense of Ignore annotations.

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected org.junit.internal.builders.AnnotatedBuilder annotatedBuilder()  
      protected org.junit.internal.builders.IgnoredBuilder ignoredBuilder()  
      protected org.junit.internal.builders.JUnit3Builder junit3Builder()  
      protected org.junit.internal.builders.JUnit4Builder junit4Builder()  
      • Methods inherited from class org.junit.internal.builders.AllDefaultPossibilitiesBuilder

        runnerForClass, suiteMethodBuilder
      • Methods inherited from class org.junit.runners.model.RunnerBuilder

        runners, runners, safeRunnerForClass
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • ignoredBuilder

        protected org.junit.internal.builders.IgnoredBuilder ignoredBuilder()
        Overrides:
        ignoredBuilder in class org.junit.internal.builders.AllDefaultPossibilitiesBuilder
      • annotatedBuilder

        protected org.junit.internal.builders.AnnotatedBuilder annotatedBuilder()
        Overrides:
        annotatedBuilder in class org.junit.internal.builders.AllDefaultPossibilitiesBuilder
      • junit3Builder

        protected org.junit.internal.builders.JUnit3Builder junit3Builder()
        Overrides:
        junit3Builder in class org.junit.internal.builders.AllDefaultPossibilitiesBuilder
      • junit4Builder

        protected org.junit.internal.builders.JUnit4Builder junit4Builder()
        Overrides:
        junit4Builder in class org.junit.internal.builders.AllDefaultPossibilitiesBuilder