[TestClass]
public class UnitTest
{
private TestContext TestContext { get; set; }
[TestCleanup]
public void TestCleanup()
{
if (TestContext.CurrentTestOutcome == UnitTestOutcome.Passed)
//do something
}
[TestMethod]
public void TestMethod()
{
}
}