public void ShouldRollback() { try { _context.BeginTransaction(); AddEntitiesToContext(); AddEntitiesToContext(); _context.Commit(); } catch (Exception) { _context.Rollback(); } Assert.Equal(0, _context.Foos.Count()); }