A fully functional Android app built entirely with Kotlin and Jetpack Compose
Fix test
Carencf9cf1d78198
diff --git a/feature/topic/src/test/java/com/google/samples/apps/nowinandroid/feature/topic/TopicViewModelTest.kt b/feature/topic/src/test/java/com/google/samples/apps/nowinandroid/feature/topic/TopicViewModelTest.ktindex 9f24ae188..0300f2470 100644--- a/feature/topic/src/test/java/com/google/samples/apps/nowinandroid/feature/topic/TopicViewModelTest.kt+++ b/feature/topic/src/test/java/com/google/samples/apps/nowinandroid/feature/topic/TopicViewModelTest.kt@@ -27,6 +27,7 @@ import com.google.samples.apps.nowinandroid.core.testing.repository.TestUserDataimport com.google.samples.apps.nowinandroid.core.testing.util.MainDispatcherRuleimport com.google.samples.apps.nowinandroid.feature.topic.navigation.TopicDestinationimport kotlinx.coroutines.flow.collect+import kotlinx.coroutines.flow.combineimport kotlinx.coroutines.flow.firstimport kotlinx.coroutines.launchimport kotlinx.coroutines.test.UnconfinedTestDispatcher@@ -121,8 +122,13 @@ class TopicViewModelTest {@Testfun uiStateTopic_whenFollowedIdsSuccessAndTopicSuccessAndNewsIsSuccess_thenAllSuccess() =runTest {- val collectJob = launch(UnconfinedTestDispatcher()) { viewModel.topicUiState.collect() }-+ val collectJob = launch(UnconfinedTestDispatcher()) {+ combine(+ viewModel.topicUiState,+ viewModel.newUiState,+ ::Pair+ ).collect()+ }topicsRepository.sendTopics(testInputTopics.map { it.topic })userDataRepository.setFollowedTopicIds(setOf(testInputTopics[1].topic.id))newsRepository.sendNewsResources(sampleNewsResources)