|
Re: Suite Destructor?
|
Posted: Aug 27, 2003 9:59 PM
|
|
> > Adam, I think you misunderstood. > > Looks like I did misunderstand John. My apologies. I see > Bill is offering to take this into account in a future > version of SuiteRunner. > Well, I'm not sure it rises to the level of needing to be added to the API, because then everyone would have to look at it and understand it, and I don't think most people need it in most cases.
I did notice today that the new NUnit has attributes that mark methods that will be executed at the beginning and end running each TestCase. They mention that some fixtures are too expensive to create before each test. The same functionality could be achieved in SuiteRunner by simply creating the fixture once in the constructor, overriding execute, doing:
try { super.execute(reporter) } finally { callYourCleanupMethod() }
Unless most people want to do this, it doesn't carry its weight to be pulled up into the API, since it can be so easily accomplished in a Suite subclass.
|
|