public void TestsubTop2() { StackOfInt SOI = new StackOfInt(); SOI.Push(1); SOI.Push(11); SOI.Push(21); SOI.SubTop2(); Assert.AreEqual(21 - 11, SOI.StackInt.Peek()); }
public void TestsubTop2Exception() { StackOfInt SOI = new StackOfInt(); SOI.Push(1); try { SOI.SubTop2(); Assert.Fail(); } catch (Exception) { } }