Open ohadnav opened 7 years ago
Could you please provide an example of a test that fails without this modification? Thanks for your suggestion, I'll try to integrate it soon!
Whenever a module is dependent on a non-mockable class (i.e. another component).
On Thu, Jul 20, 2017 at 11:46 PM Fabio Collini notifications@github.com wrote:
Could you please provide an example of a test that fails without this modification? Thanks for your suggestion, I'll try to integrate it soon!
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/fabioCollini/DaggerMock/issues/48#issuecomment-316824846, or mute the thread https://github.com/notifications/unsubscribe-auth/AK-E01j3Y-9FZ9a35jKgLOd8G2JiHS-rks5sP7ydgaJpZM4OZZ_k .
Since you can't mock dagger components (they are final), here is a little hack:
Within
getSetterMethod
underObjectWrapper
And final tweak to
DaggerMockRule
ininitComponent
Happy testing :-)