public void Test_Calculate_Tax_50000() { // 133510 var result = _taxCalculator.Calculate(_taxRate, 50000m); Assert.AreEqual(11000M, result.TotalAmount); }
public void Test_Calculate_Flat_Rate_Tax_15000() { // ARRANGE var income = 15000m; //ASSERT Assert.AreEqual(_taxCalculator.Calculate(taxRate, income).TotalAmount, 1200m); }
public IActionResult CalculateTax([FromBody] TaxRequestDto taxRequest) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } var taxResponse = _taxCalculatorService.Calculate(taxRequest); return(Ok(taxResponse)); }
public IActionResult CalculateIncomeTax(string countryCode, decimal annualIncome) { return(Ok(_taxCalculatorService.Calculate(countryCode, annualIncome))); }