Skip to content

Commit

Permalink
supplemental: Forbid usage of @BeforeAll in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Vyom-Yadav authored and romani committed Dec 30, 2022
1 parent 069905a commit 475063f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions config/import-control-test.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
<!-- Disallow hamcrest and only allow Truth -->
<disallow pkg="org.hamcrest.CoreMatchers"/>
<disallow pkg="org.hamcrest.MatcherAssert"/>
<!-- Disallow @BeforeAll, see https://github.com/checkstyle/checkstyle/issues/12100 -->
<disallow class="org.junit.jupiter.api.BeforeAll"/>
<!-- Disallow Junit assert in favor of Truth asserts in few exceptions -->
<allow class="org.junit.jupiter.api.Assertions.assertThrows"/>
<allow class="org.junit.jupiter.api.Assertions.assertDoesNotThrow"/>
Expand Down

0 comments on commit 475063f

Please sign in to comment.