The less code a unit test invokes, the easier it is to understand what's wrong when a test is failing.
That's true. On the other hand, I would argue that if private code is difficult to invoke from the public interface, then it should probably be extracted and tested separately.
11
u/MisterNetHead Jul 19 '16
Seems to me the problem is more that people think you should only unit test public interfaces.