GiftAidCalculator
所属分类:Leetcode/题库
开发工具:C#
文件大小:21KB
下载次数:0
上传日期:2014-12-01 02:03:39
上 传 者:
sh-1993
说明: 面试编程测试
(Programming test for interview)
文件列表:
GiftAidCalculator.Model (0, 2014-12-01)
GiftAidCalculator.Model\App.config (778, 2014-12-01)
GiftAidCalculator.Model\CalculationHelper.cs (291, 2014-12-01)
GiftAidCalculator.Model\EventSupplement.cs (1022, 2014-12-01)
GiftAidCalculator.Model\GiftAidCalculator.Model.csproj (3341, 2014-12-01)
GiftAidCalculator.Model\GiftAidCalculator.cs (1209, 2014-12-01)
GiftAidCalculator.Model\IEntity.cs (223, 2014-12-01)
GiftAidCalculator.Model\Properties (0, 2014-12-01)
GiftAidCalculator.Model\Properties\AssemblyInfo.cs (1422, 2014-12-01)
GiftAidCalculator.Model\Repository (0, 2014-12-01)
GiftAidCalculator.Model\Repository\EventSupplementContext.cs (200, 2014-12-01)
GiftAidCalculator.Model\Repository\FakeRepository.cs (701, 2014-12-01)
GiftAidCalculator.Model\Repository\IRepository.cs (247, 2014-12-01)
GiftAidCalculator.Model\Repository\ITaxRepository.cs (285, 2014-12-01)
GiftAidCalculator.Model\Repository\Repository.cs (816, 2014-12-01)
GiftAidCalculator.Model\Repository\TaxRepository.cs (550, 2014-12-01)
GiftAidCalculator.Model\packages.config (139, 2014-12-01)
GiftAidCalculator.TestConsole (0, 2014-12-01)
GiftAidCalculator.TestConsole\GiftAidCalculator.TestConsole.csproj (3604, 2014-12-01)
GiftAidCalculator.TestConsole\Program.cs (3703, 2014-12-01)
GiftAidCalculator.TestConsole\Properties (0, 2014-12-01)
GiftAidCalculator.TestConsole\Properties\AssemblyInfo.cs (1452, 2014-12-01)
GiftAidCalculator.TestConsole\app.config (876, 2014-12-01)
GiftAidCalculator.TestConsole\packages.config (139, 2014-12-01)
GiftAidCalculator.Tests (0, 2014-12-01)
GiftAidCalculator.Tests\App.config (778, 2014-12-01)
GiftAidCalculator.Tests\DonorTests.cs (4060, 2014-12-01)
GiftAidCalculator.Tests\GiftAidCalculator.Tests.csproj (3686, 2014-12-01)
GiftAidCalculator.Tests\Properties (0, 2014-12-01)
GiftAidCalculator.Tests\Properties\AssemblyInfo.cs (1440, 2014-12-01)
GiftAidCalculator.Tests\SiteAdministratorTests.cs (1254, 2014-12-01)
GiftAidCalculator.Tests\packages.config (275, 2014-12-01)
GiftAidCalculator.sln (3734, 2014-12-01)
## Intro
This assignment is a very small task to create a Gift Aid calculator.
For reference, Gift Aid is calculated as follows:
`[Donation Amount] * ( [TaxRate] / (100 - [TaxRate]) )`
### Story 1
As a **donor**
I want **to see my gift aid calculated according to the current tax rate**
So that **I know how much extra cash the charity will make**
#### Acceptance criteria
- Gift aid calculated at a tax rate of 20%.
- Supported by unit tests.
---
### Story 2
As a **site administrator**
I want **to be able to change the applicable tax rate**
So that **I don't need to change the code when the tax rate changes**
#### Acceptance criteria
- Current Tax Rate is retrieved from data store.
- Gift Aid amount is calculated based on the current amount in the data store.
---
### Story 3
As a **donor**
I want **to see my gift aid amount rounded correctly to 2 decimal places**
So that **I'm not confused about how much will be paid to the charity**
#### Acceptance criteria
- Gift aid amount correctly rounded to 2 decimal places (1.316 should round to 1.32).
---
### Story 4
As an **events promoter**
I want **to supplement gift aid payments based on event type**
So that **people will feel inspired to donate to these event types**
#### Acceptance criteria
- 5% supplement added for donations to "running" events.
- 3% supplement added for donations to "swimming" events.
- No supplement should be applied for other events.
---
近期下载者:
相关文件:
收藏者: