org.junit.runner.manipulation

Class Sorter

Implemented Interfaces:
Comparator

public class Sorter
extends java.lang.Object
implements Comparator

A Sorter orders tests. In general you will not need to use a Sorter directly. Instead, use org.junit.runner.Request.sortWith(Comparator).

Constructor Summary

Sorter(Comparator comparator)
Creates a Sorter that uses comparator to sort tests

Method Summary

void
apply(Runner runner)
Sorts the test in runner using comparator
int
compare(Description o1, Description o2)

Constructor Details

Sorter

public Sorter(Comparator comparator)
Creates a Sorter that uses comparator to sort tests
Parameters:
comparator - the Comparator to use when sorting tests

Method Details

apply

public void apply(Runner runner)
Sorts the test in runner using comparator
Parameters:
runner -

compare

public int compare(Description o1,
                   Description o2)