public void TestAddAllNumber1Number() { StackOfInt SOI = new StackOfInt(); SOI.Clear(); SOI.Push(1); SOI.AddAll(); Assert.AreEqual(1, SOI.StackInt.Peek()); }
public void TestaddAll() { StackOfInt SOI = new StackOfInt(); SOI.Push(1); SOI.Push(11); SOI.Push(21); SOI.AddAll(); Assert.AreEqual(21 + 11 + 1, SOI.StackInt.Peek()); }
public void TestAddAllIsempty() { StackOfInt SOI = new StackOfInt(); SOI.Clear(); try { SOI.AddAll(); Assert.Fail(); } catch (Exception) { } }