I'm trying to fix a test since I have implemented ScopedModelDescendant to get data to fill up my page with information for the user.
The issue I'm facing is that it seems I can not mock ScopedModel with mockito. Somehow is asking me to specify some properties which does not occur with other classes I have been mocking so far.
This is how my app is being configured
So far so good, my app is working properly and I can invoke ScopedModelDescendant anywhere without injecting anything in my widgets. But when running my test I'm getting this error
And this is how I'm configuring my test
I know I should be doinng something like this
class MockScopedModel extends Mock implements ScopedModel<MockMainModel>{}
But if I do that in order to mock sopedModel I get this error/warning
Does anyone know how to mock the scopedModel properly? Am I missing something here?
question from:
https://stackoverflow.com/questions/66051716/mockito-and-scopedmodel 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…