public void NotChangeThePositionOfThePeekedItem() { // Arrange var stackedList = new StackedList<int>(); stackedList.Push(0); stackedList.Push(1); stackedList.Push(2); stackedList.Push(3); // Act stackedList.Peek(); stackedList.Peek(); stackedList.Peek(); // Assert Assert.That(stackedList.Peek() == 3); }
public void NotChangeThePositionOfThePeekedItem() { // Arrange var stackedList = new StackedList <int>(); stackedList.Push(0); stackedList.Push(1); stackedList.Push(2); stackedList.Push(3); // Act stackedList.Peek(); stackedList.Peek(); stackedList.Peek(); // Assert Assert.That(stackedList.Peek() == 3); }
public void NotRemoveThePeekedItem() { // Arrange var stackedList = new StackedList<int>(); stackedList.Push(0); stackedList.Push(1); stackedList.Push(2); stackedList.Push(3); // Act stackedList.Peek(); // Assert Assert.That(stackedList.Items.Contains(3)); }
public void ReturnTheLastItemPushed() { // Arrange var stackedList = new StackedList<int>(); stackedList.Push(0); stackedList.Push(1); stackedList.Push(2); stackedList.Push(3); // Act var peekedItem = stackedList.Peek(); // Assert Assert.That(peekedItem.Equals(3)); }
public void NotRemoveThePeekedItem() { // Arrange var stackedList = new StackedList <int>(); stackedList.Push(0); stackedList.Push(1); stackedList.Push(2); stackedList.Push(3); // Act stackedList.Peek(); // Assert Assert.That(stackedList.Items.Contains(3)); }
public void ReturnTheLastItemPushed() { // Arrange var stackedList = new StackedList <int>(); stackedList.Push(0); stackedList.Push(1); stackedList.Push(2); stackedList.Push(3); // Act var peekedItem = stackedList.Peek(); // Assert Assert.That(peekedItem.Equals(3)); }
public void NotChangeThePeekedValueGivenRemovalOfAnItemBelow() { // Arrange var stackedList = new StackedList<int>(); stackedList.Push(0); stackedList.Push(1); stackedList.Push(2); stackedList.Push(3); stackedList.Push(4); // Act stackedList.Remove(2); // Assert Assert.That(stackedList.Peek() == 4); }
public void ReturnTheItemBeforeTheLastItemPushedGivenLastItemRemoved() { // Arrange var stackedList = new StackedList <int>(); stackedList.Push(0); stackedList.Push(1); stackedList.Push(2); stackedList.Push(3); stackedList.Push(4); // Act stackedList.Remove(4); // Assert Assert.That(stackedList.Peek() == 3); }
public void NotChangeThePeekedValueGivenRemovalOfAnItemBelow() { // Arrange var stackedList = new StackedList <int>(); stackedList.Push(0); stackedList.Push(1); stackedList.Push(2); stackedList.Push(3); stackedList.Push(4); // Act stackedList.Remove(2); // Assert Assert.That(stackedList.Peek() == 4); }
public void ReturnTheCorrectItemGivenMultipleItemsRemoved() { // Arrange var stackedList = new StackedList <int>(); stackedList.Push(0); stackedList.Push(1); stackedList.Push(2); stackedList.Push(3); stackedList.Push(4); // Act stackedList.Remove(3); stackedList.Remove(1); // Assert Assert.That(stackedList.Peek() == 4); }
public void ReturnTheItemBeforeTheLastItemPushedGivenLastItemRemoved() { // Arrange var stackedList = new StackedList<int>(); stackedList.Push(0); stackedList.Push(1); stackedList.Push(2); stackedList.Push(3); stackedList.Push(4); // Act stackedList.Remove(4); // Assert Assert.That(stackedList.Peek() == 3); }
public void ReturnTheCorrectItemGivenMultipleItemsRemoved() { // Arrange var stackedList = new StackedList<int>(); stackedList.Push(0); stackedList.Push(1); stackedList.Push(2); stackedList.Push(3); stackedList.Push(4); // Act stackedList.Remove(3); stackedList.Remove(1); // Assert Assert.That(stackedList.Peek() == 4); }