I'm using Dagger in an android app to provide application and activity scope graphs. And I'm using Robolectric for unit-testing. I know that I can provide Robolectric with a substitute Application class that is configured with an application object graph that overrides the real one with mocks. But I'm stumped as to how to do the same with the activity object graphs since the standard pattern for activity object graphs is for the activities themselves to instantiate the activity-specific Dagger module they need. Any suggestions would be greatly appreciated.
相关问题
- How can I create this custom Bottom Navigation on
- Bottom Navigation View gets Shrink Down
- How to make that the snackbar action button be sho
- Listening to outgoing sms not working android
- How to create Circular view on android wear?
相关文章
- android开发 怎么把图片放入drawable的文件夹下
- android上如何获取/storage/emulated/下的文件列表
- androidStudio有个箭头不认识
- SQLite不能创建表
- Windows - Android SDK manager not listing any plat
- How to replace file-access references for a module
- Animate Recycler View grid when number of columns
- Why is the app closing suddenly without showing an
Please take a look to my project - https://github.com/emartynov/UrlSetter
You will find how I managed to use mocks with
Dagger
inRobolectric
tests