Skip to content

Migrate to JUnit5 - Part 2#4028

Merged
oowekyala merged 36 commits into
pmd:pmd/7.0.xfrom
adangel:pmd7-junit5-part2
Nov 24, 2022
Merged

Migrate to JUnit5 - Part 2#4028
oowekyala merged 36 commits into
pmd:pmd/7.0.xfrom
adangel:pmd7-junit5-part2

Conversation

@adangel

@adangel adangel commented Jun 30, 2022

Copy link
Copy Markdown
Member

Describe the PR

This is the continuation of #3945. It includes part 1. Once part 1 is merged to pmd/7.0.x, this PR should appear smaller.

  • Migrate tests in pmd-apex
  • Migrate tests in other modules

Related issues

Ready?

  • Added unit tests for fixed bug/feature
  • Passing all unit tests
  • Complete build ./mvnw clean verify passes (checked automatically by github actions)
  • Added (in-code) documentation (if needed)

@adangel adangel added this to the 7.0.0 milestone Jun 30, 2022
@ghost

ghost commented Jun 30, 2022

Copy link
Copy Markdown
1 Message
📖 No regression tested rules have been changed.

Generated by 🚫 Danger

@adangel adangel mentioned this pull request Oct 3, 2022
3 tasks
@adangel adangel marked this pull request as ready for review October 3, 2022 14:38
@adangel

adangel commented Oct 3, 2022

Copy link
Copy Markdown
Member Author

I think, this "Part 2" is ready now. It's very big, but all changes follow a simple theme:

  • Use JUnit5 Test annotation
  • Use static imports for Assertions (and sometimes adjust the parameter order, e.g. the message parameter is different in JUnit5)
  • Make test classes and methods package private
  • Add dependency for junit-jupiter and system-lambda, where needed

There are no function changes (at least, there should be no...).

I didn't remove the old junit dependencies yet, that's a task for the next part (see tasks in #3797).
Also base tests for CLI, RuleSetFactory and LanguageVersions are not migrated yet and will be my
next task.

@adangel adangel mentioned this pull request Oct 13, 2022
13 tasks
@oowekyala oowekyala self-requested a review October 13, 2022 22:35
@oowekyala oowekyala self-assigned this Oct 13, 2022
@oowekyala oowekyala merged commit a1a580a into pmd:pmd/7.0.x Nov 24, 2022
@adangel adangel deleted the pmd7-junit5-part2 branch November 25, 2022 18:58
@adangel adangel added the in:testing About tests of pmd, eg the module pmd-lang-test or pmd-test [test] label Jan 12, 2023
@adangel adangel mentioned this pull request Jan 23, 2023
55 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

in:testing About tests of pmd, eg the module pmd-lang-test or pmd-test [test]

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants