Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump JUnit 4.x to JUnit Jupiter 5 #152

Merged
merged 2 commits into from
May 19, 2024

Conversation

AlexandreCarlton
Copy link
Collaborator

This change is being made to facilitate parameterised tests which should greatly aid in adding coverage for #148.

This was largely powered by the OpenRewrite recipe for JUnit 4.x to Jupiter migration, with a few extra tweaks:

  • imports optimised to be single-class (i.e. no import foo.*;).
  • removed test_ prefix from legacy JUnit 3 methods.

Notably, this pulls in org.hamcrest for MatcherAssert.assertThat, which is recommended by both the recipe (which handled this migration) and IntelliJ.

This doesn't migrate the tests - this will happen in a separate commit.
This change is being made to faciliate parameterised tests which should
greatly aid in adding coverage for graphql-java#148.

This was largely powered by the [OpenRewrite recipe](https://docs.openrewrite.org/recipes/java/testing/junit5/junit4to5migration) for JUnit 4.x to
Jupiter migration, with a few extra tweaks:

 - imports optimised to be single-class (i.e. no `import foo.*;`).
 - removed `test_` prefix from legacy JUnit 3 methods.

Notably, this pulls in `org.hamcrest` for `MatcherAssert.assertThat`,
which is recommended by both the recipe (which handled this migration)
and IntelliJ.
Copy link
Member

@bbakerman bbakerman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NIce really nice - this Open Write stuff might be ok!

@bbakerman bbakerman merged commit 856a2b7 into graphql-java:master May 19, 2024
1 check passed
@dondonz dondonz added this to the Next release 3.4.0 milestone May 19, 2024
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.

3 participants