必须用模仿对象替换这个合作者。
设置模仿对象中的状态和期望值
模仿对象提供了解决这一困难的方法。
验证模仿对象中的一致性。
使用模仿对象进行测试的常用编码样式是。
The common coding style for testing with mock objects is to.
尤其是,我的设计利用了模仿对象来简化测试。
In particular, my design employed mock objects to make testing easier.
你自信模仿对象不一定是现实中的人。
我们还使用了实例变量来存储对模仿对象的引用。
We also used an instance variable to store a reference to the mock object.
在测试代码中,创建模仿对象且实现与合作者相同的接口。
In your test code, create a mock object implementing the same interface as the collaborator.
测试代码希望它产生另一种类型的对象(模仿对象)。
The test code would like it to produce a different type (a mock).
正如您在测试一节看到的,模仿对象方法完全满足该目标。
As you'll see in the Testing section, a mock-objects approach perfectly matches the goal.
对象模仿是一种非常流行和通用的单元测试方式。
Mock objects are very popular and common approach to a unit testing. According to Wikipedia
你是马修极力模仿的对象,他喜爱你远甚于我。
He wants to be just like you man, he likes you more than I do.
在交谈时,有些人会无意中模仿谈话对象。
In conversation, some people unconsciously imitate the people they are speaking with.
第一是选择模仿的对象。
诗乐艺术是模仿的产物,也是模仿的对象。
Art poetry is an imitated product also is the imitated target to people.
诗乐艺术是模仿的产物,也是模仿的对象。
Art poetry is an imitated product also is the imitated target to people.
应用推荐