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 unit testing framework for Java, created by Erich Gamma and Kent Beck.
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 request;
private final Comparator comparator;
public SortingRequest(Request request, Comparator comparator) {
this.request = request;
this.comparator = comparator;
}
@Override
public Runner getRunner() {
Runner runner = request.getRunner();
new Sorter(comparator).apply(runner);
return runner;
}
}