8. TDD In Action Banking User Stories Open Account As a customer, I want to open a bank account with an initial deposit >= 0 dollars. After opening the account, the account balance should be the amount of the initial deposit. Deposit Funds As a customer, I want make a deposit into a bank account. After the deposit, the account balance should be the previous balance plus the amount of the deposit. The deposit amount must be >= 0 dollars Let's write some code
9.
10.
11.
12.
13.
14. TDD and Design What Others Have To Say If TDD has never led you to an unexpected design, you've got more to learn @JoshuaKerievsky The act of writing a unit test is more an act of design than of verification. It is also more an act of documentation than of verification Bob Martin, “Uncle Bob” ...you're always thinking about design. Either you're deciding which test you're going to write next, which is an interface design process, or you're deciding how to refactor, which is a code design process. James Shore
15.
16.
17.
18.
19.
20.
21. An Introduction to Test Driven Development Michael Denomy Nashua Scrum Club January 13, 2011 www.mdenomy.wordpress.com
Notes de l'éditeur
I
T
More acronyms Can't tell you how many times I have worked on systems that have a bunch of stale code that the developer “thought we might need” Becomes technical debt, especially if it is not tested. Don't put in code you don't need, write tests for the code that you put in. Refactoring is the time that we look to improve ...ilities, like readabilty, maintainability, we do it as part of a tight red-green-refactor loop. Always happening Asking how will I test this forces us to think of good design practices