this is exactly how they should work. the idea of a setup and tear down are to make it easier to write test cases that depend on the same initial setup so you are not duplicating your code in each test case.
for instance if you need to instantiate an object for ever test then put that instantiation in the setup method instead of in each test method. The setup is guaranteed to be called before your test and thus you can be certain that whatever you did in setup is available to you in your test case. It does each independently because it makes sure each test can run regardless of what the other tests to. This way if test1 changes the state of objA and test2 also uses objA the changes that happened in test1 won't be reflected in test2 because objA will be reinstantiated for test2 once test1 is finished being run. It isn't really screwy - it is by design and has pretty valid bit of logic behind it. Sorry if I sound terse in this I don't mean to Bill On 11/30/05, Dante Orlando <[EMAIL PROTECTED]> wrote: > > On 11/29/05, Jeff Chastain <[EMAIL PROTECTED]> wrote: > > > > - for each test case CFC: > > -- for each testXXX() method > > --- instantiate the test case CFC > > --- call setUp() > > --- call the specific testXXX() method > > --- call tearDown() > > > > I think you might be confusing CFUnit the sourceforge project, with the > CFUnit that was including one of the Macrmedia DRKs (written by Christian > Cantrell I think?). I can verify that the latter did work in the way Jeff > describes, and I always thought it was a little screwy too. > > -dante > ---------------------------------------------------------- > > 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] -- [EMAIL PROTECTED] http://blog.rawlinson.us If you want Gmail - just ask. ---------------------------------------------------------- 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]
