public void And_amount_of_donations_resulting_in_large_fraction_THEN_I_receive_rounded_gift_aid_result()
        {
            var calculator = GiftAidCalculatorBuilder.Create().AsDonor();

            var giftAid = CalculateAmountThatWouldResultIn_25_064_giftAid(calculator);

            Assert.That(giftAid, Is.EqualTo(25.06m));
        }
        public void I_can_calculate_gift_aid_according_to_tax_rate()
        {
            var calculator = GiftAidCalculatorBuilder.Create().AsDonor();

            var giftAid = calculator.CalculateGiftAidFor(100m);

            Assert.That(giftAid, Is.EqualTo(25m));
        }
Beispiel #3
0
        public void And_I_set_the_new_rate_THEN_the_rate_should_be_changed_in_data_store()
        {
            var taxMock    = new Mock <ITaxRepository>();
            var calculator = GiftAidCalculatorBuilder
                             .Create()
                             .WithTaxSource(taxMock.Object)
                             .AsAdmin();

            calculator.ChangeCurrentTaxRate(0.25m);

            taxMock.Verify(x => x.StoreCurrentTaxRate(0.25m));
        }
        public void The_tax_rate_is_retrieved_from_data_store()
        {
            var taxMock    = new Mock <ITaxRepository>();
            var calculator = GiftAidCalculatorBuilder
                             .Create()
                             .WithTaxSource(taxMock.Object)
                             .AsDonor();

            calculator.CalculateGiftAidFor(1m);

            taxMock.Verify(x => x.GetCurrentTaxRate);
        }