예제 #1
0
        public void ClearTest()
        {
            using (FileBackedHashSet <int> hashSet = new FileBackedHashSet <int>())
            {
                for (int i = 0; i < 100; i++)
                {
                    hashSet.Add(i);
                }

                Assert.AreEqual(hashSet.Count, 100);
                hashSet.Clear();
                Assert.AreEqual(hashSet.Count, 0);
            }
        }
예제 #2
0
        public void ClearTest()
        {
            using (FileBackedHashSet<int> hashSet = new FileBackedHashSet<int>())
            {
                for (int i = 0; i < 100; i++)
                    hashSet.Add(i);

                Assert.AreEqual(hashSet.Count, 100);
                hashSet.Clear();
                Assert.AreEqual(hashSet.Count, 0);
            }
        }