I currently have a project set up in pretty standard MVP fashion. An activity contains several fragments, each of which has their own MVP setup. The Activity has its own Subcomponent whose parent is the application component, and the Fragments are a Subcomponent of the Activity component. Each has their own scope and is able to inject their presenters into themselves beautifully. The problem is testing... I'm struggling to figure out how to get Dagger to return mocked versions of my presenters for UI testing purposes. I currently have a "MockAppComponent" that I replace in my test suite to return mocks / fakes of Application level injections. However, it doesn't appear to be simple to replace subcomponents with mocked versions. Hopefully this scenario makes sense, and I'm hoping someone has come across this at some point in their dev process. Any insight would be awesome! Thanks! via /r/androiddev http://ift.tt/2t3nbwf
Friday, June 9, 2017
Subscribe to:
Post Comments (Atom)
Popular Posts
-
Ariat Brown Ankle Boots Women's 10005947 Macey General Work Lace Cushioned 8.5 $37.99 via eBay http://ift.tt/2ysNIZq
-
24" Mongoose Excursion Teens Girls' Mountain Bike Steel Suspension Frame Bicycle via eBay http://ift.tt/2p1k2ge
-
http://ift.tt/2rdHcz0 via /r/feet http://ift.tt/2rJe5a1
-
HAVEB/O:21 keysGut Vanilla, Gut Crimson Web FT (<0.20fv), Gut Damascus Steel FT or good offersMy Steam profile: LINKMy Trade URL: LINK v...
-
http://ift.tt/2s3zcoV via /r/gentlemanboners http://ift.tt/2sRUzWH
No comments:
Post a Comment