I am unit-testing a a .NET project using visual studio's own framework where each test needs to close certain connections so that the next test may run correctly. However, when a test fails, this cleanup is not performed, and as a result all subsequent tests fail.
Is there a way I can execute a method everytime a test fails?