public CalculatorResult Multiply(double firstOperand, double secondOperand) { try { _calculatorResult.Result = _calculatorManager.Multiply(firstOperand, secondOperand); _calculatorResult.IsSuccessful = true; } catch (Exception e) { _calculatorResult.IsSuccessful = false; _calculatorResult.ErrorMessage = e.Message.ToString(); } return(_calculatorResult); }
public void multiply(int number, int by) { var result = _calculatorManager.Multiply(number, by); Console.WriteLine($"result is {result}"); }
public void GivenMultiply_WhenOperandsAreValid_ThenReturnResult(double firstOperand, double secondOperand, double expectedResult) { var result = _calculatorManager.Multiply(firstOperand, secondOperand); Assert.AreEqual(expectedResult, result); }