示例#1
0
        public void MultPopTest()
        {
            var calc = new StackCountImpl();

            calc.StackNumbers();
            Assert.AreEqual(400, calc.MultPop());
        }
示例#2
0
        public void DivTest()
        {
            var calc = new StackCountImpl();

            calc.StackNumbers();
            Assert.AreEqual(0.25, calc.Div());
        }
示例#3
0
        public void SubAllTest()
        {
            var calc = new StackCountImpl();

            calc.StackNumbers();
            Assert.AreEqual(-30, calc.SubAll());
        }
示例#4
0
        public void PushTest()
        {
            var calc = new StackCountImpl();

            calc.StackNumbers();
            Assert.AreEqual(3, calc.stack.Count);
        }
示例#5
0
        public void ClearTest()
        {
            var calc = new StackCountImpl();

            calc.StackNumbers();
            calc.Clear();
            Assert.AreEqual(0, calc.stack.Count);
        }
示例#6
0
        public void AddPop()
        {
            var calc = new StackCountImpl();

            calc.Clear();
            calc.StackNumbers();
            Assert.AreEqual(50, calc.AddPop());
        }
示例#7
0
        public void AddTest()
        {
            var calc = new StackCountImpl();

            calc.Clear();
            calc.StackNumbers();
            Assert.AreEqual(100, calc.AddAll());
        }
示例#8
0
        public void TopTest()
        {
            var calc = new StackCountImpl();

            calc.StackNumbers();
            Assert.AreEqual(10, calc.stack.Peek());
            Assert.AreEqual(3, calc.stack.Count);
        }