Details
-
Improvement
-
Resolution: Fixed
-
Major
-
5.2-milestone-2
-
None
Description
Right now when using MockitoComponentMockingRule all dependencies of the passed component produce related mocks registered into the ComponentManager even if you indicate that you wanted this component to be realy loaded with @ComponentList or @AllComponents.
This behavior should be moved to mocking only if the component does not already exist in the CM. The uses case where you really want to override during tested component some dependency you asked to load is very rare and is doable with the @AfterComponent annotation. We would not loose any use case and make other use cases easier to write and understand.