public void TestMethodSub()
        {
            var controller = new CalcController();

            var result = controller.GetSub(1.5, 1.5);

            Assert.AreEqual(0, result.Result);
        }
Beispiel #2
0
        public void SubtractTestCase()
        {
            double leftOp   = 2;
            double rightOp  = 2;
            var    testData = new {
                operation = "subtract",
                arguments = new List <double> {
                    leftOp, rightOp
                },
                result = leftOp - rightOp
            };
            var controller = new CalcController();
            var result     = controller.GetSub(leftOp, rightOp);

            Assert.AreEqual(result.ToString(), testData.ToString());
        }