From 987e87f4edf76045ad9036dd7eb0fb3f15e8310e Mon Sep 17 00:00:00 2001 From: saeedishayan76 Date: Sat, 7 Sep 2024 15:18:23 +0330 Subject: [PATCH] Check topicViewModelTest for spotless --- .../nowinandroid/feature/topic/TopicViewModelTest.kt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/feature/topic/src/test/kotlin/com/google/samples/apps/nowinandroid/feature/topic/TopicViewModelTest.kt b/feature/topic/src/test/kotlin/com/google/samples/apps/nowinandroid/feature/topic/TopicViewModelTest.kt index 9d0b8eb71..34f21a59a 100644 --- a/feature/topic/src/test/kotlin/com/google/samples/apps/nowinandroid/feature/topic/TopicViewModelTest.kt +++ b/feature/topic/src/test/kotlin/com/google/samples/apps/nowinandroid/feature/topic/TopicViewModelTest.kt @@ -85,7 +85,7 @@ class TopicViewModelTest { @Test fun uiStateTopic_whenSuccess_matchesTopicFromRepository() = runTest { - backgroundScope.launch(UnconfinedTestDispatcher()) { viewModel.topicUiState.collect() } + backgroundScope.launch(UnconfinedTestDispatcher()) { viewModel.topicUiState.collect() } topicsRepository.sendTopics(testInputTopics.map(FollowableTopic::topic)) userDataRepository.setFollowedTopicIds(setOf(testInputTopics[1].topic.id)) @@ -111,7 +111,7 @@ class TopicViewModelTest { @Test fun uiStateTopic_whenFollowedIdsSuccessAndTopicLoading_thenShowLoading() = runTest { - backgroundScope.launch(UnconfinedTestDispatcher()) { viewModel.topicUiState.collect() } + backgroundScope.launch(UnconfinedTestDispatcher()) { viewModel.topicUiState.collect() } userDataRepository.setFollowedTopicIds(setOf(testInputTopics[1].topic.id)) assertEquals(TopicUiState.Loading, viewModel.topicUiState.value) @@ -120,7 +120,7 @@ class TopicViewModelTest { @Test fun uiStateTopic_whenFollowedIdsSuccessAndTopicSuccess_thenTopicSuccessAndNewsLoading() = runTest { - backgroundScope.launch(UnconfinedTestDispatcher()) { viewModel.topicUiState.collect() } + backgroundScope.launch(UnconfinedTestDispatcher()) { viewModel.topicUiState.collect() } topicsRepository.sendTopics(testInputTopics.map { it.topic }) userDataRepository.setFollowedTopicIds(setOf(testInputTopics[1].topic.id)) @@ -134,7 +134,7 @@ class TopicViewModelTest { @Test fun uiStateTopic_whenFollowedIdsSuccessAndTopicSuccessAndNewsIsSuccess_thenAllSuccess() = runTest { - backgroundScope.launch(UnconfinedTestDispatcher()) { + backgroundScope.launch(UnconfinedTestDispatcher()) { combine( viewModel.topicUiState, viewModel.newsUiState, @@ -153,7 +153,7 @@ class TopicViewModelTest { @Test fun uiStateTopic_whenFollowingTopic_thenShowUpdatedTopic() = runTest { - backgroundScope.launch(UnconfinedTestDispatcher()) { viewModel.topicUiState.collect() } + backgroundScope.launch(UnconfinedTestDispatcher()) { viewModel.topicUiState.collect() } topicsRepository.sendTopics(testInputTopics.map { it.topic }) // Set which topic IDs are followed, not including 0.