On 11/29/05, Jeff Chastain <[EMAIL PROTECTED]> wrote: > This is not what I was told, at least for the cfcUnit framework. What you > just said was in fact what I expected, but at least with the cfcUnit > framework, the test case CFC is instantiated for each test method ... i.e. > the following sequence:
Yup, you're right - I'm wrong. I based my supposition on reading the (very convoluted) CFUnit source code and it doesn't actually behave the way I thought. I instrumented one of my test CFCs and confirmed that the order is exactly as you stated: > - for each test case CFC: > -- for each testXXX() method > --- instantiate the test case CFC > --- call setUp() > --- call the specific testXXX() method > --- call tearDown() > > So, in this case, since the test case is instantiated for each testXXX() > method, there is no point to the setUp() method. Well, if you are creating a mock environment for your testXxx() methods, setUp() provides a way to do it in one place instead of in every testXxx() method... -- Sean A Corfield -- http://corfield.org/ Got frameworks? "If you're not annoying somebody, you're not really alive." -- Margaret Atwood ---------------------------------------------------------- You are subscribed to cfcdev. To unsubscribe, send an email to [email protected] with the words 'unsubscribe cfcdev' as the subject of the email. CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting (www.cfxhosting.com). An archive of the CFCDev list is available at www.mail-archive.com/[email protected]
