Welcome to the Monastery | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Yes, the general rule really only applies to public accessors and mutators. From the outside, you should be telling an object what to do and then let the object change its own state. should a test suite test only the published API, or should it also test private methods? A test suite should aim for the highest practical code coverage. For every public method called, there are probably some underlieing private methods called. The test suite may then end up having complete coverage of the object without actually calling private methods. "There is no shame in being self-taught, only in not trying to learn in the first place." -- Atrus, Myst: The Book of D'ni. In reply to Re: "Accessors break encapsulation"
by hardburn
|
|