-
Notifications
You must be signed in to change notification settings - Fork 53
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
Add refaster recipes to simplify expected value #475
base: main
Are you sure you want to change the base?
Conversation
copied from rewrite-recipe-starter
328ac47
to
2fdafa0
Compare
src/test/java/org/openrewrite/java/testing/assertj/SimplifyAssertExpectationsTest.java
Show resolved
Hide resolved
src/test/java/org/openrewrite/java/testing/assertj/SimplifyAssertExpectationsTest.java
Show resolved
Hide resolved
src/test/java/org/openrewrite/java/testing/assertj/SimplifyAssertExpectationsTest.java
Show resolved
Hide resolved
src/test/java/org/openrewrite/java/testing/assertj/SimplifyAssertExpectationsTest.java
Show resolved
Hide resolved
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
public class SimplifyToIsZero { | ||
|
||
@BeforeTemplate | ||
void before(Integer i) { |
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.
I think you want to use primitive types in the method signatures.
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.
I tried it for both "Integer" recipes, but still get "Recipe was expected to make a change but made no changes." for all three tests.
What's changed?
3 simple refaster recipes added
What's your motivation?
salvaging the changes in #472
adding missing transformations I noticed.
Anything in particular you'd like reviewers to focus on?
These recipes are simpler that the ones in #472: they don't need generics and should work in Java 8. But each test yields:
Anyone you would like to review specifically?
@timtebeek
Have you considered any alternatives or workarounds?
SimplifyChainedAssertJAssertion could probably be extended to cover these cases, but I think refaster is the appropriate level of complexity
Any additional context
Checklist