public ActionResult <decimal> GetTotalAmount(decimal amount) { var vatCalculator = new VatCalculator(); var vatRate = taxRepo.getVatRate(); return(vatCalculator.calculateVat(amount, vatRate)); }
public void Test_CalculateVat_WithVatRate(decimal amount, decimal vatRate, decimal expectedTotalAmount) { // Act var vatCalculator = new VatCalculator(); decimal actualTotalAmount = vatCalculator.calculateVat(amount, vatRate); // Assert Assert.Equal(expectedTotalAmount, actualTotalAmount); }