Skip to content

Commit

Permalink
Fix InterestsViewModelTest
Browse files Browse the repository at this point in the history
Change-Id: I9789ed1c61c4fe0f4b40023ee483fc182700ce70
  • Loading branch information
mmoczkowski committed Oct 4, 2023
1 parent 2f112eb commit 5367393
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

package com.google.samples.apps.nowinandroid.interests

import androidx.lifecycle.SavedStateHandle
import com.google.samples.apps.nowinandroid.core.domain.GetFollowableTopicsUseCase
import com.google.samples.apps.nowinandroid.core.model.data.FollowableTopic
import com.google.samples.apps.nowinandroid.core.model.data.Topic
Expand Down Expand Up @@ -53,6 +54,7 @@ class InterestsViewModelTest {
@Before
fun setup() {
viewModel = InterestsViewModel(
savedStateHandle = SavedStateHandle(),
userDataRepository = userDataRepository,
getFollowableTopics = getFollowableTopicsUseCase,
)
Expand Down Expand Up @@ -93,7 +95,7 @@ class InterestsViewModelTest {
)

assertEquals(
InterestsUiState.Interests(topics = testOutputTopics),
InterestsUiState.Interests(selectedTopicId = null, topics = testOutputTopics),
viewModel.uiState.value,
)

Expand Down Expand Up @@ -123,7 +125,7 @@ class InterestsViewModelTest {
)

assertEquals(
InterestsUiState.Interests(topics = testInputTopics),
InterestsUiState.Interests(selectedTopicId = null, topics = testInputTopics),
viewModel.uiState.value,
)

Expand Down

0 comments on commit 5367393

Please sign in to comment.