Exemplo n.º 1
0
        private void AssertNetForGross(int gross, int expectedNet)
        {
            var payslip = new Payslip(gross,
                                      new BandedTaxCalculator(40000, 0.4,
                                                              new BandedTaxCalculator(20000, 0.2,
                                                                                      new BandedTaxCalculator(5000, 0.1, null))));

            Assert.Equal(expectedNet, payslip.GetNet(), 2);
        }
Exemplo n.º 2
0
        public void NetIsGrossMinusTax()
        {
            var payslip = new Payslip(5000, new AnotherDummyTaxCalculator());

            Assert.Equal(4500, payslip.GetNet(), 2);
        }