Skip to Content
Test Driven Development: By Example
book

Test Driven Development: By Example

by Kent Beck
November 2002
Intermediate to advanced
240 pages
5h 9m
English
Addison-Wesley Professional
Content preview from Test Driven Development: By Example

Chapter 17

Money Retrospective

Let’s take a look back at the money example, both the process we used and the results. We will look at:

  • What’s Next?

  • Metaphor—The dramatic effect metaphor has on the structure of the design.

  • JUnit Usage—When we ran tests and how we used JUnit.

  • Code Metrics—A numerical abstract of the resulting code.

  • Process—We say red/green/refactor, but how much work goes into each step?

  • Test Quality—How do TDD tests stack up against conventional test metrics?

What’s Next?

Is the code finished? No. There is that nasty duplication between Sum.plus() and Money.plus(). If we made Expression a class instead of an interface (not the usual direction, as classes more often become interfaces), we would have a natural home for the common ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Refactoring: Improving the Design of Existing Code

Refactoring: Improving the Design of Existing Code

Martin Fowler
Refactoring: Improving the Design of Existing Code

Refactoring: Improving the Design of Existing Code

Martin Fowler, Kent Beck, John Brant, William Opdyke, Don Roberts

Publisher Resources

ISBN: 0321146530Purchase book