In article <dv************ *@news.t-online.com>,
Hendrik Maryns <he************ @despammed.com> wrote:
I was about to answer the same: shouldn't problems in package private
methods spill through to public methods? Then why test them separately?
It makes it more time-consuming to find out where the error is.
Find an error in a public method and retrace it with you favorite
debugger to the package private method, I'd say (without much
experience, so correct me if I'm wrong).
I prefer my unit tests to have obvious failure modes so that I can
basically tell from which test failed, exactly where in my source the
bug is. This means I don't have to muck around with a debugger, I can
just fix it and get on with things.
For this to be the case, however, the methods that I test need to be
reasonably small and not do a whole lot. These are my private helper
methods that I invoke from my more involved algorithm methods. Many
are one or two liners and they generally don't make sense to have
publicly accessible since they're really just internal building blocks
for constructing other more interesting methods.
Cheers
Bent D
--
Bent Dalager -
bc*@pvv.org -
http://www.pvv.org/~bcd
powered by emacs