Write your test code for the model.
为模型编写测试代码。
The test code is shown in Listing 2.
测试代码如清单2 所示
The updated test code is shown in Listing 6.
更新后的测试代码如清单6 所示。
Listing 7: Test code for Weather Web service.
清单7:天气Web服务的测试代码。
The test code changes only a little (see Listing 8).
测试代码只需要稍加修改即可(请参看清单 8)。
Modify the test code to use a set of utility classes
修改测试代码,以使用一组实用工具类
Writing application test code in a scripting language.
在脚本语言中编写应用程序测试代码。
To add a new batch item, I use the following test code.
使用以下测试代码添加新的批处理条目。
Test code is just as important as production code.
测试代码和生产代码一样重要。
In this way, the test code is decoupled from the UI module.
这样,测试代码就和UImodule解耦了。
Now the test code clearly represents the intent of the test.
现在,测试代码清楚地表示出了该测试的意图。
Unit - Developer can test code as an un-integrated unit.
单元-开发人员可以测试代码作为一个不可分的单元。
The test code also needs to be upgraded, as shown in Listing 4.
测试代码也需要进行更新,如清单 4 所示。
This refactoring enables the unit test code shown in Listing 1.
该重构启用清单1中所示的单元测试代码。
Finally, the test code printed the result of the get_name call.
最后,测试代码输出get _ name调用的结果。
However, it requires a lot of effort to create robust test code.
然而,它需要投入更多的努力才能创建出智能的测试代码。
The test code would like it to produce a different type (a mock).
测试代码希望它产生另一种类型的对象(模仿对象)。
This means that vendors can test code that has not yet been shipped.
这意味着供应商可以测试尚未发布的代码。
To keep the code simple, I put the class and the test code in one file.
为了保持代码简单,我把类和测试代码放在一个文件中。
You are a developer who authors both production code and test code.
您是一位开发人员,负责撰写实际执行程式码和测试程式码。
You may also be able to generate test code directly from the design models.
你还可以直接从设计模型中产生测试代码。
Assume that you've already written the test code from the previous section.
假定已经编写了上一节中的测试代码。
It is nose that really shines when it comes to supporting common test code.
nose在支持共同测试代码方面是最出色的。
The test code at the bottom illustrates just how much cleaner this syntax is.
底部的测试代码只演示了这个语法干净了多少。
Refactoring is a more tedious procedure than generating new test code from scratch.
重构会是一个比从头生成新测试代码更乏味的过程。
In your test code, create a specialization object that extends (specializes) the target.
在测试代码中,创建扩展(专用于)目标对象的特殊化对象。
Our test code, specifically the mock objects, give us total control over the database results.
我们的测试代码,特别是模拟对象,使我们能完全控制数据库结果。
In your test code, create a mock object implementing the same interface as the collaborator.
在测试代码中,创建模仿对象且实现与合作者相同的接口。
It achieves functional code and test code alternately with the "test Driven Development" approach.
同时融入了“测试驱动的开发”方法,交替实现测试代码和功能代码。
Test the code in a separate application.
在单独的应用程序中测试代码。
应用推荐