若要测试代码,则必须进行部署。
在单独的应用程序中测试代码。
现在我们已经准备好测试代码。
使用mock对象的测试代码。
在脚本语言中编写应用程序测试代码。
更新后的测试代码如清单6 所示。
假定已经编写了上一节中的测试代码。
Assume that you've already written the test code from the previous section.
测试代码的输出如图9所示。
修改测试代码,以使用一组实用工具类
清单7:天气Web服务的测试代码。
使用以下测试代码添加新的批处理条目。
测试代码如清单2 所示
简单地说,单元测试是用代码测试代码。
Simply put, unit testing means writing code to test other code.
测试代码如清单10所示。
你还可以直接从设计模型中产生测试代码。
You may also be able to generate test code directly from the design models.
该重构启用清单1中所示的单元测试代码。
This refactoring enables the unit test code shown in Listing 1.
为模型编写测试代码。
您现在可以测试代码以确保它能够实际起作用。
底部的测试代码只演示了这个语法干净了多少。
The test code at the bottom illustrates just how much cleaner this syntax is.
现在,测试代码清楚地表示出了该测试的意图。
Now the test code clearly represents the intent of the test.
测试代码也需要进行更新,如清单4 所示。
The test code also needs to be upgraded, as shown in Listing 4.
nose在支持共同测试代码方面是最出色的。
It is nose that really shines when it comes to supporting common test code.
你都使用哪些工具来测试代码的性能?
下面到了showaction的测试代码。
彻底地测试代码。
不要使您的测试代码比被测代码更复杂。
Don't make your tests more complicated than the code under test.
测试代码可能比其要测试的代码更复杂。
The test is probably more complicated than the code it's testing.
这样,测试代码就和UImodule解耦了。
重构会是一个比从头生成新测试代码更乏味的过程。
Refactoring is a more tedious procedure than generating new test code from scratch.
现在重新测试代码,您发现上述方法仍然不能工作。
应用推荐