Another reason for not using mstest

As you can read in CA1001: Types that own disposable fields should be disposable. Pretty solid advice, but for some reason the mstest runner does not dispose of classes that implement IDisposable. A possible workaround is to apply a TestCleanupAttribute to the Dispose method, but this is really contradictory with the “Shared test fixture” approach mstest uses. Imho, there is only one clean solution: use a decent testing framework instead.

This entry was posted on Saturday, March 14th, 2009 at 07:11 and is filed under C#, Visual Studio. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

Leave a Reply