Ejemplo n.º 1
0
        [InlineData(105.14, 4.51, 16, 6.31)] // based on 15,020 purchase value
        public void CalculateStampDuty_returns_expexted_result1(decimal brokerageFee, decimal clearingFee, decimal stampDuty, decimal expectedResult)
        {
            var rate        = new SalesServiceTaxRate(Percent(6), Percent(0), Percent(0));
            var taxableFees = new TaxableFees(brokerageFee, clearingFee, stampDuty);

            var result = ToTotal(CalculateSalesServiceTax(rate, taxableFees));


            result.Should().BeApproximately(expectedResult, 0.01m);
        }
Ejemplo n.º 2
0
 public static SalesServiceTax CalculateSalesServiceTax(SalesServiceTaxRate taxRate, TaxableFees fees) =>
 new SalesServiceTax
 {
     Brokerage   = taxRate.Brokerage * fees.Brokerage,
     ClearingFee = taxRate.ClearingFee * fees.ClearingFee,
     StampDuty   = taxRate.StampDuty * fees.StampDuty
 };