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

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

Go to download

JUnit is a unit testing framework for Java, created by Erich Gamma and Kent Beck.

There is a newer version: 4.13.2
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