public void RemoveValue_Expect_CountDecreasesBy1() { int valueToBeRemoved = 3; var linkedList = new WsLinkedList(); linkedList.InsertLast(2); linkedList.InsertLast(valueToBeRemoved); linkedList.Remove(valueToBeRemoved); Assert.Equal(1, linkedList.Count); }
public void RemoveValue_Expect_ValueWasRemoved() { int valueToBeRemoved = 3; var linkedList = new WsLinkedList(); linkedList.InsertLast(2); linkedList.InsertLast(valueToBeRemoved); linkedList.Remove(valueToBeRemoved); var exists = linkedList.ToArray().Any(x => x == valueToBeRemoved); Assert.False(exists); }