我正在学习 JUnit,并且代码中的以下点出现以下错误:
The attribute method is undefined for the annotation type Parameterized.Parameters
方法是:
@Test
@Parameters(method = "getMoney")
private static final Object[] getMoney() {
return new Object[]{
new Object[]{10, "USD"},
new Object[]{20, "EUR"}
};
}
我已添加 JUnit 和 JUnitParams 来构建路径。
最佳答案
您使用了错误的Parameters
类。请使用
import junitparams.Parameters;
关于java - Junit 中的参数化,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33505554/