On Mon, Oct 3, 2011 at 7:16 AM, Axel Rauschmayer <[email protected]> wrote:

> > I'm curious to know why unit-testing is the motivation. In most cases,
> encapsulation should never be broken for sake of exercising a public api.
> Private data and methods should do their work while the public api bears the
> results of the complete logic set, ie. the public api should fail its tests
> if the private data and methods are not behaving correctly.
>
> Ideally, yes. However, I occasionally write private helpers that I would
> like to test.
>

Exactly. It's a matter of domains -- it may be easier to prove sound the
constituent components of a composition than to exercise the composition's
full range. This is completely orthogonal to issues of encapsulation.
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to