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

holmos.webtest.junitextentions.HolmosSort Maven / Gradle / Ivy

There is a newer version: 1.0.2u10
Show newest version
package holmos.webtest.junitextentions;

import holmos.webtest.junitextentions.annotations.RunAfter;

import java.util.Comparator;

import org.junit.runner.Description;

/**
 * 排序类
 * 
 * @author 吴银龙([email protected])
 * */
public class HolmosSort implements Comparator{
	
	@Override
	public int compare(Description o1, Description o2) {
		if(o1.getAnnotation(RunAfter.class)==null)return 0;
		String priorMethodOfO1=o1.getAnnotation(RunAfter.class).methodName();
		if(priorMethodOfO1.equalsIgnoreCase(o2.getMethodName())){
			return 1;
		}
		return 0;
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy