-
Notifications
You must be signed in to change notification settings - Fork 74
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
Update AssertJ recipes to current recipe code style #633
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some suggestions could not be made:
- src/main/java/org/openrewrite/java/testing/assertj/JUnitAssertFalseToAssertThat.java
- lines 27-27
- src/main/java/org/openrewrite/java/testing/assertj/JUnitAssertNotEqualsToAssertThat.java
- lines 27-27
- src/main/java/org/openrewrite/java/testing/assertj/JUnitAssertNotNullToAssertThat.java
- lines 27-27
- src/main/java/org/openrewrite/java/testing/assertj/JUnitAssertNullToAssertThat.java
- lines 27-27
- src/main/java/org/openrewrite/java/testing/assertj/JUnitAssertSameToAssertThat.java
- lines 27-27
- src/main/java/org/openrewrite/java/testing/assertj/JUnitAssertTrueToAssertThat.java
- lines 27-27
src/main/java/org/openrewrite/java/testing/assertj/JUnitAssertArrayEqualsToAssertThat.java
Show resolved
Hide resolved
src/main/java/org/openrewrite/java/testing/assertj/JUnitAssertEqualsToAssertThat.java
Outdated
Show resolved
Hide resolved
src/main/java/org/openrewrite/java/testing/assertj/JUnitAssertFalseToAssertThat.java
Outdated
Show resolved
Hide resolved
src/main/java/org/openrewrite/java/testing/assertj/JUnitAssertInstanceOfToAssertThat.java
Outdated
Show resolved
Hide resolved
src/main/java/org/openrewrite/java/testing/assertj/JUnitAssertNotEqualsToAssertThat.java
Outdated
Show resolved
Hide resolved
src/main/java/org/openrewrite/java/testing/assertj/JUnitAssertTrueToAssertThat.java
Outdated
Show resolved
Hide resolved
src/main/java/org/openrewrite/java/testing/assertj/JUnitFailToAssertJFail.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great to see this initial work already; helpful to have some examples to point out best practices (as opposed to what you were seeing). I've left a few more comments on patterns we can clear out; please apply those not just where I've left my remarks, but anywhere in these affected files.
5f36707
to
f79a06c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great simplification, thanks a lot! Should help to propagate the proper patterns.
What's changed?
The AssertJ recipes use an older recipe code style; replaced all of 'm with an anonymous class + remove boilerplate code. The class
JUnitAssertInstanceOfToAssertThat
(created in #606) i is used as the base template for all changed recipes.What's your motivation?
Code convergence
Any additional context
Recipes in other packages I have left out of the scope of this PR. For example, the cleanup recipes also use the “old” recipe style.
Checklist