【发布时间】:2018-12-23 07:40:00
【问题描述】:
我使用 TestNG 6.11 编写了这行代码:
Annotation[] annotations = (Annotation[]) myResult.getMethod().getMethod().getDeclaredAnnotations();
现在这段代码无法在 Maven 7.0.0-Beta1 上编译。
怎么办?
错误:
cannot find symbol [ERROR] symbol: method getMethod() [ERROR] location: interface org.testng.ITestNGMethod
【问题讨论】:
-
我的意思是 TestNG = 7.0.0 Beta-1,而不是 Maven。错误:找不到符号 [ERROR] 符号:方法 getMethod() [ERROR] 位置:接口 org.testng.ITestNGMethod
-
你遇到了什么错误?
-
@TalAngel 请在您的问题中也包含该错误。