Jeff, If you want to see more examples of how you might write unit tests for CF, you should take a look at the tests that accompany a few of the frameworks. You can find a battery of unit tests in the cfcUnit, ColdSpring, Transfer, and Tartan frameworks. I know that these aren't tutorials, but *real* tests have a lot to offer if you take the time.
Paul On 12/21/06, Jeff Chastain <[EMAIL PROTECTED]> wrote: > > That is the feeling I am getting. I have seen quite a few presentations > and > blog postings about this, but short of the work that Rob Blackburn has > done > recently, it does not seem like anybody is really putting this into > practice. None of the examples I have seen are anything more complicated > than a single simple calculator type object. This is one thing for an > example, but it does not show anything really practical. > > Thanks. > > > -----Original Message----- > From: Patrick McElhaney [mailto:[EMAIL PROTECTED] > Sent: Thursday, December 21, 2006 9:07 PM > To: CF-Talk > Subject: Re: TDD for ColdFusion > > On 12/21/06, Jeff Chastain <[EMAIL PROTECTED]> wrote: > > However, the mock object frameworks for Java and other languages > > simply don't port to ColdFusion because of language construct > > differences. Without a mock object framework, the only other option I > > see is to hand create and maintain stub or mock objects, and this just > > does not seem like a feasible practice in an application of any size. > > That's exactly the same conclusion I reached after trying to to do TDD in > CF > a couple years ago. > > Remember, TDD is about development, not about testing. It's supposed to > make > developing code easier. If instead it makes development much harder > there's > no sense using it. > > However, I do think it's worthwhile to practice TDD in another language > and > learn the test-first mindset. As I'm modeling CFCs, to ask, "How would I > test this?" has become second-nature. The ability to think test-first, > even > if I can't do it all the time, has been a tremendous help in writing > cohesive, loosely coupled code. > > Patrick > > > -- > Patrick McElhaney > 704.560.9117 > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Create robust enterprise, web RIAs. Upgrade & integrate Adobe Coldfusion MX7 with Flex 2 http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:264874 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

