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

support for allOf hamcrest matcher #396

Merged
merged 4 commits into from
Aug 4, 2023
Merged

Conversation

AlekSimpson
Copy link
Contributor

What's changed?

This PR modifies the HamcrestAnyOfToAssertJ recipe to add support for the allOf matcher as well. The recipe name will probably need to be changed if this PR is merged. I suggest maybe something like HamcrestOfMatchersToAssertJ.

What's your motivation?

#357

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

I was wondering if maybe we could also add some sort of support for the allOf(Iterable) and anyOf(Iterable) methods. I don't think it would work for every case but for cases where maybe you have an Iterable directly passed in like Arrays.asList(...). We could probably do the same thing we would just have to extract the arguments of the asList method invocation.

Anyone you would like to review specifically?

@timtebeek

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 Aug 4, 2023
@AlekSimpson AlekSimpson self-assigned this Aug 4, 2023
@AlekSimpson AlekSimpson marked this pull request as draft August 4, 2023 18:18
@AlekSimpson AlekSimpson linked an issue Aug 4, 2023 that may be closed by this pull request
@timtebeek timtebeek marked this pull request as ready for review August 4, 2023 21:49
@timtebeek timtebeek merged commit 6d5f1ae into main Aug 4, 2023
1 check passed
@timtebeek timtebeek deleted the alek/MigrateHamcrestAllOfMatcher branch August 4, 2023 21:58
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
2 participants