Exemplo n.º 1
0
        public void IntersectWithTest()
        {
            using (FileBackedHashSet<int> hashSet = new FileBackedHashSet<int>())
            {
                for (int i = 0; i < 10; i++)
                    hashSet.Add(i);

                hashSet.IntersectWith(Enumerable.Range(5, 10));

                for (int i = 5; i < 10; i++)
                    Assert.IsTrue(hashSet.Contains(i), i.ToString());

                Assert.AreEqual(hashSet.Count, 5);
            }
        }
Exemplo n.º 2
0
        public void IntersectWithTest()
        {
            using (FileBackedHashSet <int> hashSet = new FileBackedHashSet <int>())
            {
                for (int i = 0; i < 10; i++)
                {
                    hashSet.Add(i);
                }

                hashSet.IntersectWith(Enumerable.Range(5, 10));

                for (int i = 5; i < 10; i++)
                {
                    Assert.IsTrue(hashSet.Contains(i), i.ToString());
                }

                Assert.AreEqual(hashSet.Count, 5);
            }
        }