cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian McCallister <mccallis...@forthillcompany.com>
Subject Re: Mock objects
Date Sat, 24 Jul 2004 20:54:33 GMT
basic form -- with extensive unit test coverage, and mock usage, you 
really do have two clients for every piece of code -- the system and 
the test harness.

If you don't maintain loose coupling and low dependencies you find out 
really quickly, and get a system where making small changes breaks a 
lot of seemingly unrelated tests, which is incredibly annoying.

-Brian

On Jul 24, 2004, at 4:25 PM, Ugo Cei wrote:

> Il giorno 24/lug/04, alle 22:21, Brian McCallister ha scritto:
>
>> When you put a mock in an object, which is used by what you are 
>> testing (easy to do) in order to make behavior correctly you get 
>> non-obvious dependencies for internal changes. Really the rule should 
>> be "ruthlessly obey the Law of Demeter."
>>
>> Does this make any sense?
>
> In theory, yes, I can follow you. But I have too little experience 
> with mocks (and unit testing in general) to be able to appreciate the 
> finer points. Anyway, thanks.
>
> -- 
> Ugo Cei - http://beblogging.com/



Mime
View raw message