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 regression testing framework written by Erich Gamma and Kent Beck. It is used by the developer who implements unit tests in Java.

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 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;
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy