Appendix E. Money with ATDD
“Money frees you from doing things you dislike. Since I dislike doing nearly everything, money is handy.”
Groucho Marx
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.
The Context
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 ...
Get Lean-Agile Acceptance Test-Driven Development: Better Software Through Collaboration now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.