Class PerDirectorySuite

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

    public class PerDirectorySuite
    extends org.junit.runners.Suite
    PerDirectorySuite runs a test class once for each set of javaFiles returned by its method marked with @Parameters

    To use:
    Annotated your test class with @RunWith(PerDirectorySuite.class)
    Create a javaFiles method by annotating a public static method with @Parameters. This method must return either a List<File> where each element of the list is a Java file to test against OR a String [] where each String in the array is a directory in the tests directory.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static interface  PerDirectorySuite.Name
      Name
      • Nested classes/interfaces inherited from class org.junit.runners.Suite

        org.junit.runners.Suite.SuiteClasses
    • Constructor Summary

      Constructors 
      Constructor Description
      PerDirectorySuite​(java.lang.Class<?> klass)
      Only called reflectively.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected java.util.List<org.junit.runner.Runner> getChildren()  
      protected java.io.File resolveTestDirectory()
      Resolves the directory specified by TestRootDirectory or defaults to currentDir/tests.
      • Methods inherited from class org.junit.runners.Suite

        describeChild, emptySuite, runChild
      • Methods inherited from class org.junit.runners.ParentRunner

        childrenInvoker, classBlock, classRules, collectInitializationErrors, createTestClass, filter, getDescription, getName, getRunnerAnnotations, getTestClass, isIgnored, order, run, runLeaf, setScheduler, sort, validatePublicVoidNoArgMethods, withAfterClasses, withBeforeClasses, withInterruptIsolation
      • Methods inherited from class org.junit.runner.Runner

        testCount
      • Methods inherited from class java.lang.Object

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

      • PerDirectorySuite

        public PerDirectorySuite​(java.lang.Class<?> klass)
                          throws java.lang.Throwable
        Only called reflectively. Do not use programmatically.
        Parameters:
        klass - the class whose tests to run
        Throws:
        java.lang.Throwable
    • Method Detail

      • getChildren

        protected java.util.List<org.junit.runner.Runner> getChildren()
        Overrides:
        getChildren in class org.junit.runners.Suite
      • resolveTestDirectory

        protected final java.io.File resolveTestDirectory()
        Resolves the directory specified by TestRootDirectory or defaults to currentDir/tests.
        Returns:
        the resolved directory