答案是mock对象。
Verify consistency in the mock objects.
验证模仿对象中的一致性。
Set state and expectations in the mock objects
设置模仿对象中的状态和期望值
Two gotchas on mock objects before we proceed.
在我们继续之前,关于mock对象有两点需要知道。
At first, mock objects can seem quite daunting.
一开始,模拟对象看上去令人生畏。
Use other tools, or use pre-packaged mock objects.
使用其他工具或者那些预先打包好的模拟对象。
Invoke domain code with mock objects as parameters.
将模仿对象作为参数来调用域代码。
Note: If you need an introduction to mock objects, see Resources.
注:如果需要对mock对象的介绍,请参阅参考资料。
Finally, mock objects help remove large dependencies from a test.
最后,mock对象有助于从测试中消除依赖项。
In particular, my design employed mock objects to make testing easier.
尤其是,我的设计利用了模仿对象来简化测试。
We will also present some techniques for creating mock objects quickly.
我们还提供了一些快速创建模拟对象的技术。
We will create mock objects for these two services later in this article.
在本文稍后的部分中我们将创建这两个服务的模拟对象。
Let's look at the first two objections before we delve into mock objects.
在深入探讨模拟对象之前,让我们先来看一下以下两点异议。
This is accomplished with the common testing pattern known as mock objects.
这通过名为模拟对象的常见测试模式实现。
Test-Time module of the framework provides mock objects for JSF 1.2 components.
框架的Test - Time模块为JSF 1.2提供mock对象。
We can now wire the BPEL process to the two mock objects we created and run the tests.
现在我们可以将BPEL流程连接到我们创建的两个模拟对象,然后运行测试。
This is a classic example of the limitations of stubs and why mock objects serve a purpose.
这是一个经典例子,说明了stub的局限性,以及为什么使用mock对象。
Our test code, specifically the mock objects, give us total control over the database results.
我们的测试代码,特别是模拟对象,使我们能完全控制数据库结果。
I create two mock objects for this project to simulate the GPS device and the UI, respectively.
我为此项目创建了两个模拟对象,分别模拟GPS设备和UI。
This is true for mock objects defined in a common setUp() method or within the actual test method.
这对于在公共的setUp()方法中或在实际测试方法内定义的模拟对象来说是正确的。
Specifically, I want to offer some tips on how easy it can be to write unit tests with mock objects.
特别地,我想提供一些技巧来说明编写带有模拟对象的单元测试是多么容易。
But there are some easy ways to create mock objects, or equivalent capabilities, with existing tools.
但是利用现有的工具可以有一些创建模拟对象或是相当能力的简单方法。
At this point, it's worth asking what benefits we achieved with the mock objects and what did they cost.
在这一环节,值得探讨我们使用模拟对象得到的收益是什么以及花费的代价是什么。
We will illustrate the second aspect of mock objects by constructing a MockCustomerCommunication object.
我们将通过构造MockCustomerCommunication对象来阐述模拟对象的第二个方面。
A popular technique for simplifying unit tests is to create mock objects that are used just in the tests.
简化单元测试的一个流行技巧就是创建仅用于测试中的模拟对象。
Figure 5 shows the relationship between the test specifications, the process, and the mock objects we have described.
图5显示了我们介绍的测试规范、流程和模拟对象之间的关系。
The third step in this SOA development process is to develop service mocks -- mock objects that pass the service tests.
此SOA开发流程的第三步是开发服务模拟——通过服务测试的模拟对象。
Before we start work on the mock objects, you might like to examine the business process as it is currently implemented.
在开始使用模拟对象之前,您可能希望检查当前实现的业务流程。
Examine the test specifications to remind yourself of how the tests and mock objects cooperate to verify the process behaviour.
检查测试规范,提醒自己如何结合使用测试和模拟对象来验证流程行为。
Examine the test specifications to remind yourself of how the tests and mock objects cooperate to verify the process behaviour.
检查测试规范,提醒自己如何结合使用测试和模拟对象来验证流程行为。
应用推荐