Пример #1
0
        public ActionResult <decimal> GetTotalAmount(decimal amount)
        {
            var vatCalculator = new VatCalculator();
            var vatRate       = taxRepo.getVatRate();

            return(vatCalculator.calculateVat(amount, vatRate));
        }
Пример #2
0
        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);
        }