mardi 28 avril 2020

Parameterized Test with two Arguments in JUnit 5 jupiter

How can I write a parameterized test with two arguments in JUnit 5 jupiter? The following does not work (compile error):

@ParameterizedTest
@ValueSource(strings = { "a", "b", "foo" })
@ValueSource(ints = { 1, 2, 3 })
public void test(String arg1, int arg2) {...}

Aucun commentaire:

Enregistrer un commentaire