|
|
|
@ -20,12 +20,12 @@ import androidx.lifecycle.SavedStateHandle
|
|
|
|
|
import com.google.samples.apps.nowinandroid.core.analytics.AnalyticsEvent
|
|
|
|
|
import com.google.samples.apps.nowinandroid.core.analytics.AnalyticsEvent.Param
|
|
|
|
|
import com.google.samples.apps.nowinandroid.core.data.repository.CompositeUserNewsResourceRepository
|
|
|
|
|
import com.google.samples.apps.nowinandroid.core.domain.usecase.GetFollowableTopicsUseCase
|
|
|
|
|
import com.google.samples.apps.nowinandroid.core.model.data.FollowableTopic
|
|
|
|
|
import com.google.samples.apps.nowinandroid.core.model.data.NewsResource
|
|
|
|
|
import com.google.samples.apps.nowinandroid.core.model.data.Topic
|
|
|
|
|
import com.google.samples.apps.nowinandroid.core.model.data.UserNewsResource
|
|
|
|
|
import com.google.samples.apps.nowinandroid.core.model.data.mapToUserNewsResources
|
|
|
|
|
import com.google.samples.apps.nowinandroid.core.domain.usecase.GetFollowableTopicsUseCase
|
|
|
|
|
import com.google.samples.apps.nowinandroid.core.testing.repository.TestNewsRepository
|
|
|
|
|
import com.google.samples.apps.nowinandroid.core.testing.repository.TestTopicsRepository
|
|
|
|
|
import com.google.samples.apps.nowinandroid.core.testing.repository.TestUserDataRepository
|
|
|
|
@ -335,7 +335,7 @@ class ForYouViewModelTest {
|
|
|
|
|
topics = sampleTopics.map {
|
|
|
|
|
FollowableTopic(
|
|
|
|
|
it,
|
|
|
|
|
it.id == followedTopicId
|
|
|
|
|
it.id == followedTopicId,
|
|
|
|
|
)
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
@ -349,11 +349,11 @@ class ForYouViewModelTest {
|
|
|
|
|
feed = listOf(
|
|
|
|
|
UserNewsResource(
|
|
|
|
|
sampleNewsResources[1],
|
|
|
|
|
userData
|
|
|
|
|
userData,
|
|
|
|
|
),
|
|
|
|
|
UserNewsResource(
|
|
|
|
|
sampleNewsResources[2],
|
|
|
|
|
userData
|
|
|
|
|
userData,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
@ -463,11 +463,11 @@ class ForYouViewModelTest {
|
|
|
|
|
feed = listOf(
|
|
|
|
|
UserNewsResource(
|
|
|
|
|
newsResource = sampleNewsResources[1],
|
|
|
|
|
userDataExpected
|
|
|
|
|
userDataExpected,
|
|
|
|
|
),
|
|
|
|
|
UserNewsResource(
|
|
|
|
|
newsResource = sampleNewsResources[2],
|
|
|
|
|
userDataExpected
|
|
|
|
|
userDataExpected,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|