Пример #1
0
        public void InsertMissingElementsWhileInForLoop()
        {
            LinkedListPlay target = TargetMaker();

            target.AddFiveElements();
            target.InsertBetween();

            Assert.AreEqual(10, target.TheLinkedList.Count);
        }
Пример #2
0
        public void InsertSequentialMissingElementsWhileInForeLoop()
        {
            LinkedListPlay target = TargetMaker();

            target.AddFiveElements();
            target.InsertBetween();

            int expected = 0;

            foreach (int i in target.TheLinkedList)
            {
                Assert.AreEqual(expected, i);
                expected++;
            }
        }
Пример #3
0
        public void HoldsFiveElements()
        {
            LinkedListPlay target = TargetMaker();

            target.AddFiveElements();

            Assert.AreEqual(5, target.TheLinkedList.Count);

            int expected = 0;

            foreach (int i in target.TheLinkedList)
            {
                Assert.AreEqual(expected, i);
                expected += 2;
            }
        }
Пример #4
0
        public void CreatesLinkedList()
        {
            LinkedListPlay target = TargetMaker();

            Assert.IsNotNull(target.TheLinkedList);
        }