rewrite-testing-frameworks
rewrite-testing-frameworks copied to clipboard
convert `.hasSize(list2.size())` into `.hasSameSizeAs(list2)`
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
Seems reasonable indeed; would be a nice addition to the recipe catalog.