Appendix E. Money with ATDD
“Money frees you from doing things you dislike. Since I dislike doing nearly everything, money is handy.”
Developers who have been exposed to test-driven development (TDD) often come across the money problem. This problem was introduced in Kent Beck’s book, Test-Driven Development by Example [Beck01]. An example with unit tests accompanies many of the xUnit frameworks.
An organization owns shares of stocks in different companies, and the shares are valued in different currencies. You want to add up the money in different currencies and convert it to a total in a given currency. An example of this follows, where CHF are Swiss francs.
The Original Tests
Kent Beck’s book showed how to ...