Пример #1
0
        public void AddToHeadTest()
        {
            UniqueList<int> list = new UniqueList<int>();
            bool wasThrown = false;
            try
            {
                list.AddToHead(1);
                list.AddToHead(1);
            }
            catch (DublicateElementException)
            {
                wasThrown = true;
            }

            Assert.IsTrue(wasThrown);
        }
Пример #2
0
        public void AddToHeadTest1()
        {
            list.AddToHead(1);

            Assert.IsFalse(list.IsEmpty());
            Assert.IsTrue(list.IsContaining(1));
        }