title: How to ensure that database cleanup is always performed after a test?
body: <p>Consider the following example of a unit test. The comments pretty much explain my problem.</p>
  
  <pre><code>[TestMethod]
  public void MyTestMethod()
  {
  
    //generate some objects in the database
    ...
  
    //make an assert that fails sometimes (for example purposes, this fails always)
    Assert.IsTrue(false);
  
    //TODO: how do we clean up the data generated in the database now that the test has ended here?
  
  }
  </code></pre>