Class Sorter

java.lang.Object
org.junit.runner.manipulation.Ordering
org.junit.runner.manipulation.Sorter
All Implemented Interfaces:
Comparator<Description>
Direct Known Subclasses:
Alphanumeric

public class Sorter extends Ordering implements Comparator<Description>
A Sorter orders tests. In general you will not need to use a Sorter directly. Instead, use Request.sortWith(Comparator).
Since:
4.0
  • Field Details

    • NULL

      public static final Sorter NULL
      NULL is a Sorter that leaves elements in an undefined order
    • comparator

      private final Comparator<Description> comparator
  • Constructor Details

    • Sorter

      public Sorter(Comparator<Description> comparator)
      Creates a Sorter that uses comparator to sort tests
      Parameters:
      comparator - the Comparator to use when sorting tests
      Since:
      4.0
  • Method Details