Can';在groovy方法上添加多个注释?
得到了这个错误Can';在groovy方法上添加多个注释?,groovy,annotations,testng,Groovy,Annotations,Testng,得到了这个错误 when I add two annotations to a method like this @Parameters({"userName",""}) @Test public void replyMaster() { } 我的配置:jdk 1.7、testng 6.8、groovy 2.0(与groovy eclipse插件一起安装) 为什么?如果这是一个Groovy文件,那么 Multiple markers at this line - Groo
when I add two annotations to a method like this
@Parameters({"userName",""})
@Test
public void replyMaster()
{
}
我的配置:jdk 1.7、testng 6.8、groovy 2.0(与groovy eclipse插件一起安装)
为什么?如果这是一个Groovy文件,那么
Multiple markers at this line
- Groovy:unexpected token: @ @ line 40, column 2.
- Duplicate field ReplyTest.@
- Groovy:The field '@' is declared multiple times.
应该是:
@Parameters({"userName",""})
或
不确定,我没有使用TestNG。但使用Groovy,每个节点肯定可以有多个注释,只是Groovy并不是这样做列表或数组的
@Parameters(["userName",""])
@Parameters(["userName",""] as Object[])