title: Is this safe? - NUnit base class opens and rollsback a TransactionScope
body: <p>I was thinking it would be nice to create a base class for NUnit test fixtures that opens a TransactionScope during the SetUp phase, then rolls back the transaction during tear down.
  Something like this:</p>
  
  <pre><code>    public abstract class TestFixtureBase
  {
      private TransactionScope _transaction;
  
      [TestFixtureSetUp]
      public void TestFixtureSetup()
      {
          _transaction = new TransactionScope();
      }
  
      [TestFixtureTearDown]
      public void TestFixtureTearDown()
      {
          if (_transaction != null)
          {
              _transaction.Dispose();
          }
      }
  }
  </code></pre>
  
  <p>Do you think this is a good idea?</p>
  
  <p>Obviously the database is just a test database, not a live database, but it would still be annoying if it filled up with junk data from the unit tests.</p>
  
  <p>What do other people do when running unit tests that involve a lot of data access?</p>