public void RollbackTest() { // Add a new thing, but rollback xn. using (RepositoryTransaction rt = EntityRepository.BeginTransaction()) { ThingRepo.Save(new Thing() { Name = "TestThing", Corners = 1 }); rt.Rollback(); } // Check thing wasn't saved Assert.AreEqual(0, ThingRepo.GetAll().Count, "Thing should not be saved"); }