codelab-android-dagger
codelab-android-dagger copied to clipboard
Fix FakeStorage reference error on TestStorageModule (issue #78)
This PR fixes the issue #78.
TestStorageModule
from androidTest
shows an unresolved reference error for FakeStorage
on the TestStorageModule
class, even though the instrumented tests run successfully.
FakeStorage
is located at the sharedTest
package, and this package is shared with tests through sourceSets
, but it looks like sharing code this way is not supported anymore, according to this comment on Google Issue Tracker..
This PR creates a new module called shared-test
with the FakeStorage
class and adds it as a dependency for unit and instrumented tests on the app
module. With this change, the Fake Storage
on the TestStorageModule
class is referenced correctly.