Should I test private methods or only public ones? [closed]
I do not unit test private methods. A private method is an implementation detail that should be hidden to the users of the class. Testing private methods breaks encapsulation. If I find that the private method is huge or complex or important enough to require its own tests, I just put it in another class … Read more