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

More Hamcrest Migrations for Number Matchers #379

Merged
merged 9 commits into from
Jul 11, 2023

Conversation

AlekSimpson
Copy link
Contributor

What's changed?

This PR modifies the existing Hamcrest to AssertJ migration recipe to allow for more number matchers to be migrated.

What's your motivation?

#357

Anything in particular you'd like reviewers to focus on?

So I added support for closeTo but when I was looking through the list of matchers that related to numbers I couldn't find any others that weren't already supported. Maybe I'm not looking at the right documentation. Let me know if there were any other number matchers you were maybe expecting to see here.

Anyone you would like to review specifically?

@timtebeek

Have you considered any alternatives or workarounds?

At first I had created a dedicated recipe for closeTo but then realized the HamcrestMatcherToAssertJ recipe did most of what needed to be done already.

Checklist

  • I've added unit tests to cover both positive and negative cases
  • I've added the license header to any new files through ./gradlew licenseFormat
  • I've used the IntelliJ auto-formatter on affected files
  • I've updated the documentation (if applicable)

@AlekSimpson AlekSimpson added the enhancement New feature or request label Jul 11, 2023
@AlekSimpson AlekSimpson self-assigned this Jul 11, 2023
@AlekSimpson AlekSimpson linked an issue Jul 11, 2023 that may be closed by this pull request
@sambsnyd sambsnyd merged commit 7c2106a into main Jul 11, 2023
1 check passed
@sambsnyd sambsnyd deleted the alek/MoreHamcrestToAssertJMigrations branch July 11, 2023 23:05
@sambsnyd
Copy link
Member

Thanks @AlekSimpson !

timtebeek added a commit that referenced this pull request Jul 12, 2023
@timtebeek
Copy link
Contributor

Quick follow up with 3a58f54 as we need to reference the recipe from Yaml before it's available to users.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Further Hamcrest to AssertJ migration recipes
3 participants