On 10/29/07, Sean Corfield <[EMAIL PROTECTED]> wrote:
> For mock testing, just extend that service CFC and override that one
> method. That one method is often responsible for creating the cached
> object on-demand so the extended mock can double up as both a mock for
> the cache access and a way to substitute the creation of the cached
> object.

And just as a footnote on this: I don't like to break encapsulation
just to make testing easier and I don't like to introduction
additional, unnecessary abstractions just to make testing easier.
Mocking by extension is a reasonable way around encapsulation and it
doesn't need the extra abstraction.
-- 
Sean A Corfield -- (904) 302-SEAN
An Architect's View -- http://corfield.org/

"If you're not annoying somebody, you're not really alive."
-- Margaret Atwood

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Get involved in the latest ColdFusion discussions, product
development sharing, and articles on the Adobe Labs wiki.
http://labs/adobe.com/wiki/index.php/ColdFusion_8

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:292309
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to