@@ -85,7 +85,7 @@ class TopicViewModelTest {
85
85
86
86
@Test
87
87
fun uiStateTopic_whenSuccess_matchesTopicFromRepository () = runTest {
88
- backgroundScope.launch(UnconfinedTestDispatcher ()) { viewModel.topicUiState.collect() }
88
+ backgroundScope.launch(UnconfinedTestDispatcher ()) { viewModel.topicUiState.collect() }
89
89
90
90
topicsRepository.sendTopics(testInputTopics.map(FollowableTopic ::topic))
91
91
userDataRepository.setFollowedTopicIds(setOf (testInputTopics[1 ].topic.id))
@@ -111,7 +111,7 @@ class TopicViewModelTest {
111
111
112
112
@Test
113
113
fun uiStateTopic_whenFollowedIdsSuccessAndTopicLoading_thenShowLoading () = runTest {
114
- backgroundScope.launch(UnconfinedTestDispatcher ()) { viewModel.topicUiState.collect() }
114
+ backgroundScope.launch(UnconfinedTestDispatcher ()) { viewModel.topicUiState.collect() }
115
115
116
116
userDataRepository.setFollowedTopicIds(setOf (testInputTopics[1 ].topic.id))
117
117
assertEquals(TopicUiState .Loading , viewModel.topicUiState.value)
@@ -120,7 +120,7 @@ class TopicViewModelTest {
120
120
@Test
121
121
fun uiStateTopic_whenFollowedIdsSuccessAndTopicSuccess_thenTopicSuccessAndNewsLoading () =
122
122
runTest {
123
- backgroundScope.launch(UnconfinedTestDispatcher ()) { viewModel.topicUiState.collect() }
123
+ backgroundScope.launch(UnconfinedTestDispatcher ()) { viewModel.topicUiState.collect() }
124
124
125
125
topicsRepository.sendTopics(testInputTopics.map { it.topic })
126
126
userDataRepository.setFollowedTopicIds(setOf (testInputTopics[1 ].topic.id))
@@ -134,7 +134,7 @@ class TopicViewModelTest {
134
134
@Test
135
135
fun uiStateTopic_whenFollowedIdsSuccessAndTopicSuccessAndNewsIsSuccess_thenAllSuccess () =
136
136
runTest {
137
- backgroundScope.launch(UnconfinedTestDispatcher ()) {
137
+ backgroundScope.launch(UnconfinedTestDispatcher ()) {
138
138
combine(
139
139
viewModel.topicUiState,
140
140
viewModel.newsUiState,
@@ -153,7 +153,7 @@ class TopicViewModelTest {
153
153
154
154
@Test
155
155
fun uiStateTopic_whenFollowingTopic_thenShowUpdatedTopic () = runTest {
156
- backgroundScope.launch(UnconfinedTestDispatcher ()) { viewModel.topicUiState.collect() }
156
+ backgroundScope.launch(UnconfinedTestDispatcher ()) { viewModel.topicUiState.collect() }
157
157
158
158
topicsRepository.sendTopics(testInputTopics.map { it.topic })
159
159
// Set which topic IDs are followed, not including 0.
0 commit comments