Skip to content

Add JUnit 5 support to JUnit-related bug patterns - #5977

Draft
andrey-fomin wants to merge 1 commit into
google:masterfrom
andrey-fomin:junit5-support
Draft

Add JUnit 5 support to JUnit-related bug patterns#5977
andrey-fomin wants to merge 1 commit into
google:masterfrom
andrey-fomin:junit5-support

Conversation

@andrey-fomin

Copy link
Copy Markdown
  • Add JUnit 5 annotation constants and matchers (JUnit5 test, BeforeEach, AfterEach, BeforeAll, AfterAll, Disabled, Assertions)
  • Rename JUnit4-specific checkers to JUnit-agnostic versions: JUnit4ClassAnnotationNonStatic -> JUnitClassAnnotationNonStatic JUnit4EmptyMethods -> JUnitEmptyLifecycleMethods JUnit4SetUpNotRun -> JUnitSetUpNotRun JUnit4TearDownNotRun -> JUnitTearDownNotRun JUnit4TestNotRun -> JUnitTestNotRun
  • Update all checkers to recognize both JUnit 4 and JUnit 5 annotations
  • Update tests to cover both JUnit 4 and JUnit 5 scenarios

- Add JUnit 5 annotation constants and matchers (JUnit5 test, BeforeEach,
  AfterEach, BeforeAll, AfterAll, Disabled, Assertions)
- Rename JUnit4-specific checkers to JUnit-agnostic versions:
  JUnit4ClassAnnotationNonStatic -> JUnitClassAnnotationNonStatic
  JUnit4EmptyMethods -> JUnitEmptyLifecycleMethods
  JUnit4SetUpNotRun -> JUnitSetUpNotRun
  JUnit4TearDownNotRun -> JUnitTearDownNotRun
  JUnit4TestNotRun -> JUnitTestNotRun
- Update all checkers to recognize both JUnit 4 and JUnit 5 annotations
- Update tests to cover both JUnit 4 and JUnit 5 scenarios
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant