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

convert .hasSize(list2.size()) into .hasSameSizeAs(list2) #465

Open
timo-abele opened this issue Jan 18, 2024 · 1 comment
Open

convert .hasSize(list2.size()) into .hasSameSizeAs(list2) #465

timo-abele opened this issue Jan 18, 2024 · 1 comment
Labels
assertj recipe Recipe request

Comments

@timo-abele
Copy link
Contributor

What problem are you trying to solve?

I have many instances of AssertJ assertThat(list).hasSize(list2.size()) in my code.

Describe the solution you'd like

The AssertJ best practices recipe should convert them to assertThat(list).hasSameSizeAs(list2).

Have you considered any alternatives or workarounds?

Additional context

Are you interested in contributing this feature to OpenRewrite?

no

@timo-abele timo-abele added the enhancement New feature or request label Jan 18, 2024
@timtebeek
Copy link
Contributor

Seems reasonable indeed; would be a nice addition to the recipe catalog.

@timtebeek timtebeek moved this to Recipes Wanted in OpenRewrite Jan 18, 2024
@timtebeek timtebeek added recipe Recipe request and removed enhancement New feature or request labels Jan 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
assertj recipe Recipe request
Projects
Status: Recipes Wanted
Development

No branches or pull requests

2 participants