O'Reilly logo

Lean-Agile Acceptance Test-Driven Development: Better Software Through Collaboration by Ken Pugh

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required