How to set params not as a string
TeodorKolev opened this issue · 2 comments
TeodorKolev commented
How to set params not as a string? Example:
private String myString = SomeStaticClass.myString;
...
@parameters({"SomeString, 20, myString"})
woprzech commented
Hello, you can use @Parameters
annotation with method's name.
@Test
@Parameters(method = "stringParams")
public void testSingleMethodName(String string) {
// ...
}
private List<String> stringParams() {
return Arrays.asList("SomeString", "20", SomeStaticClass.myString);
}
TeodorKolev commented
@woprzech thank you