Otherwise, you'll probably end up doing more work to manage all the code coverage cases. That is, you'll need to do the same code coverage, but you'll have to reason out how to get to each submethod, and ensure you pass it the right parameters to ensure all of it's children get called.
I find that this is rarely a problem in real world usage. This is probably a side effect of doing TDD. If I factor out a private method from a public method then the coverage of my test suite isn't going to change, and if I change my private method I'll always write a test first.
To put it another way, if you aren't exercising all of the code in your private methods why did you need to write them in the first place?
In reply to Re^5: "Accessors break encapsulation"
by adrianh
in thread "Accessors break encapsulation"?
by tlm
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |