In the specialization object, override the creation method to return a mock object that accommodates your test.
在特殊化对象中,覆盖创建方法以返回为测试提供的模仿对象。
Do you recall that the purpose of a setup method is to initialize the object under test.
您是否还记得一个set方法的主要目的是对测试下的目标进行初始化。
We also can use the find() method to find the test object with some given attribute/value pairs.
我们还可以使用 find() 方法来找到匹配属性/值的测试对象。
应用推荐