1. You are not allowed to write any production code until you have first written a failing unit test.
2. You are not allowed to write more of a unit test than is sufficient to fail—and not compiling is failing.
3. You are not allowed to write more production code that is sufficient to pass the currently failing unit test.
转载于:https://www.cnblogs.com/Robert_Hu/archive/2012/09/20/tdd.html
相关资源:JAVA上百实例源码以及开源项目