org.testng.PreserveOrderMethodInterceptor Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of testng Show documentation
Show all versions of testng Show documentation
A testing framework for the JVM
package org.testng;
import org.testng.internal.MethodInstance;
import java.util.List;
/**
* A method interceptor that preserves the order in which test classes were found in the
* <test> tag.
*
* @author cbeust
*/
class PreserveOrderMethodInterceptor implements IMethodInterceptor {
@Override
public List intercept(List methods, ITestContext context) {
methods.sort(MethodInstance.SORT_BY_INDEX);
return methods;
}
}