public void RemoveWhere_RemoveElementsProperly() { var array = new[] { 1, 2, 3, 4, 5 }.ToList(); array.RemoveWhere(i => i % 2 == 0); array.Should().BeEquivalentTo(1, 3, 5); }
public void RemoveWhere_ShouldGoThroughAllElements() { var array = new[] { 1, 2, 3, 4, 5 }; var count = 0; array.RemoveWhere(i => { count++; return false; }); array.Should().BeEquivalentTo(1, 2, 3, 4, 5); }