org.junit.internal.requests.SortingRequest Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of junit Show documentation
Show all versions of junit Show documentation
JUnit is a regression testing framework written by Erich Gamma and Kent Beck.
It is used by the developer who implements unit tests in Java.
package org.junit.internal.requests;
import java.util.Comparator;
import org.junit.runner.Description;
import org.junit.runner.Request;
import org.junit.runner.Runner;
import org.junit.runner.manipulation.Sorter;
public class SortingRequest extends Request {
private final Request fRequest;
private final Comparator fComparator;
public SortingRequest(Request request, Comparator comparator) {
fRequest = request;
fComparator = comparator;
}
@Override
public Runner getRunner() {
Runner runner = fRequest.getRunner();
new Sorter(fComparator).apply(runner);
return runner;
}
}