public void PushItemCanPopItem() { var stack = new StackAsList <string>(); stack.Push("test"); Assert.AreEqual("test", stack.Pop()); }
public void PushTwoItemsPopTopItem() { var stack = new StackAsList <string>(); stack.Push("test"); stack.Push("other test"); Assert.AreEqual("other test", stack.Pop()); }
public void PushItemPopItemCountIs0() { var stack = new StackAsList <string>(); stack.Push("test"); stack.Pop(); Assert.AreEqual(0, stack.Count); }
public void ClearListCantPopItem() { var stack = new StackAsList <string>(); stack.Push("test"); stack.Clear(); stack.Pop(); }
public void PushTwoItemsPopRemainsSecond() { var stack = new StackAsList <string>(); stack.Push("test"); stack.Push("other test"); stack.Pop(); Assert.AreEqual(1, stack.Count); Assert.AreEqual("test", stack.Peek()); }
public void CreateCannotPop() { var stack = new StackAsList <string>(); stack.Pop(); }