public void AddFirst_OnValidParam_ContainsExpectedItems(int[] expectedItems) { foreach (var item in expectedItems) { _linkedList.AddFirst(item); } Assert.Contains(expectedItems, item => _linkedList.Contains(item)); }
public void AddFirst_OnValidParam_ContainsExpectedItems(int[] expectedItems) { //Act foreach (var item in expectedItems) { _linkedList.AddFirst(item); } //Assert CollectionAssert.AreEquivalent(_linkedList, expectedItems); }
public void LinkedListAddFirstIsNotEmpty() { //Arrange DataStructures.Linear.LinkedList<int> linkedList = new DataStructures.Linear.LinkedList<int>(); //Act linkedList.AddFirst(0); //Assert Assert.IsFalse(linkedList.IsEmpty); }
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); }