I'm trying to write some tests with Dagger 2, I'm trying to follow this approach: https://github.com/ecgreb/dagger-2-testing-demo, but Dagger does not generate the TestingModuleComponent. What should i do to trigger this ?
Asked
Active
Viewed 153 times
1
-
Possible duplicate of [Android Unit Tests with Dagger 2](http://stackoverflow.com/questions/29989245/android-unit-tests-with-dagger-2) – David Medenjak Mar 08 '16 at 08:38
-
If the github repository does not compile after cloning and there are no instructions provided you should also think about creating an issue at github – David Medenjak Mar 08 '16 at 08:40
-
1I was unable to get Modules and Components to compile in *androidTest* using Gradle - it just proved to be too complicated. So I'm housing the top-level Components I use to obtain objects for my tests in my main package and simply import the corresponding Dagger* classes in my test. Hope this helps you – Angad Mar 08 '16 at 18:48
-
@Angad1 that's what i'm doing also right now, thx – AdrianoCelentano Mar 08 '16 at 20:09