public void Should_Check_Contains_False() { //arrange var node1 = new MyDoublyLinkedListNode <int>(2); var node2 = new MyDoublyLinkedListNode <int>(4); var node3 = new MyDoublyLinkedListNode <int>(3); var node4 = new MyDoublyLinkedListNode <int>(5); node1.Next = node2; node2.Next = node3; node3.Next = node4; node2.Prev = node1; node3.Prev = node2; node4.Prev = node3; var list = new MyDoublyLinkedList <int>(node1); //act var result = list.Contains(7); //assert result.ShouldBeEquivalentTo(false); }
public void MyLinkedList_Contains_ValueNine() { MyDoublyLinkedList <int> myLinkedList = _linkedListService.CreateLinkedList(new MyDoublyLinkedList <int>()) as MyDoublyLinkedList <int>; Assert.True(myLinkedList.Contains(9)); }