Example #1
0
 /** @return a new Request, which contains all of the same tests, but in a new order. */
 public Request sortRequest(Request request) {
   if (request instanceof SortingRequest) {
     // We'll pay big karma points for this
     return request;
   }
   List<Description> leaves = findLeaves(request);
   Collections.sort(leaves, fHistory.testComparator());
   return constructLeafRequest(leaves);
 }
Example #2
0
 /**
  * Run all the tests contained in <code>request</code>.
  *
  * <p>This variant should be used if {@code core} has attached listeners that this run should
  * notify.
  *
  * @param request the request describing tests
  * @param core a JUnitCore to delegate to.
  * @return a {@link Result} describing the details of the test run and the failed tests.
  */
 public Result run(Request request, JUnitCore core) {
   core.addListener(fHistory.listener());
   return core.run(sortRequest(request).getRunner());
 }
Example #3
0
 private MaxCore(File storedResults) {
   fHistory = MaxHistory.forFolder(storedResults);
 }