Write your test code for the model.
为模型编写测试代码。
Listing 10. The viewport test code.
清单10.viewport测试代码。
The test code is shown in Listing 2.
测试代码如清单2 所示
The updated test code is shown in Listing 6.
更新后的测试代码如清单6 所示。
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.
使用以下测试代码添加新的批处理条目。
In this way, the test code is decoupled from the UI module.
这样,测试代码就和UImodule解耦了。
Now the test code clearly represents the intent of the test.
现在,测试代码清楚地表示出了该测试的意图。
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中所示的单元测试代码。
What if there are tens or hundreds of locators in the 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 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.
假定已经编写了上一节中的测试代码。
The test code at the bottom then sets the value and prints out the new value.
底部的测试代码设置值并打印出新值。
The test code at the bottom starts by deleting all the entries from the database.
底部的测试代码先删除数据库中的所有条目。
Refactoring is a more tedious procedure than generating new test code from scratch.
重构会是一个比从头生成新测试代码更乏味的过程。
Listing 6 shows the main parts of the test code I'll use to check out the performance.
清单6显示用于检查性能的测试代码的主要部分。
Look at all of the scaffolding that was necessary to support two actual lines of test code!
看到了吗?这么多代码只是为了支持两行测试代码!
In your test code, create a mock object implementing the same interface as the collaborator.
在测试代码中,创建模仿对象且实现与合作者相同的接口。
Our test code, specifically the mock objects, give us total control over the database results.
我们的测试代码,特别是模拟对象,使我们能完全控制数据库结果。
This is probably a bug, either with the build of Chrome used for this test or with the test code.
这可能是一个bug,问题或是出在用于此次测试的Chrome 的构建,或是出在检测代码。
The framework enforces the separation of UI modules from the test code, allowing easy refactoring.
框架实行UImodule和测试代码的分离,从而有利于重构。
Before looking at the test code, you need a better understanding of the Rails user interface layer.
在查看测试代码之前,需要对Rails的用户界面层有更好的理解。
The output of each section of match test code is sorted, then added to the overall suggestion link list.
首先,对匹配测试各部分的输出进行排序,然后将其添加到总建议链接列表。
The performance comparisons use the same test code as earlier articles, a seismic data retrieval service.
性能比较使用与之前文章相同的测试代码,即地震数据查询服务。
应用推荐