|
|
|
|
|
by dagw
1537 days ago
|
|
If you are making classes or methods public because you want to unit test them, you're doing it wrong. I've heard this a lot, but how do I test private methods right? If my public method just calls 8 private methods (which each call out to a bunch of other private methods), how to I test to make sure all those private methods do what I want them to do so that I know which one is broken when my public method breaks. |
|
There was recently a submission here on HN that talked about this and different perspectives on that topic. It's not a universally shared opinion, surprisingly.