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); ...
Get Test Driven Development: By Example 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.