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 virtdata-lib-realer Show documentation
Show all versions of virtdata-lib-realer Show documentation
With inspiration from other libraries
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;
}
}