public void InsertedElementCanBeRetrieved() { LinkedList list = new LinkedList(); int testValue = 1; list.Add(testValue); int lastAddedItem = list.Last(); Assert.AreEqual(testValue, lastAddedItem); }
public void InsertedElementCanBeRetrieved() { LinkedList list = new LinkedList(); int testValue = 1; list.Add(testValue); int lastAddedItem = list.Last(); Assert.AreEqual(testValue, lastAddedItem); }
public void InsertedLowerElementIsNotLast() { LinkedList list = new LinkedList(); int testValue = 5; int smallerTestValue = 3; list.Add(testValue); list.Add(smallerTestValue); int lastAddedItem = list.Last(); Assert.AreEqual(testValue, lastAddedItem); }
public void InsertedLowerElementIsNotLast() { LinkedList list = new LinkedList(); int testValue = 5; int smallerTestValue = 3; list.Add(testValue); list.Add(smallerTestValue); int lastAddedItem = list.Last(); Assert.AreEqual(testValue, lastAddedItem); }
public void LastOneEmptyListThrowsInvalidOperation() { LinkedList list = new LinkedList(); Assert.Throws(typeof(InvalidOperationException), () => list.Last()); }
public void LastOneEmptyListThrowsInvalidOperation() { LinkedList list = new LinkedList(); Assert.Throws(typeof(InvalidOperationException), () => list.Last()); }