public void TestClear() { MySimpleStack S = new MySimpleStack(5); S.Push(1); S.Push(2); S.Push(3); S.Clear(); Assert.AreEqual(0, S.Count()); }
public void TestPush() { //Push 3 items, check Count MySimpleStack S = new MySimpleStack(5); S.Push(1); S.Push(2); S.Push(3); Assert.AreEqual(3, S.Count()); }
public void TestMethodPush() { MySimpleStack S = new MySimpleStack(5); S.Push(5); Assert.AreEqual(1, S.Count); S.Push(2); S.Push(5); Assert.AreEqual(2, S.Count); }
public void TestPop() { //Push some items, check the poped value MySimpleStack S = new MySimpleStack(5); S.Push(1); S.Push(2); S.Push(3); Assert.AreEqual(3, S.Pop()); Assert.AreEqual(2, S.Pop()); }
public void TestPeek() { //Push some items, check Peeked value and Count MySimpleStack S = new MySimpleStack(5); S.Push(1); S.Push(2); S.Push(3); S.Peek(); Assert.AreEqual(3, S.Peek()); Assert.AreEqual(3, S.Count()); }