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

            return(vatCalculator.excludeVat(totalAmount, vatRate));
        }
Пример #2
0
        public void Test_CalculateExcludeVat(decimal totalAmount, decimal vatRate, decimal expectedAmount)
        {
            // Act
            var     vatCalculator = new VatCalculator();
            decimal actualAmount  = vatCalculator.excludeVat(totalAmount, vatRate);

            // Assert
            Assert.True(expectedAmount == actualAmount, $"expected {expectedAmount}, actual {actualAmount}");
        }