You certainly shouldn't ditch teamwork, but how can you avoid the hazards of being an over-collaborator?
你当然不应该放弃团队合作。但如何才能避免过度合作带来的风险呢?
Have a collaborator stand at the exit.
让一位合作者站在出口处。
This collaborator must be replaced with a mock object.
必须用模仿对象替换这个合作者。
Collaborator is the class you must mock appropriately.
Collaborator是必须正确模拟的类。
The Collaborator class constructor is still quite simple.
Collaborator类构造函数仍然十分简单。
Problem: The object being tested creates a collaborator object.
问题:正在测试的对象创建了合作者对象。
Listing 6 shows the changes made to the Collaborator object.
清单6显示了对Collaborator对象所做的更改。
Second, the manner of mocking the Collaborator class has changed.
第二,模拟collaborator类的方式已经更改。
Collaborator object: the object created or obtained by the target.
合作者对象:由目标对象创建或获取的对象。
Identify all occurrences of code that create or obtain the collaborator.
标识创建或获取合作者的代码的所有出现。
A typewriter was a friend and collaborator whose sickness was catastrophe.
打字机是朋友,又是伙伴,他要是生病了将是一场巨大的灾难。
Copperfield: I did a Broadway show and Francis Ford Coppola was my collaborator.
科波菲尔:我跟法兰西斯·福特·科波拉一起合作过百老汇表演。
Listing 13 shows the most important part of the test example: the Collaborator class.
清单13显示了测试示例的最重要部分:collaborator类。
In your test code, create a mock object implementing the same interface as the collaborator.
在测试代码中,创建模仿对象且实现与合作者相同的接口。
If you learn what it takes to be a good collaborator, you'll also be a good conversationalist.
如果你了解如何才能成为一个好的合作者,你将是一个好的沟通者。
The only way of instantiating the Collaborator object is to provide two simple arguments.
实例化Collaborator对象的惟一方法是提供两个简单参数。
For instance, you may change the method signature so that the collaborator object is passed in.
例如,可以更改方法签名,以便传入合作者对象。
Instead, that object is designed to either create, look up, or otherwise obtain its collaborator.
而设计该对象是为了创建、查找或获得其合作者。
Mock object: a subclass (or implementation) of the collaborator that follows the mock object pattern.
模仿对象:遵循模仿对象模式的合作者的子类(或实现)。
The interface ICollaborator has a single method that must be implemented in the Collaborator class.
接口icollaborator有一个必须在collaborator类中实现的方法。
By using JNDI enc, the dependent object can explicitly request a reference to a certain collaborator.
通过使用JNDIENC,依赖对象可以显式地请求对某个协作者的引用。
A GDS could consider Vayant competition or collaborator, and we've seen both reactions in the market.
GDS可以将Vayant看作是竞争对手,也可以看作是合作伙伴,这两种反应我们在市场上都看到过。
The service method takes an object named a Collaborator, which implements a simple interface, ICollaborator.
服务方法将获取实现简单接口icollaborator的Collaborator对象。
Mr Prahalad invariably worked with a collaborator and never wrote more than two articles on the same subject.
普拉哈拉德始终与人合作,从不就一个问题写两篇以上的文章。
Crick writes to collaborator Dr. Maurice Wilkins and praises the exit of a female collaborator, Dr. Rosalind Franklin.
克里克写信给其合作者莫里斯·威尔金斯博士,庆幸一位女性合作者罗莎林德·富兰克林的退出。
The class cast of the mock object into type Collaborator is necessary because the intercept method returns type object.
模拟对象到Collaborator类型的类强制转换十分有必要,因为intercept方法将返回类型Object。
The second thing to notice is that, conversely, you couldn't use the jMock framework to mock the Collaborator class.
反过来,需要注意的第二点是您不能使用jMock框架来模拟 Collaborator 类。
Having moved to the University of Cambridge he needed a collaborator to help him apply these techniques in human patients.
在移居到英国剑桥大学后,他需要一个合作者来帮他把这些技术应用到人类患者身上。
Having moved to the University of Cambridge he needed a collaborator to help him apply these techniques in human patients.
在移居到英国剑桥大学后,他需要一个合作者来帮他把这些技术应用到人类患者身上。
应用推荐