A @ParameterizedTest that takes no argument should "fail".
If a @ParameterizedTest does not have any source it fails:
PreconditionViolationException: Configuration error: You must configure at least one arguments source for this @ParameterizedTest
This @ParameterizedTest passes without taking any argument:
@ParameterizedTest
@ValueSource(strings = { "foo", "bar" })
void methodDoesNotTakeAnyParameter() {}
I suggest a @ParameterizedTest to fail if it takes no arguments at all with a PreconditionViolationException or similar, or is there any valid reason to have a @ParameterizedTest without an argument?
A
@ParameterizedTestthat takes no argument should "fail".If a
@ParameterizedTestdoes not have any source it fails:This
@ParameterizedTestpasses without taking any argument:I suggest a
@ParameterizedTestto fail if it takes no arguments at all with aPreconditionViolationExceptionor similar, or is there any valid reason to have a@ParameterizedTestwithout an argument?