A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/pmd/pmd/issues/3341 below:

[java] JUnitTestsShouldIncludeAssert should support Junit 5 · Issue #3341 · pmd/pmd · GitHub

Affects PMD Version: 6.35.0

Rule: JUnitTestsShouldIncludeAssert

Description: Assertion methods are in a class named Assertions in JUnit 5. The rule doesn't handle that for now.

Code Sample demonstrating the issue:

import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.Assertions;
class Test {
  @Test 
  void someTest() {
    Assertions.assertEquals("a", "b");
  }
}

Expected outcome: No violation

PMD reports a violation at line ..., but that's wrong. That's a false positive.

Running PMD through: any


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4