Cleaning up resources
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Maciej_Gawinecki
Posted On:   Wednesday, October 4, 2006 01:09 PM

Hi!

When I'm writing single test, it may fail() at any moment of the test. Since I create some resources in the database in the begining of the test, I'd like to remove them whenever the test finished (not matter whether with success or not).
Thus I'm looking for an approach like
try
{ // init resources,
// test, }
finally
{ // clean up resource},

which handle with cleaning up: but for JUnit.

Any idea?

Regards,
Maciej

Re: Cleaning up resources

Posted By:   Christopher_Koenigsberg  
Posted On:   Saturday, October 21, 2006 10:04 AM

I forget exactly, but isn't there a "teardown()" method, something like that, which you're supposed to override/implement, in a test suite?
About | Sitemap | Contact