CasterIO / Dagger2TestingWithMockito

12 stars 2 forks source link

Test a mocked Subcomponent #1

Open lawloretienne opened 6 years ago

lawloretienne commented 6 years ago

The example here shows how to test a mocked Component. How would you set this up to test a mocked Subcomponent? For some reason my TestComponent is not generating the Dagger class, I was also wondering how to resolve that.

https://github.com/lawloretienne/MovieHub/tree/develop

shalperin commented 6 years ago

I have the same problem, the Dagger class for TestComponent isn't being generated.

shalperin commented 6 years ago

Answer: run the tests... not exactly sure what gradle is running as a build step when you click run test, but to get dagger to build it's junk for the tests, run the tests.