我有一个名为
@Retention( RetentionPolicy.SOURCE )
@Target( ElementType.METHOD )
public @interface JIRA
{
/**
* The 'Key' (Bug number / JIRA reference) attribute of the JIRA issue.
*/
String key();
}
它允许添加这样的注释
@JIRA( key = "JIRA1" )
有什么办法可以让这种情况发生吗
@JIRA( key = "JIRA1", "JIRA2", ..... )
原因是,我们目前注释了测试
针对 Jira 任务或错误修复,但有时,
然后该值将由声纳解析。
问题是单个测试涵盖了超过 1 个错误。
改变你的key()
返回的函数String[]
而不是String
那么你可以使用传递各种值String[]
public @interface JIRA {
/**
* The 'Key' (Bug number / JIRA reference) attribute of the JIRA issue.
*/
String[] key();
}
像下面这样使用它
@JIRA(key = {"JIRA1", "JIRA2"})
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)