a collaborator with the enemy 和敌人勾结的人
Identify all occurrences of code that create or obtain the collaborator.
标识创建或获取合作者的代码的所有出现。
In your test code, create a mock object implementing the same interface as the collaborator.
在测试代码中,创建模仿对象且实现与合作者相同的接口。
For instance, you may change the method signature so that the collaborator object is passed in.
例如,可以更改方法签名,以便传入合作者对象。
应用推荐