1. You are not allowed to write any production code unless it is to make a failing unit test pass.
2. You are not allowed to write any more of a unit test than is sufficient to fail; and compilation failures are failures.
3. You are not allowed to write any more production code than is sufficient to pass the one failing unit test.
UncleBob:http://butunclebob.com/ArticleS.UncleBob.TheThreeRulesOfTdd
中文翻译:http://blog.youkuaiyun.com/hudon/article/details/1123700
本文介绍了测试驱动开发(TDD)的三大核心法则:只编写能让失败的单元测试通过的生产代码;只编写刚好能导致测试失败的单元测试;只编写刚好能通过失败单元测试的生产代码。这三条法则由Uncle Bob提出,是实践TDD的重要指导原则。
2928

被折叠的 条评论
为什么被折叠?



