All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.junit.internal.requests.SortingRequest Maven / Gradle / Ivy

There is a newer version: 2.12.15
Show newest version
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;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy