Пример #1
0
        public void Test2EqualElements()
        {
            string[] value = new string[] { "один", "два" };
            var      table = new HashTable(3);

            table.PutPair(1, value[0]);
            table.PutPair(1, value[1]);
            Assert.AreEqual(table.GetValueByKey(1), value[1]);
        }
Пример #2
0
        public void TestManyElements()
        {
            int size  = 100000;
            var table = new HashTable(size);

            for (int i = 0; i < size; i++)
            {
                table.PutPair(i, i + 1);
            }
            Assert.AreEqual(table.GetValueByKey(70000), 70001);
        }