Rule Set:
TestClassWithoutTestCases
Description:
In Junit5 tests, tests do not require a public modifier any longer. However, PMD reports (without the modifier) that there are no test cases.
Code Sample demonstrating the issue:
import org.junit.jupiter.api.Test;
class JUnit5Test {
@Test
void myTest() {
}
}
Adding public to the test removes the error.
Running PMD through: Maven
Rule Set:
TestClassWithoutTestCases
Description:
In Junit5 tests, tests do not require a public modifier any longer. However, PMD reports (without the modifier) that there are no test cases.
Code Sample demonstrating the issue:
Adding
publicto the test removes the error.Running PMD through: Maven