下面列出了怎么用org.junit.runners.MethodSorters的API类实例代码及写法,或者点击链接到github查看源代码。
public static Comparator<TestMethod> getTestSorter(TypeElement typeElement) {
FixMethodOrder fixMethodOrder = typeElement.getAnnotation(FixMethodOrder.class);
return fixMethodOrder != null && fixMethodOrder.value() == MethodSorters.NAME_ASCENDING
? NAME_ASCENDING
: DEFAULT;
}