我有一个现有的自动化框架,该框架是我在eclipse和一个类文件中导入的,它在类内部具有以下代码-
// ~ Inner Classes --------------------------------------------------------
/** Arranges methods by classname and method name */
private class Testsorter implements Comparator<IInvokedMethod> {
// ~ Methods
// -------------------------------------------------------------
/** Arranges methods by classname and method name */
@SuppressWarnings("unchecked")
@Override
public int compare(IInvokedMethod o1,IInvokedMethod o2) {
int r = o1.getTestMethod().getTestClass().getName().compareTo(o2.getTestMethod().getTestClass().getName());
if (r == 0) {
r = o1.getTestMethod().compareTo(o2.getTestMethod());
}
return r;
}
}
但显示以下TestNG
相关的编译错误-The method compareTo(ITestNGMethod) is undefined for the type ITestNGMethod
我团队中的其他人看不到此问题,但我知道。有人可以帮忙了解这里可能出什么问题以及如何解决此问题吗?