Exemplo n.º 1
0
 public void RemoveAllWorks()
 {
     var c = new FastCollection<int> { 1, 2, 3, 4, 5 };
     c.RemoveAll(x => x % 2 == 0);
     AssertEquals(c, new[] { 1, 3, 5 });
     c.RemoveAll(x => false);
     AssertEquals(c, new[] { 1, 3, 5 });
     c.RemoveAll(x => true);
     Assert.Equal(0, c.Count);
     Assert.False(c.Any());
     c.RemoveAll(x => true);
     Assert.Equal(0, c.Count);
     Assert.False(c.Any());
 }