예제 #1
0
        public IActionResult Index(Calculator model)
        {
            Calculation calc = new Calculation();

            model.Total = calc.AddTwoValues(model.NumberA, model.NumberB);
            return(View(model));
        }
예제 #2
0
        public void TestCalculator()
        {
            Calculation calc       = new Calculation();
            var         totalValue = calc.AddTwoValues(valueOne, valueTwo);

            Assert.Equal(totalValue, knownTotal);
        }