π Bookshelf
π Contents
π Prev
π Next
Chapter 05: Test Driven Development
- 
    
The three laws of TDD:
- You are not allowed to write any production code until you have first written a failing unit test.
 - You are not allowed to write more of a unit test than is sufficient to failβand not compiling is failing.
 - You are not allowed to write more production code that is sufficient to pass the currently failing unit test.
 
 - 
    
The unit tests are documents. They describe the lowest-level design of the system. They are unambiguous, accurate, written in a language that the audience understands, and are so formal that they execute. They are the best kind of low-level documentation that can exist.