1 package org.junit.runner.manipulation; 2 3 import java.util.Comparator; 4 5 import org.junit.runner.Description; 6 7 /** 8 * A sorter that orders tests alphanumerically by test name. 9 * 10 * @since 4.13 11 */ 12 public final class Alphanumeric extends Sorter implements Ordering.Factory { 13 Alphanumeric()14 public Alphanumeric() { 15 super(COMPARATOR); 16 } 17 create(Context context)18 public Ordering create(Context context) { 19 return this; 20 } 21 22 private static final Comparator<Description> COMPARATOR = new Comparator<Description>() { 23 public int compare(Description o1, Description o2) { 24 return o1.getDisplayName().compareTo(o2.getDisplayName()); 25 } 26 }; 27 } 28