public void RemoveAllTest1() { var bag = new SortedBag <int> { 3, 5, 1, 1, 4, 6, 2, 2, 2 }; Assert.Equal(9, bag.Count); Assert.Equal(2, bag.RemoveAll(1)); Assert.Equal(7, bag.Count); Assert.Equal(0, bag.RemoveAll(10)); Assert.Equal(7, bag.Count); Assert.Equal(3, bag.RemoveAll(2)); Assert.Equal(4, bag.Count); Assert.Equal(1, bag.RemoveAll(5)); Assert.Equal(3, bag.Count); }