3 ms·
> coverage then private method testing is giving you fake or inferior coverage Absolutely not Your private methods contain logic no? Every coverage is worth
by raverbashing 5y ago
> coverage then private method testing is giving you fake or inferior coverage
Absolutely not
Your private methods contain logic no?
Every coverage is worth
In fact I don't see any "controversy" here. Not testing private methods seems like a lousy excuse
exactly because they change less with implementation/api changes and are more "logic focused"
Sure, do test your API methods, but that might not always be easy or practical
- nisegami 5y agoI think you misunderstand. GP is recommending that coverage of private methods be achieved by testing their public consumers. If you can't test part of a private method through a public consumer, then that's a sign that those unused code branches might not be necessary.