-
Notifications
You must be signed in to change notification settings - Fork 41.2k
Spring Boot Test @SpyBean should be able to create a spy based on an interface class that is passed. #28903
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
Comments
When When I'll flag this one for a team meeting so that we can discuss if this is something that we want to support. |
This comment was marked as off-topic.
This comment was marked as off-topic.
@bclozel another one for Framework please to consider as a possible enhancement for |
@simonbasle, how does this relate to the current implementation of |
@wilkinsona @sbrannen the bean override infrastructure in Framework is fields only |
Thanks, @simonbasle. I assume that you're not considering expanding that support beyond fields so I'll close this one. |
Uh oh!
There was an error while loading. Please reload this page.
I have created a stack overflow question regarding this enhancement here.
To summarize what was mentioned in that post above, I believe that we should be able to provide an interface class or an abstract class within the
value
of the@SpyBean
annotation, and the framework should be intelligent enough to wrap the spring beans that extend the interface/abstract class with mockito spies. I was expecting this behaviour from the MockitoPostProcessor class.Spring Boot Version: 2.2.8.RELEASE
The text was updated successfully, but these errors were encountered: