相关疑难解决方法(0)

如何用理论附加DataPoint?

@DataPoints public static final Integer[] input1={1,2};
@Theory
@Test
public void test1(int input1){

}

@DataPoints public static final Integer[] input2={3,4};
@Theory
@Test
public void test2(int input2 ){

}
Run Code Online (Sandbox Code Playgroud)

我希望test1运行数据集input1 - {1,2},test2运行input2 - {3,4}.但目前每个测试都使用两个数据集{1,2,3,4}运行.如何将特定的@DataPoints绑定到特定的@Theorys

theory junit datapoint

18
推荐指数
2
解决办法
8954
查看次数

标签 统计

datapoint ×1

junit ×1

theory ×1