GetChapter6Deductions() public method

public GetChapter6Deductions ( ) : double
return double
 public void ShouldReturnEpfAsDeductionIfNoOtherInvestmentIsMade()
 {
     const int epfContribution = 100;
     var salary = new AnnualSalary {Epf = epfContribution};
     TaxStatement ts = new TaxStatement(salary, null) { Chapter6Investments = null };
     Assert.AreEqual(epfContribution, ts.GetChapter6Deductions(), 0.01);
 }
        public void ShouldReturnDeductionCapAsDeductionWhenOnlyHousingLoanPrincipalAsInvestementWithEpfAsZeroAndExceedsTheCap()
        {
            var investments = new Chapter6Investments();
            investments.Add(new HousingLoanPrincipal(100001));
            var salary = new AnnualSalary { Epf = 0 };

            TaxStatement ts = new TaxStatement(salary, null) { Chapter6Investments = investments };

            Assert.AreEqual(Chapter6Investments.Cap, ts.GetChapter6Deductions(), 0.01);
        }
        public void ShouldReturnCapValueAsDeductionIfLifeInsuranceAndElssInvestmentsExceedsTheCapAndOtherInvestmentAreZero()
        {
            var investments = new Chapter6Investments();
            investments.Add(new LifeInsurance(50000));
            investments.Add(new Elss(60000));

            var salary = new AnnualSalary {Epf = 0};
            TaxStatement ts = new TaxStatement(salary, null) { Chapter6Investments = investments };
            Assert.AreEqual(Chapter6Investments.Cap, ts.GetChapter6Deductions(), 0.01);
        }
        public void ShouldReturnDeductionCapAsDeductionWhenTotalOfAllInvestmetIsAboveDeductionCap()
        {
            var investments = new Chapter6Investments();
            investments.Add(new LifeInsurance(50000));
            investments.Add(new Elss(30000));
            investments.Add(new PublicProvidentFund(10000));

            var salary = new AnnualSalary {Epf = 500000};
            TaxStatement ts = new TaxStatement(salary, null) { Chapter6Investments = investments };
            Assert.AreEqual(Chapter6Investments.Cap, ts.GetChapter6Deductions(), 0.01);
        }
        public void ShouldReturnSumOfLifeInsuranceAndElssIfBothAreWithinCapAndOtherInvestmentAreZero()
        {
            var investments = new Chapter6Investments();
            investments.Add(new LifeInsurance(30000));
            investments.Add(new Elss(60000));

            var salary = new AnnualSalary {Epf = 0};
            TaxStatement ts = new TaxStatement(salary, null) { Chapter6Investments = investments };
            Assert.AreEqual(90000.0, ts.GetChapter6Deductions(), 0.01);
        }
 public void ShouldReturnNoDeductionIfEpfIsNotAvailableAndNoOtherInvestmentIsMade()
 {
     var salary = new AnnualSalary {Epf = 0};
     TaxStatement ts = new TaxStatement(salary, null);
     Assert.AreEqual(0, ts.GetChapter6Deductions(), 0.01);
 }
 public void ShouldReturnLifeInsuranceInvestmentAsDeductionIfNoOtherInvestmentIsMadeAndEpfIsZero()
 {
     var investments = new Chapter6Investments();
     investments.Add(new LifeInsurance(30000));
     var salary = new AnnualSalary {Epf = 0};
     TaxStatement ts = new TaxStatement(salary, null) { Chapter6Investments = investments };
     Assert.AreEqual(30000.0, ts.GetChapter6Deductions(), 0.01);
 }
        public void ShouldReturnZeroDeductionIfInvestmentIsNotAvailableAndEpfIsZero()
        {
            var salary = new AnnualSalary {Epf = 0.0};
            TaxStatement ts = new TaxStatement(salary, null);
            Assert.AreEqual(0.0, ts.GetChapter6Deductions(), 0.01);

            salary = new AnnualSalary();
            ts = new TaxStatement(salary, null) { Chapter6Investments = new Chapter6Investments() };
            Assert.AreEqual(0.0, ts.GetChapter6Deductions(), 0.01);
        }
        public void ShouldReturnTotalPpfInvestmentAsDeductionIfPpfInvestmentIsWithinPpfCapAndNoOtherInvestmentIsMade()
        {
            var investments = new Chapter6Investments();
            const double ppfContribution = 69999.99;
            investments.Add(new PublicProvidentFund(ppfContribution));

            var salary = new AnnualSalary {Epf = 0};
            TaxStatement ts = new TaxStatement(salary, null) { Chapter6Investments = investments };
            Assert.AreEqual(ppfContribution, ts.GetChapter6Deductions(), 0.01);
        }
Beispiel #10
0
        public void ShouldReturnTotalInvestmentCapAsDeductionIfLicElssAndPpfInvestmentsExceedsTheCapAndEpfIsZero()
        {
            var investments = new Chapter6Investments();
            investments.Add(new LifeInsurance(50000));
            investments.Add(new Elss(30000));
            investments.Add(new PublicProvidentFund(20000.01));

            var salary = new AnnualSalary {Epf = 0 };
            TaxStatement ts = new TaxStatement(salary, null) { Chapter6Investments = investments };
            Assert.AreEqual(Chapter6Investments.Cap, ts.GetChapter6Deductions(), 0.01);
        }
Beispiel #11
0
        public void ShouldReturnTotalDeductionsAsDeductionWhenOnlyHousingLoanPrincipalAsInvestementWithEpfAndUnderTheCap()
        {
            var investments = new Chapter6Investments();
            investments.Add(new HousingLoanPrincipal(60001));
            var salary = new AnnualSalary { Epf = 10000 };

            TaxStatement ts = new TaxStatement(salary, null) { Chapter6Investments = investments };

            Assert.AreEqual(70001, ts.GetChapter6Deductions(), 0.01);
        }