public void DeductionShouldBeEqualToApprpriateDonationUnder80GIsAddedWhenOneFullyExemptAndOneHalfExemptIsAdded() { DonationsUnder80G donationsUnder80G = new DonationsUnder80G(); donationsUnder80G.AddDonation(new HalfExemptDonation(10)); donationsUnder80G.AddDonation(new FullyExemptDonation(10)); Assert.AreEqual(15, donationsUnder80G.GetDeduction(), 0.001); }
public void TotalDeductionShouldBeEqualToApprpriateSumOfDonationsApplicableToIndividualDonations() { DonationsUnder80G donationsUnder80G = new DonationsUnder80G(); donationsUnder80G.AddDonation(new HalfExemptDonation(10)); donationsUnder80G.AddDonation(new HalfExemptDonation(10)); donationsUnder80G.AddDonation(new FullyExemptDonation(10)); donationsUnder80G.AddDonation(new FullyExemptDonation(10)); Assert.AreEqual(30, donationsUnder80G.GetDeduction(), 0.001); }
public void DeductionShouldBeZeroWhenNoDonationUnder80G() { DonationsUnder80G donationsUnder80G = new DonationsUnder80G(); Assert.AreEqual(0,donationsUnder80G.GetDeduction(),0.001); }
public void DeductionShouldBeEqualToHalfOfHalfExemptDeductionWhenOneHalfExemptDonationUnder80GIsAdded() { DonationsUnder80G donationsUnder80G = new DonationsUnder80G(); donationsUnder80G.AddDonation(new HalfExemptDonation(10)); Assert.AreEqual(5, donationsUnder80G.GetDeduction(), 0.001); }