示例#1
0
 public void RemoveFirst_OnValidParam_DoesNotContainRemovedFirstItem(int[] itemsToAdd, int removedItem)
 {
     foreach (var item in itemsToAdd)
     {
         _linkedList.AddFirst(item);
     }
     _linkedList.RemoveFirst();
     Assert.DoesNotContain(removedItem, _linkedList);
 }
示例#2
0
 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);
 }
示例#3
0
        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);
        }