Example #1
0
 public void AddLast_OnValidParam_ContainsExpectedItems(int[] expectedItems)
 {
     foreach (var item in expectedItems)
     {
         _linkedList.AddLast(item);
     }
     Assert.Contains(expectedItems, item => _linkedList.Contains(item));
 }
Example #2
0
 public void AddLast_OnValidParam_ContainsExpectedItems(int[] expectedItems)
 {
     //Act
     foreach (var item in expectedItems)
     {
         _linkedList.AddLast(item);
     }
     //Assert
     CollectionAssert.AreEquivalent(_linkedList, expectedItems);
 }
Example #3
0
        public void LinkedListAddLastIsNotEmpty()
        {
            //Arrange
            DataStructures.Linear.LinkedList<int> linkedList = new DataStructures.Linear.LinkedList<int>();

            //Act
            linkedList.AddLast(0);

            //Assert
            Assert.IsFalse(linkedList.IsEmpty);
        }