Listing 6 shows the changes made to the Collaborator object.
清单6显示了对Collaborator对象所做的更改。
Identify all occurrences of code that create or obtain the collaborator.
标识创建或获取合作者的代码的所有出现。
Listing 13 shows the most important part of the test example: the Collaborator class.
清单13显示了测试示例的最重要部分:collaborator类。
For instance, you may change the method signature so that the collaborator object is passed in.
例如,可以更改方法签名,以便传入合作者对象。
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类中实现的方法。
The second thing to notice is that, conversely, you couldn't use the jMock framework to mock the Collaborator class.
反过来,需要注意的第二点是您不能使用jMock框架来模拟 Collaborator 类。
Also suppose that the Collaborator object requires a string and a primitive int as parameters passed to the constructor.
同时假定Collaborator对象要求使用字符串和原始的int作为传递给构造函数的参数。
Instead of accepting an ICollaborator interface, it now accepts a concrete class implementation (the Collaborator class).
它现在不接受ICollaborator接口,而接受具体类实现(collaborator类)。
Within the setUp method, you instantiate an object array with the actual values the Collaborator class 'constructor needs.
在setUp方法内,用collaborator类的构造方法所需的实际值实例化对象数组。
On the first photo evidently previous signboard and to (now Scott) the collaborator ATI (now AMD), with whom made the means RUBY.
就第一张照片,显然以前的招牌和(现在的斯科特)合作者的ATI (现在的AMD ) ,与谁作出的手段,红宝石。
The second change required is to construct (at the very least) an object array holding the actual values of parameters to be passed into the Collaborator class' constructor.
必需的第二项更改是(至少)构造一个保存传递给 Collaborator类的构造函数的参数实际值的对象数组。
In many cases, changing the method signature so the collaborator becomes a parameter will result in a confusing, untested snarl of code inside the method's original callers.
在许多情况下,更改方法签名以使合作者成为参数将会在方法的原始调用者内部产生混淆的、未经试验的代码混乱。
You certainly shouldn't ditch teamwork, but how can you avoid the hazards of being an over-collaborator?
你当然不应该放弃团队合作。但如何才能避免过度合作带来的风险呢?
Having moved to the University of Cambridge he needed a collaborator to help him apply these techniques in human patients.
在移居到英国剑桥大学后,他需要一个合作者来帮他把这些技术应用到人类患者身上。
But that's not the real reason, according to Dr. Ariely and his collaborator in the experiments, Jiwoong Shin, an economist who is now at Yale.
但是埃雷里博士和她本次实验的合作者,耶鲁大学的经济学家申纪武认为那并非真正的原因所在。
Crick writes to collaborator Dr. Maurice Wilkins and praises the exit of a female collaborator, Dr. Rosalind Franklin.
克里克写信给其合作者莫里斯·威尔金斯博士,庆幸一位女性合作者罗莎林德·富兰克林的退出。
Specialization object: a subclass of the target that overrides the creation method to return a mock instead of a collaborator.
特殊化对象:覆盖创建方法以返回模仿对象而不是合作者的目标的子类。
[font=Times New Roman][color=#000000]Once Davis's scientists had pronounced the general idea sound, they and Dr Matthews looked around for a commercial collaborator.
[color=#000000][font=宋体]戴维斯(注:即加利福尼亚大学癌症中心)的科学家们在认定这一总体构想具有可行性之后,即与马修斯一起开始寻找商业合作者。
If production code has no need to instantiate many types of this collaborator, then adding that ability will make the resulting design needlessly hard to understand.
如果产品代码无需实例化该合作者的多个类型,那么添加该功能将使最终的设计不必要地变得难于理解。
Lyricist Irving Caesar happened to hear him play the piano and thought he resembled his former collaborator George Gershwin.
抒情诗人欧文·凯撒偶然听到他弹奏钢琴并觉得他很像自己以前的合作者乔治·格什温。
In this case, the aspect determines when some behavior should be executed but delegates to a collaborator to perform the actual work.
在这种情况下,方面确定什么时候应当执行某些行为,但是会委托给协作器去执行实际的工作。
By using JNDI enc, the dependent object can explicitly request a reference to a certain collaborator.
通过使用JNDIENC,依赖对象可以显式地请求对某个协作者的引用。
Mr Prahalad invariably worked with a collaborator and never wrote more than two articles on the same subject.
普拉哈拉德始终与人合作,从不就一个问题写两篇以上的文章。
Mr. Rogen, who wrote the screenplay with Evan Goldberg, his collaborator on “Superbad,” is slimmer than he was in “Knocked Up” but, if anything, more manic in his goofiness.
剧本由罗根和埃文高伯共同撰写(他们是老搭档,曾在影片《男孩儿不坏》中有过合作)。 罗根比他出演《男孩儿不坏》时瘦了很多,不过表演上更疯癫了。
Mr. Rogen, who wrote the screenplay with Evan Goldberg, his collaborator on “Superbad,” is slimmer than he was in “Knocked Up” but, if anything, more manic in his goofiness.
剧本由罗根和埃文高伯共同撰写(他们是老搭档,曾在影片《男孩儿不坏》中有过合作)。 罗根比他出演《男孩儿不坏》时瘦了很多,不过表演上更疯癫了。
应用推荐