Test-Driven Development: By Example (Paperback)
內容描述
Test-driven development (TDD) is a new approach to application development
that is designed to eliminate the fear often associated with building software.
Admittedly, some fear is healthy (often viewed as a conscience that tells
programmers to “be careful!” ), but the author believes that programmers build
better software when they have the freedom to be creative. By building tests
before coding begins, programmers ensure the success of their application from
the outset. Students are more likely to achieve positive results with TDD. The
author's example-driven approach also teaches students to be better
communicators, and encourages team members to seek out constructive
criticism.
Table of Contents
Preface. Acknowledgments. Introduction.
I. THE MONEY EXAMPLE.
Multi-Currency Money. 2. Degenerate Objects. 3. Equality for All.
Privacy. 5. Franc-ly Speaking. 6. Equality for All, Redux. 7.
Apples and Oranges. 8. Makin' Objects. 9. Times We're Livin' In. 10.
Interesting Times. 11. The Root of All Evil. 12. Addition, Finally.- Make It. 14. Change. 15. Mixed Currencies. 16. Abstraction,
Finally. 17. Money Retrospective.
II. The xUnit Example.
- First Steps to xUnit. 19. Set the Table. 20. Cleaning Up After.
- Counting. 22. Dealing with Failure. 23. How Suite It Is. 24.
xUnit Retrospective.
III. Patterns for Test-Driven Development.
- Test-Driven Development Patterns. 26. Red Bar Patterns. 27.
Testing Patterns. 28. Green Bar Patterns. 29. xUnit Patterns. 30.
Design Patterns. 31. Refactoring. 32. Mastering TDD. Appendix I:
Influence Diagrams. Appendix II: Fibonacci. Afterword.