예제 #1
0
        public void InteractiveCalcTestDivide()
        {
            string[] args   = { "81", "9", "/" };
            var      target = new InteractiveTesterCalc(new OperationRegistryImpl(), args);

            Assert.AreEqual(target.Compute(), 9);
        }
예제 #2
0
        public void InteractiveCalcTestSubtract()
        {
            string[] args   = { "9", "25", "-" };
            var      target = new InteractiveTesterCalc(new OperationRegistryImpl(), args);

            Assert.AreEqual(target.Compute(), -16);
        }
예제 #3
0
        public void InteractiveCalcTestMultuply()
        {
            string[] args   = { "45", "13", "*" };
            var      target = new InteractiveTesterCalc(new OperationRegistryImpl(), args);

            Assert.AreEqual(target.Compute(), 585);
        }
예제 #4
0
        public void InteractiveCalcTest()
        {
            string[] args   = { "12", "13", "" };
            var      target = new InteractiveTesterCalc(new OperationRegistryImpl(), args);

            Assert.AreEqual(target.Compute(), 25);
        }