Skip to content

Commit

Permalink
Merge pull request #267 from it-at-m/maint/add-pmd-rule
Browse files Browse the repository at this point in the history
Added Rule for Test-Naming convention
  • Loading branch information
devtobi authored Nov 20, 2024
2 parents 43bba5a + 78bd34a commit afb9b78
Showing 1 changed file with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,18 @@
</rule>
<rule ref="category/java/bestpractices.xml/UnitTestShouldIncludeAssert">
<properties>
<!-- From Spring WebTestClient -->
<property name="extraAssertMethodNames" value="expectStatus,expectHeader" />
<!-- From Spring WebTestClient and MockMVC -->
<property name="extraAssertMethodNames" value="expectStatus,expectHeader,andExpect" />
</properties>
</rule>
<rule ref="category/java/codestyle.xml/MethodNamingConventions">
<properties>
<property name="junit5TestPattern" value="[a-z]([a-zA-Z0-9]*[a-zA-Z]_?)*[a-zA-Z0-9]*" />
</properties>
</rule>
<rule ref="category/java/codestyle.xml/CommentDefaultAccessModifier">
<properties>
<property name="ignoredAnnotations" value="android.support.annotation.VisibleForTesting,co.elastic.clients.util.VisibleForTesting,com.google.common.annotations.VisibleForTesting,org.junit.jupiter.api.AfterAll,org.junit.jupiter.api.AfterEach,org.junit.jupiter.api.BeforeAll,org.junit.jupiter.api.BeforeEach,org.junit.jupiter.api.RepeatedTest,org.junit.jupiter.api.Test,org.junit.jupiter.api.TestFactory,org.junit.jupiter.api.TestTemplate,org.junit.jupiter.api.extension.RegisterExtension,org.junit.jupiter.params.ParameterizedTest,org.testng.annotations.AfterClass,org.testng.annotations.AfterGroups,org.testng.annotations.AfterMethod,org.testng.annotations.AfterSuite,org.testng.annotations.AfterTest,org.testng.annotations.BeforeClass,org.testng.annotations.BeforeGroups,org.testng.annotations.BeforeMethod,org.testng.annotations.BeforeSuite,org.testng.annotations.BeforeTest,org.testng.annotations.Test,org.junit.jupiter.api.Nested" />
</properties>
</rule>
</ruleset>

0 comments on commit afb9b78

Please sign in to comment.