private static Stream<Arguments> basenameKeyArguments() { // Violation!
return Stream.of(
Arguments.of("simple", "simple"),
Arguments.of("simple", "one/two/many/simple"),
Arguments.of("simple", "//////an/////awful/key////simple")
);
}
@ParameterizedTest
@MethodSource("basenameKeyArguments")
void basenameKeyTest(final String expected, final String testString) {
assertEquals(expected, NetworkTable.basenameKey(testString));
}
Rule: UnusedPrivateMethod
Description: We should update the UnusedPrivateMethod to look for and not flag JUnit 5 parameterized test method sources. Although these methods are not being used by our code, junit is using them.
Code Sample demonstrating the issue: