In the following code, I would like to run TestMethod1
with the parameters marked with @Parameters
@RunWith(Parameterized.class)
public class Foo{
private boolean input;
private boolean expected;
public Foo(boolean input, boolean expected{
this.input=input;
this.expected=expected;
}
@Parameters
public static List<Object[]> data() {
return Arrays.asList(new Object[][]{{false, false}, {false, false}});
}
@Test
public void TestMethod1(){
assertEquals(expected, Baar.StaticMethod(input);
}
@Test
public void TestMethod2(){
assertEquals(expected, Baar.StaticMethod2(false);
}
The Problem is when I run junittes, both methods TestMethod1 and TestMethod2 are run with these parameters. How to tell the testrunner to run only TestMethod1 with the parameters marked with @Parameters?