You're now forced to find a way of providing arguments to the mock object instantiation process to achieve the same effect, which is precisely why you use RMock.
您现在必须找到一种方法把参数提供给模拟对象实例化过程以达到同样的效果,这就是使用 RMock 的原因。
The signature of the method is similar to that of the jMock CGLIB mock() method because both methods take on unique mock object identifiers as arguments.
方法的签名类似于 jMock CGLIB mock() 方法的签名,因为这两种方法将接纳惟一模拟对象标识符作为参数。
By placing assertions inside the mock code, you can verify that the code under test is passing the correct arguments to its collaborators at the right time.
通过把断言放在mock代码中,可以检查要测试的代码是否在适当的时候把适当的参数传递给它的协作者。
应用推荐