コード例 #1
0
        public void TestSubtractNumbers(int x, int y, int expectedResult)
        {
            var cs     = new CalcService();
            var result = cs.SubtractNumbers(x, y);

            Assert.Equal(expectedResult, result);
        }
コード例 #2
0
        public ActionResult Subtract(CalcViewModel model)
        {
            var cs     = new CalcService();
            var result = cs.SubtractNumbers(model.Number1, model.Number2);

            model.Result = result;
            return(View("Process", model));
        }