Rule Set: pmd-unit-tests:JUnitTestsShouldIncludeAssert
Description: I got this false positive, the assertion in implicit with the expected exception rule.
Code Sample demonstrating the issue:
@Rule
public ExpectedException expectedEx = ExpectedException.none();
@Test
public void testCheckStateBoOperatorNoCsId() {
expectedEx.expect(InvalidUserException.class);
expectedEx.expect(ErrorMatcher.hasCode(ErrorCodes.XXX));
xxx.yyy();
}
Running PMD through: Maven
Rule Set: pmd-unit-tests:JUnitTestsShouldIncludeAssert
Description: I got this false positive, the assertion in implicit with the expected exception rule.
Code Sample demonstrating the issue:
Running PMD through: Maven