How will I test multiple values using TestNG? for example a method that returns true
for a parameter < 80 and false
otherwise?
I find an answer on JUnit looped test
For your case you could repeat 100 times:
@ParameterizedTest @MethodSource("args") public void so(int argument) { assertTrue((argument < 80) == someMethod(argument)); }
private static IntStream args()
{
return IntStream.range(0, 100);
}
Aucun commentaire:
Enregistrer un commentaire