Madalin Valceleanu
12/04/2019, 8:13 AMwasyl
12/04/2019, 10:11 AM@VisibleForTesting
for injected parameters?Madalin Valceleanu
12/04/2019, 10:25 AM@VisibleForTesting
for mocking it.
3. Inject dagger graph but override some modules providers with mocks. Similar to this:
class TestModuleA : ModuleA() {
@Provides
override fun provideObject() = mock()
Personally I chose the second one, but the both are correct.wasyl
12/04/2019, 10:35 AMMadalin Valceleanu
12/04/2019, 11:06 AM@VisibleForTesting
on constructor params exactly for reason what you said. But in my case I also have unit tests the provider dagger modules and I need to have access to the variable to compare if the same instance what I provided when Inject the class.wasyl
12/04/2019, 11:35 AM@Inject
annotations on classes themselves, and axehit
12/04/2019, 1:24 PMMadalin Valceleanu
12/04/2019, 6:21 PM:app
or in this case :home
. Because is the only thing what you need for open the detail screen in this :
You need to add the following action on `navigation_characters_favorites_graph.xml`and after that declare the fragment:
<fragment
android:id="@+id/characters_favorites_fragment"
android:name="com.vmadalin.dynamicfeatures.charactersfavorites.ui.favorite.CharactersFavoriteFragment"
android:label="Favorites">
<action
android:id="@+id/action_characterFavoriteFragment_to_character_detail_fragment"
app:destination="@+id/character_detail_fragment"
/>
</fragment>
<fragment
android:id="@+id/character_detail_fragment"
android:name="com.vmadalin.dynamicfeatures.characterslist.ui.detail.CharacterDetailFragment">
<argument
android:name="character_id"
app:argType="long" />
</fragment>
And also add the property event click on favorite character list.