A RetroSearch Logo

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

Search Query:

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

Add support for Hamcrest MatcherAssert.assertThat · Issue #2288 · pmd/pmd · GitHub

Affects PMD Version: 6.20.0
Rule: JUnitTestsShouldIncludeAssert
Description:
the MatcherAssert.assertThat is not counted as assertion rule

Code Sample demonstrating the issue:

import org.hamcrest.MatcherAssert;
import org.hamcrest.Matchers;
import org.junit.jupiter.api.Test;

class JUnitTestsShouldIncludeAssertRule {
    @Test
    void hamcrest_assert_should_pass_include_test() {
        MatcherAssert.assertThat("java/rule/bestpractices/JUnitTestsShouldIncludeAssertRule should pass for MatcherAssert.assertThat", "PMD 6.20.0", Matchers.is("PMD 6.20.0"));
    }
}

Running PMD through: Gradle 6.1.1


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