KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > junit > internal > requests > SortingRequest


1 package org.junit.internal.requests;
2
3 import java.util.Comparator JavaDoc;
4
5 import org.junit.runner.Description;
6 import org.junit.runner.Request;
7 import org.junit.runner.Runner;
8 import org.junit.runner.manipulation.Sorter;
9
10 public class SortingRequest extends Request {
11     private final Request fRequest;
12     private final Comparator JavaDoc<Description> fComparator;
13
14     public SortingRequest(Request request, Comparator JavaDoc<Description> comparator) {
15         fRequest= request;
16         fComparator= comparator;
17     }
18
19     @Override JavaDoc
20     public Runner getRunner() {
21         Runner runner= fRequest.getRunner();
22         new Sorter(fComparator).apply(runner);
23         return runner;
24     }
25 }
26
Popular Tags