3 ms·
I view this as definitely enforcing coupling. The issue is that you should want to make it very easy to change the API signature of internal components. Mock
by mpdehaan2 12y ago
I view this as definitely enforcing coupling.
The issue is that you should want to make it very easy to change the API signature of internal components.
Mock objects can tend to reinforce internal coding choices when things that are not a public interface, or a service boundary, are mocked out.
If you're mocking at this level, there is a potential for refactoring of intra-class API contracts to become much harder to change.
Thus, it would be better IMHO to mock out only meaningful service boundaries, and concentrate testing at the public contracts.
You can still get very strong coverage, but you're just thinking about a different level of inputs.