Mocking boundaries focuses on external interfaces, while mocking internals can obscure code logic.
Mocking boundaries involves creating mocks for external systems like databases or web services, which helps to verify interactions without real calls. Mocking internals, such as private methods, can lead to tests that are tightly coupled to the implementation, making refactoring difficult. In an e-commerce app, you might mock a PaymentGateway (boundary) but avoid mocking internal business logic.
Additional Notes
Why does the difference between mocking boundaries and mocking internals matter in practice?