Esempio n. 1
0
        public void ContainsValue(int countKey)
        {
            var bidirHashtable = new BidirHashtable();
            var result         = true;

            for (int i = 0; i < countKey; i++)
            {
                bidirHashtable.Add(i, i + "foo");
                result &= bidirHashtable.ContainsValue(i + "foo");
            }

            Assert.True(result);
        }
Esempio n. 2
0
        public void Count(int countKey)
        {
            var bidirHashtable = new BidirHashtable();

            for (int i = 0; i < countKey; i++)
            {
                bidirHashtable.Add(i, i);
            }

            var result = bidirHashtable.Count();

            Assert.Equal(countKey, result);
        }
Esempio n. 3
0
        public void Set(int countKey)
        {
            var bidirHashtable = new BidirHashtable();
            var result         = true;

            for (int i = 0; i < countKey; i++)
            {
                bidirHashtable.Add(i, i);
                bidirHashtable.Set(i, i + "foo");
                result &= bidirHashtable.Get(i) == (i + "foo");
            }

            Assert.True(result);
        }