예제 #1
0
        public void Can_Add_Before()
        {
            var myLinkedList = new MyLinkedList <int>();

            myLinkedList.AddFirst(1);
            myLinkedList.AddLast(3);
            myLinkedList.AddLast(4);
            myLinkedList.AddBefore(myLinkedList.GetHead().Next, 2);
            myLinkedList.GetHead().Next.Data.Should().Be(2);
        }