All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.junit.runner.manipulation.Alphanumeric Maven / Gradle / Ivy

Go to download

JUnit is a unit testing framework for Java, created by Erich Gamma and Kent Beck.

There is a newer version: 4.13.2
Show newest version
package org.junit.runner.manipulation;

import java.util.Comparator;

import org.junit.runner.Description;

/**
 * A sorter that orders tests alphanumerically by test name.
 *
 * @since 4.13
 */
public final class Alphanumeric extends Sorter implements Ordering.Factory {

    public Alphanumeric() {
        super(COMPARATOR);
    }

    public Ordering create(Context context) {
        return this;
    }

    private static final Comparator COMPARATOR = new Comparator() {
        public int compare(Description o1, Description o2) {
            return o1.getDisplayName().compareTo(o2.getDisplayName());
        }
    };
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy