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

Migrate away from method deprecated in JUnit 4.13 #24

Open
basil opened this issue Aug 18, 2023 · 1 comment
Open

Migrate away from method deprecated in JUnit 4.13 #24

basil opened this issue Aug 18, 2023 · 1 comment
Labels
recipe Requests for new automated code changes

Comments

@basil
Copy link
Contributor

basil commented Aug 18, 2023

In JUnit 4.13 org.junit.Assert.assertThat was deprecated in favor of org.hamcrest.MatcherAssert.assertThat. Many plugins still use the old import.

@sghill
Copy link
Collaborator

sghill commented Aug 18, 2023

Good news! org.openrewrite.java.testing.junit5.UseHamcrestAssertThat does this.

There are also migration recipes for JUnit 4.x to 5.x. I tried that out in jenkinsci/build-timeout-plugin#122 and it worked great. The only thing Jenkins-specific I saw missing was @JenkinsRule -> @WithJenkins.

@timtebeek timtebeek moved this to Recipes Wanted in OpenRewrite Aug 18, 2023
@timtebeek timtebeek added the recipe Requests for new automated code changes label Aug 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
recipe Requests for new automated code changes
Projects
Status: Recipes Wanted
Development

No branches or pull requests

3 participants