public IActionResult Index(Calculator model) { Calculation calc = new Calculation(); model.Total = calc.AddTwoValues(model.NumberA, model.NumberB); return(View(model)); }
public void TestCalculator() { Calculation calc = new Calculation(); var totalValue = calc.AddTwoValues(valueOne, valueTwo); Assert.Equal(totalValue, knownTotal); }