Test-Driven Development By Example

4.1

Reviews from our users

Get Free Access to Download this and other Thousands of Books (Join Now)

Clean code that works--now. This is the seeming contradiction that lies behind much of the pain of programming. Test-driven development replies to this contradiction with a paradox--test the program before you write it.

A new idea? Not at all. Since the dawn of computing, programmers have been specifying the inputs and outputs before programming precisely. Test-driven development takes this age-old idea, mixes it with modern languages and programming environments, and cooks up a tasty stew guaranteed to satisfy your appetite for clean code that works--now.

Developers face complex programming challenges every day, yet they are not always readily prepared to determine the best solution. More often than not, such difficult projects generate a great deal of stress and bad code. To garner the strength and courage needed to surmount seemingly Herculean tasks, programmers should look to test-driven development (TDD), a proven set of techniques that encourage simple designs and test suites that inspire confidence.

By driving development with automated tests and then eliminating duplication, any developer can write reliable, bug-free code no matter what its level of complexity. Moreover, TDD encourages programmers to learn quickly, communicate more clearly, and seek out constructive feedback.

Readers will learn to:

Solve complicated tasks, beginning with the simple and proceeding to the more complex.

Write automated tests before coding.

Grow a design organically by refactoring to add design decisions one at a time.

Create tests for more complicated logic, including reflection and exceptions.

Use patterns to decide what tests to write.

Create tests using xUnit, the architecture at the heart of many programmer-oriented testing tools.

This book follows two TDD projects from start to finish, illustrating techniques programmers can use to easily and dramatically increase the quality of their work. The examples are followed by references to the featured TDD patterns and refactorings. With its emphasis on agile methods and fast development strategies, Test-Driven Development is sure to inspire readers to embrace these under-utilized but powerful techniques.

 

 

 

 


Table of Contents:
- CHAPTER 1 Story Time
- CHAPTER 2 Section I: Money Example
- CHAPTER 3 Money Example
- CHAPTER 4 Degenerate Objects
- CHAPTER 5 Equality for All
- CHAPTER 6 Privacy
- CHAPTER 7 Franc-ly Speaking
- CHAPTER 8 Equality for All, Redux
- CHAPTER 9 Apples and Oranges
- CHAPTER 10 Makin’ Objects
- CHAPTER 11 Times We’re Livin’ In
- CHAPTER 12 Interesting Times
- CHAPTER 13 The Root of all Evil
- CHAPTER 14 Addition, Finally
- CHAPTER 15 Make It
- CHAPTER 16 Change
- CHAPTER 17 Mixed Currencies
- CHAPTER 18 Abstraction, Finally
- CHAPTER 19 Money Retrospective
- CHAPTER 20 Section II: xUnit
- CHAPTER 21 Set the Table
- CHAPTER 22 Cleaning Up After
- CHAPTER 23 Counting
- CHAPTER 24 Dealing with Failure
- CHAPTER 25 How Suite It Is
- CHAPTER 26 xUnit Retrospective
- CHAPTER 27 Section III: Patterns
- CHAPTER 28 Test-Driven Development Patterns
- CHAPTER 29 Red Bar Patterns
- CHAPTER 30 Testing Patterns
- CHAPTER 31 Green Bar Patterns
- CHAPTER 32 xUnit Patterns
- CHAPTER 33 Design Patterns
- CHAPTER 34 Refactoring
- CHAPTER 35 Mastering TDD
- CHAPTER 36 Glossary
- CHAPTER 37 Appendix 1: Influence Diagrams
- CHAPTER 38 Fibonacci

Authors:


Questions about Book


Reviews:


4.1

Based on 0 review


Related Refrences: