Mockito不能用注释模拟蜂巢盒
我尝试使用逻辑进行 单位测试 ,它在 hive box /strong>
我遵循UT测试的指南和摩擦图
https://docs.flutter.dev/cookbook/testing/testing/testing/unit/unit/mocking/unit/mocking
https://pub.dev/packages/mockito
run /代码> 模拟类是生成
I try to do a unit test with logic which use Hive box in Flutter
I follow guide of UT test flutter and mockito
https://docs.flutter.dev/cookbook/testing/unit/mocking
https://pub.dev/packages/mockito
After run: flutter run build_runner build
The mock class is generated
But the code doesnot run well.
The box is not oppened error still appear.
How can I mock Hive box correctly?
Thank you in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论