3 ms·
I have seen that over time, when you refactor code and tests that use mocks, its a good idea to take out the mocks and replace them with actual objects. Mocks a
by prateekdayal 15y ago
I have seen that over time, when you refactor code and tests that use mocks, its a good idea to take out the mocks and replace them with actual objects. Mocks are important early on because you are just discovering the interfaces but over time, they can be replaced by real objects (this obviously can't be done for third party interactions).
In the end, there is no substitute for integration tests. We make it a point to write integration tests for atleast all happy paths.