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 5

Franc-ly Speaking

How are we going to approach the first test, the most interesting test, on that list? It still seems to be a big leap. I’m not sure I can write a test that I can implement in one little step. A prerequisite seems to be having an object like Dollar, but to represent francs. If we can get the object Franc to work the way that the object Dollar works now, we’ll be closer to being able to write and run the mixed addition test.

We can copy and edit the Dollar test:

public void testFrancMultiplication() {
   Franc five= new Franc(5); ...
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