Update AssertJ recipes to current recipe code style#633
Merged
Conversation
Contributor
There was a problem hiding this comment.
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
timtebeek
reviewed
Nov 5, 2024
src/main/java/org/openrewrite/java/testing/assertj/JUnitAssertArrayEqualsToAssertThat.java
Show resolved
Hide resolved
timtebeek
reviewed
Nov 5, 2024
src/main/java/org/openrewrite/java/testing/assertj/JUnitAssertEqualsToAssertThat.java
Outdated
Show resolved
Hide resolved
timtebeek
reviewed
Nov 5, 2024
src/main/java/org/openrewrite/java/testing/assertj/JUnitAssertFalseToAssertThat.java
Outdated
Show resolved
Hide resolved
timtebeek
reviewed
Nov 5, 2024
src/main/java/org/openrewrite/java/testing/assertj/JUnitAssertInstanceOfToAssertThat.java
Outdated
Show resolved
Hide resolved
timtebeek
reviewed
Nov 5, 2024
src/main/java/org/openrewrite/java/testing/assertj/JUnitAssertNotEqualsToAssertThat.java
Outdated
Show resolved
Hide resolved
timtebeek
reviewed
Nov 5, 2024
src/main/java/org/openrewrite/java/testing/assertj/JUnitAssertTrueToAssertThat.java
Outdated
Show resolved
Hide resolved
timtebeek
reviewed
Nov 5, 2024
src/main/java/org/openrewrite/java/testing/assertj/JUnitFailToAssertJFail.java
Outdated
Show resolved
Hide resolved
timtebeek
reviewed
Nov 5, 2024
Member
timtebeek
left a comment
There was a problem hiding this comment.
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
timtebeek
approved these changes
Nov 5, 2024
Member
timtebeek
left a comment
There was a problem hiding this comment.
Great simplification, thanks a lot! Should help to propagate the proper patterns.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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