public void RemoveFirst_OnValidParam_DoesNotContainRemovedFirstItem(int[] itemsToAdd, int removedItem) { foreach (var item in itemsToAdd) { _linkedList.AddFirst(item); } _linkedList.RemoveFirst(); Assert.DoesNotContain(removedItem, _linkedList); }
public void RemoveFirst_OnValidParam_DoesNotContainRemovedFirstItem(int[] itemsToAdd, int removedItem) { //Arrange foreach (var item in itemsToAdd) { _linkedList.AddFirst(item); } //Act _linkedList.RemoveFirst(); //Assert CollectionAssert.DoesNotContain(_linkedList, removedItem); }
public void LinkedListRemoveFirst() { //Arrange DataStructures.Linear.LinkedList<int> linkedList = new DataStructures.Linear.LinkedList<int>(); //Act linkedList.AddFirst(0); linkedList.RemoveFirst(); //Assert Assert.IsTrue(linkedList.IsEmpty); }