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