public void InsertThree_Expect_FindThree() { var linkedList = new WsDoubleLinkedList(); linkedList.InsertFirst(2); linkedList.InsertFirst(3); var valueFound = linkedList.Find(3); Assert.NotNull(valueFound); Assert.Equal(3, valueFound.Value); }
public void InsertNodeBeforeInMiddle_Expect_ReferencePrevious() { var linkedList = new WsDoubleLinkedList(); linkedList.InsertFirst(2); linkedList.InsertFirst(3); linkedList.InsertBefore(2, 1); var nodeInserted = linkedList.Find(1); Assert.Equal(3, nodeInserted.Previous.Value); }