On 12/21/06, Peter Bell <[EMAIL PROTECTED]> wrote:
I haven't made the TDD jump yet (top resolution for next year - that and
FitNess for integration testing), but I'm having a hard time understanding
how you'd do unit testing WITHOUT some kind of mock object.
Keep in mind that there is a difference between TDD and unit testing.
Unit testing is just testing small pieces (units) of your code. TDD is
the practice a using unit tests to drive development. TDD is a
development process, and a nice one (if you can get used to it). But
if you are not ready to change your entire development process just
yet, you can still use unit testing with your project (for regression
testing if nothing else).

BTW, have you blogged about HOW you implemented the mock object? I'd love to
get an idea of the approach you used (I WILL download the source code and
figure it out, but was wondering if you'd give the lazy part of me a hint
first!).
Sure, I can do that. It's a single CFC, but its kind of an odd ball.
Actually its not all that complex, but because of what its nature
(pretending to be a different object and overriding its methods) it
has a few lines of code that might not be self explanatory (though I
tried to comment the code). I'll try to post something onto my blog on
how I implemented it within the next few weeks (sorry, kind of a busy
time of year).

--
Rob Blackburn
http://www.rbdev.net


You are subscribed to cfcdev. To unsubscribe, please follow the instructions at 
http://www.cfczone.org/listserv.cfm

CFCDev is supported by:
Katapult Media, Inc.
We are cool code geeks looking for fun projects to rock!
www.katapultmedia.com

An archive of the CFCDev list is available at 
www.mail-archive.com/[email protected]

Reply via email to