예제 #1
0
        public void TestMethodGetOperatorMultiply()
        {
            var operatorTest = new PerformFunctions();

            operatorTest.typeOfArithmetic = "multiply";
            operatorTest.getOperand();
            Assert.AreEqual(operatorTest.operand, "*");
        }
예제 #2
0
        public void TestMethodGetOperatorDivide()
        {
            var operatorTest = new PerformFunctions();

            operatorTest.typeOfArithmetic = "divide";
            operatorTest.getOperand();
            Assert.AreEqual(operatorTest.operand, "/");
        }
예제 #3
0
        public void TestMethodGetOperatorSubtract()
        {
            var operatorTest = new PerformFunctions();

            operatorTest.typeOfArithmetic = "subtract";
            operatorTest.getOperand();
            Assert.AreEqual(operatorTest.operand, "-");
        }
예제 #4
0
        public void TestMethodDivide()
        {
            var divideTest = new PerformFunctions();

            divideTest.typeOfArithmetic = "divide";
            divideTest.firstOperand     = 25;
            divideTest.secondOperand    = 5;
            divideTest.getTotal();
            Assert.AreEqual(divideTest.total, 5);
        }
예제 #5
0
        public void TestMethodMultiply()
        {
            var multiplyTest = new PerformFunctions();

            multiplyTest.typeOfArithmetic = "multiply";
            multiplyTest.firstOperand     = 5;
            multiplyTest.secondOperand    = 2;
            multiplyTest.getTotal();
            Assert.AreEqual(multiplyTest.total, 10);
        }
예제 #6
0
        public void TestMethodSubtract()
        {
            var subtractTest = new PerformFunctions();

            subtractTest.typeOfArithmetic = "subtract";
            subtractTest.firstOperand     = 5;
            subtractTest.secondOperand    = 2;
            subtractTest.getTotal();
            Assert.AreEqual(subtractTest.total, 3);
        }
예제 #7
0
        public void TestMethodAdd()
        {
            var addTest = new PerformFunctions();

            addTest.typeOfArithmetic = "add";
            addTest.firstOperand     = 5;
            addTest.secondOperand    = 2;
            addTest.getTotal();
            Assert.AreEqual(addTest.total, 7);
        }