private void MultiSetRemove() { for (int i = 0; i < count; i++) { multiSet.Remove(data[i]); } }
public void Contains() { Assert.IsTrue(set.Contains(10)); Assert.IsTrue(set.Contains(20)); Assert.IsTrue(set.Contains(30)); Assert.IsTrue(set.Contains(100)); Assert.IsFalse(set.Contains(40)); set.Add(10); Assert.IsTrue(set.Contains(10)); Assert.IsTrue(set.Contains(20)); Assert.IsTrue(set.Contains(30)); Assert.IsTrue(set.Contains(100)); Assert.IsFalse(set.Contains(40)); AssertItemsOrder(); set.Remove(10); Assert.IsTrue(set.Contains(30)); Assert.IsTrue(set.Contains(20)); Assert.IsTrue(set.Contains(100)); Assert.IsTrue(set.Contains(10)); Assert.IsFalse(set.Contains(40)); AssertItemsOrder(); set[0] = 40; Assert.IsTrue(set.Contains(40)); Assert.IsTrue(set.Contains(20)); Assert.IsTrue(set.Contains(100)); Assert.IsFalse(set.Contains(10)); Assert.IsTrue(set.Contains(30)); AssertItemsOrder(); set.Add(10); set[0] = 10; Assert.IsTrue(set.Contains(10)); Assert.IsTrue(set.Contains(20)); Assert.IsTrue(set.Contains(100)); Assert.IsTrue(set.Contains(30)); Assert.IsFalse(set.Contains(40)); AssertItemsOrder(); }