public void stored_value_should_be_retrievable() { const decimal taxRate = 25m; var storage = new TaxRateStorageImpl(); storage.StoreTaxRate(taxRate); var taxRateValue = storage.RetrieveTaxRate(); Assert.AreEqual(taxRate, taxRateValue); }
static decimal GiftAidAmount(decimal donationAmount) { var storage = new TaxRateStorageImpl(); storage.StoreTaxRate(25m); var donationEngine = new DonationEngine( storage, new GiftAidCalculator(), new SupplementCalculator()); var info = donationEngine.Donate(donationAmount, new EventActivity { EventType = EventType.Other }); return info.GiftAidRounded; }
static decimal GiftAidAmount(decimal donationAmount) { var storage = new TaxRateStorageImpl(); storage.StoreTaxRate(25m); var donationEngine = new DonationEngine( storage, new GiftAidCalculator(), new SupplementCalculator()); var info = donationEngine.Donate(donationAmount, new EventActivity { EventType = EventType.Other }); return(info.GiftAidRounded); }