Class RunnerBuilder


  • public abstract class RunnerBuilder
    extends Object
    A RunnerBuilder is a strategy for constructing runners for classes. Only writers of custom runners should use RunnerBuilders. A custom runner class with a constructor taking a RunnerBuilder parameter will be passed the instance of RunnerBuilder used to build that runner itself. For example, imagine a custom runner that builds suites based on a list of classes in a text file:
     \@RunWith(TextFileSuite.class)
     \@SuiteSpecFile("mysuite.txt")
     class MySuite {}
     
    The implementation of TextFileSuite might include:
     public TextFileSuite(Class testClass, RunnerBuilder builder) {
       // ...
       for (String className : readClassNames())
         addRunner(builder.runnerForClass(Class.forName(className)));
       // ...
     }
     
    Since:
    4.5
    See Also:
    Suite