A. M. KochBlockedUnblockFollowFollowingI am not now a writer. This is not a blog. You think that’s air you’re breathing now?Oct 26, 2017In general, units are tested using only the public interface of the unit (aka “public API” or “surface area”). This is referred to as black box testing. Black box testing leads to less brittle tests, because the implementation details of a unit tend to change more over time than the public API of the unit. If you use white box testing, where tests are aware of implementation details, any change to the implementation details could break the test, even if the public API continues to function as expected. In other words, white-box testing leads to wasted rework.Mocking is a Code SmellEric Elliott8.6K60I’ve been trying to explain this at my current role. This paragraph will be copy pasted upon my return from holiday!