コード例 #1
0
        public void MultiplyTest3(int x, int y, int res)
        {
            ICalculatingStack calc = new CalculatingStack();

            calc.Add(x);
            calc.Multiply(y);
            Assert.Equal(calc.Current, res);
        }
コード例 #2
0
        public void TestMultiply()
        {
            ICalculatingStack calc = new CalculatingStack();

            Assert.Equal(0, calc.Current);
            calc.Add(2);
            calc.Multiply(3);
            Assert.Equal(6, calc.Current);
        }