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