-
Notifications
You must be signed in to change notification settings - Fork 82
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 ReplaceMockBeanAndSpyBean Recipe #646
Conversation
src/main/java/org/openrewrite/java/spring/boot3/ReplaceMockBeanAndSpyBean.java
Outdated
Show resolved
Hide resolved
src/test/java/org/openrewrite/java/spring/boot3/ReplaceMockBeanAndSpyBeanTest.java
Show resolved
Hide resolved
src/test/java/org/openrewrite/java/spring/boot3/ReplaceMockBeanAndSpyBeanTest.java
Show resolved
Hide resolved
src/test/java/org/openrewrite/java/spring/boot3/ReplaceMockBeanAndSpyBeanTest.java
Show resolved
Hide resolved
src/test/java/org/openrewrite/java/spring/boot3/ReplaceMockBeanAndSpyBeanTest.java
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.
Thanks for getting this started @123Haynes ! I wonder if we even need the Java class; perhaps a declarative recipe can work just as well if there's no annotation attributes to convert.
src/main/java/org/openrewrite/java/spring/boot3/ReplaceMockBeanAndSpyBean.java
Outdated
Show resolved
Hide resolved
cd38018
to
2cc1409
Compare
4384c74
to
ad7d0d3
Compare
ad7d0d3
to
408f88d
Compare
src/test/java/org/openrewrite/java/spring/boot3/ReplaceMockBeanAndSpyBeanTest.java
Show resolved
Hide resolved
…nAndSpyBeanTest.java Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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.
Thanks @123Haynes ; looks great! Perfect first contribution and a good step up for Spring Boot 3.4 support.
What's changed?
This PR adds a recipe for replacing the deprecated annotations
@MockBean
and@SpyBean
with@MockitoBean
and@MockitoSpyBean
What's your motivation?
Anything in particular you'd like reviewers to focus on?
This is the first recipe I've written as well as the first pr to this project. Please point out anything I might've done wrong 😄
Checklist