我有一个我想模拟的方法,但是当我试图验证这个方法的调用时。我收到一条错误消息:
Used on a non-mockito object
这是简化的代码:
test('test',() {
MockReducer reducer = new MockReducer();
verify(reducer).called(0);
});
class MockReducer extends Mock {
call(state, action) => state;
}
为什么我不能做这样的事情?