public void ExceptWithTest() { using (FileBackedHashSet <int> hashSet = new FileBackedHashSet <int>()) { for (int i = 0; i < 10; i++) { hashSet.Add(i); } hashSet.ExceptWith(Enumerable.Range(5, 10)); for (int i = 0; i < 5; i++) { Assert.IsTrue(hashSet.Contains(i), i.ToString()); } Assert.AreEqual(hashSet.Count, 5); } }
public void ExceptWithTest() { using (FileBackedHashSet<int> hashSet = new FileBackedHashSet<int>()) { for (int i = 0; i < 10; i++) hashSet.Add(i); hashSet.ExceptWith(Enumerable.Range(5, 10)); for (int i = 0; i < 5; i++) Assert.IsTrue(hashSet.Contains(i), i.ToString()); Assert.AreEqual(hashSet.Count, 5); } }