Need feedback on simple idea
German Morales
germanmorales at delta-sys.com
Sat Apr 12 02:14:19 UTC 2003
It seems that Nathanael Schärli wrote:
> I think that the argument about "loosing encapsulation" is complete
> bogus because it has no relevance in practice.
[big snip]
I'd like to add something to Nathanael's explaination...
Sometimes it happens to me that when writing Unit Tests I want to check
internal state of an object, for example to see if it was affected by a
message, and I end up writing (previously not needed) accessors for some
of the instance variables.
Am I the only one?
Unit tests should test as a black box only?
If not, having public accesors is almost a need, at least the "get" ones.
German Morales
More information about the Squeak-dev
mailing list
|