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.
通过使用JNDI ENC,依赖对象可以显式地请求对某个协作者的引用。
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.
在移居到英国剑桥大学后,他需要一个合作者来帮他把这些技术应用到人类患者身上。
共同, 一起
同前缀词
- collatev. 对照;比较研究;对比分析;核对;校对;校勘;检验;检查;排序;整理
- collusionn. 合谋;勾结;串通;共谋;秘密协定;暗中勾结;不正当勾结
- colloquialadj. 口语的;会话的;非正式的;通俗的;口头的;白话的;口语体的
- collidev. 相撞;冲突;抵触;不协调;严重不一致
- collateraln. 担保品;抵押物;抵押品;旁系亲属
- collaboratev. 合作;协作;勾结敌人;通敌(与敌对国家或敌对势力);串通;共谋
- collectv. 收集;采集;聚集;集合;汇集;收藏;搜集;(重新)集中(思想等);使(自己)镇定下来;收(欠款);收到;领取;积聚(光、能或热);募捐;聚积;赢得;获得;(把东西)收拾好;收起来;收走;接走;打起(精神);鼓起(勇气);(平面上)积满
- collapsev. (突然)倒塌;崩溃;失败;瓦解;倒闭;突然失败;折叠;(肺或血管)萎陷;使萎陷;(尤指因病重而)晕倒;垮掉;衰竭;(尤指工作劳累后)躺下放松
做事的人/物
- senatorn. 参议员;议员;院士;庭长;评议员
- administratorn. 管理者;行政官员;(公司、机构的)管理人员;执行者;经营者;监管人
- curatorn. (博物馆或美术馆等的)馆长;负责人;策展人;文物管理员;艺术品保管人
- spectatorn. (尤指体育比赛的)观看者;观众;旁观者;目击者;旁听者