你开发的一系列测试说明了代码的运行机制,这种程序自我编档的方式促进了交流。
It encourages communication by making your programs self-documenting-the set of tests you develop show how the code works in a way that a manual can't.
在一个实际项目中,不像这些简单的例子这样,你可以很容易地达到模仿实现需要它的自我测试这一阶段,因为有那么多的代码。
In a real project, unlike in these simple examples, you can easily reach the stage where the mock implementation needs its own tests because it contains so much code.
应用推荐