The Collaborator class constructor is still quite simple.
Collaborator类构造函数仍然十分简单。
Second, the manner of mocking the Collaborator class has changed.
第二,模拟collaborator类的方式已经更改。
In your test code, create a mock object implementing the same interface as the collaborator.
在测试代码中,创建模仿对象且实现与合作者相同的接口。
The only way of instantiating the Collaborator object is to provide two simple arguments.
实例化Collaborator对象的惟一方法是提供两个简单参数。
Problem: The object being tested creates a collaborator object.
问题:正在测试的对象创建了合作者对象。
Collaborator is the class you must mock appropriately.
Collaborator是必须正确模拟的类。
Have a collaborator stand at the exit.
让一位合作者站在出口处。
We are the best collaborator forever.
我们永远是最好的合作伙伴。
We are the best collaborator forever.
我们永远是最好的合作伙伴。
应用推荐