Esempio n. 1
0
        public void TestMultiplyAll1Number()
        {
            StackOfInt SOI = new StackOfInt();

            SOI.Clear();
            SOI.Push(1);
            SOI.MultiAllNumbers();
            Assert.AreEqual(1, SOI.StackInt.Peek());
        }
Esempio n. 2
0
        public void TestMultiplyAll()
        {
            StackOfInt SOI = new StackOfInt();

            SOI.Push(1);
            SOI.Push(11);
            SOI.Push(21);
            SOI.MultiAllNumbers();
            Assert.AreEqual(21 * 11 * 1, SOI.StackInt.Peek());
        }
Esempio n. 3
0
        public void TestMultiplyAllIsempty()
        {
            StackOfInt SOI = new StackOfInt();

            SOI.Clear();
            try
            {
                SOI.MultiAllNumbers();
                Assert.Fail();
            }
            catch (Exception)
            {
            }
        }