public void InsertNodeBeforeInMiddle_Expect_CorrectCount() { var linkedList = new WsLinkedList(); linkedList.InsertFirst(2); linkedList.InsertFirst(3); linkedList.InsertBefore(2, 1); Assert.Equal(3, linkedList.Count); }
public void InsertNodeBeforeInMiddle_Expect_OrderPersisted() { var linkedList = new WsLinkedList(); linkedList.InsertFirst(2); linkedList.InsertFirst(3); linkedList.InsertBefore(2, 1); var arr = linkedList.ToArray(); Assert.Equal(3, arr[0]); Assert.Equal(1, arr[1]); Assert.Equal(2, arr[2]); }