GetChapter6Deductions() 공개 메소드

public GetChapter6Deductions ( ) : double
리턴 double
예제 #1
0
 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);
 }
예제 #2
0
        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);
        }
예제 #3
0
        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);
        }
예제 #4
0
        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);
        }
예제 #5
0
        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);
        }
예제 #6
0
 public void ShouldReturnNoDeductionIfEpfIsNotAvailableAndNoOtherInvestmentIsMade()
 {
     var salary = new AnnualSalary {Epf = 0};
     TaxStatement ts = new TaxStatement(salary, null);
     Assert.AreEqual(0, ts.GetChapter6Deductions(), 0.01);
 }
예제 #7
0
 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);
 }
예제 #8
0
        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);
        }
예제 #9
0
        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);
        }
예제 #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);
        }
예제 #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);
        }