Sorter (JUnit API)

Junit


org.junit.runner.manipulation Class Sorter

java.lang.Object
  extended by org.junit.runner.manipulation.Sorter
所有已实现接口:
Comparator<Description>

public class Sorter
extends Object
implements Comparator<Description>

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


字段摘要
static Sorter NULL
          NULL is a Sorter that leaves elements in an undefined order
 
构造器摘要
Sorter(Comparator<Description> comparator)
          Creates a Sorter that uses comparator to sort tests
 
方法摘要
 void apply(Object object)
          Sorts the test in runner using comparator
 int compare(Description o1, Description o2)
           
 
类方法继承: java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Comparator
equals
 

字段详细信息

NULL

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

构造器详细信息

Sorter

public Sorter(Comparator<Description> comparator)
Creates a Sorter that uses comparator to sort tests

参数:
comparator - the Comparator to use when sorting tests

方法详细信息

apply

public void apply(Object object)
Sorts the test in runner using comparator

参数:
object -

compare

public int compare(Description o1,
                   Description o2)
规范说明:
compare in interface Comparator<Description>