Wednesday, April 15, 2009

TestCleanup quirks! (Unittesting)

Today, I am having problems with one of my unittests. The problem is that my resources are not cleanedup when they need to. This has to do with the unexpected time the 'TestCleanup' runs!

According to msdn one should use 'TestCleanup' to cleanup resources. Why are my other unittests failing that need to reuse this resource? 

I found a clear description of the 'problem' (is it really a problem or by design?) here:

Anyway, to me it is a pain! 
If you have a suggestion, let me know!

PS: I don't violate the 'do not depend on unittest order' - rule... this is about cleaning!

No comments: