public void IsTailGoodLast() { var list = new DoublyCircularlyLinkedList.LinkedList <int>(); list.AddLast(16); list.AddLast(14); Assert.Equal(14, list.Tail.value); }
public void IsHeadGoodLast() { var list = new DoublyCircularlyLinkedList.LinkedList <int>(); list.AddLast(16); Assert.Equal(16, list.Head.value); }
public void AddAfterTest() { var list = new DoublyCircularlyLinkedList.LinkedList <int>(); list.AddFirst(16); list.AddLast(14); list.AddAfter(7348, 0); Assert.Equal(7348, list.Head.next.value); }
public void AddBeforeTest() { var list = new DoublyCircularlyLinkedList.LinkedList <int>(); list.AddFirst(16); list.AddLast(15); list.AddLast(14); list.AddLast(13); list.AddLast(12); list.AddLast(11); list.AddLast(10); list.AddLast(9); list.AddLast(8); list.AddLast(7); list.AddLast(6); list.AddLast(5); list.AddBefore(4, 4); Assert.Equal(4, list.Head.next.next.next.next.value); }