Class DefensiveAllDefaultPossibilitiesBuilder.DefensiveJUnit4Builder

  • Enclosing class:
    DefensiveAllDefaultPossibilitiesBuilder

    private static class DefensiveAllDefaultPossibilitiesBuilder.DefensiveJUnit4Builder
    extends org.junit.internal.builders.JUnit4Builder
    Customization of JUnit4Builder that ignores classes that do not contain any test methods in order not to report errors for them.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static java.util.function.Predicate<java.lang.reflect.Method> isPotentialJUnit4TestMethod  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      private boolean containsTestMethods​(java.lang.Class<?> testClass)  
      org.junit.runner.Runner runnerForClass​(java.lang.Class<?> testClass)  
      • 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
    • Field Detail

      • isPotentialJUnit4TestMethod

        private static final java.util.function.Predicate<java.lang.reflect.Method> isPotentialJUnit4TestMethod
    • Constructor Detail

      • DefensiveJUnit4Builder

        private DefensiveJUnit4Builder()
    • Method Detail

      • runnerForClass

        public org.junit.runner.Runner runnerForClass​(java.lang.Class<?> testClass)
                                               throws java.lang.Throwable
        Overrides:
        runnerForClass in class org.junit.internal.builders.JUnit4Builder
        Throws:
        java.lang.Throwable
      • containsTestMethods

        private boolean containsTestMethods​(java.lang.Class<?> testClass)