Reports parameterized tests that have malformed sources:
MethodSource
has an unknown target or the method is not static, no-arg
.ValueSource
and EnumSource
types cannot be converted to method parameters.Example:
class Test {
@MethodSource("parameters")
@ParameterizedTest
void foo(String param) {}
}
After the quick-fix is applied:
class Test {
private static Stream<Arguments> parameters() {
return Stream.empty();
}
@MethodSource("parameters")
@ParameterizedTest
void foo(String param) {}
}