Skip to content

Commit 987e87f

Browse files
Check topicViewModelTest for spotless
1 parent 6f40606 commit 987e87f

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

feature/topic/src/test/kotlin/com/google/samples/apps/nowinandroid/feature/topic/TopicViewModelTest.kt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ class TopicViewModelTest {
8585

8686
@Test
8787
fun uiStateTopic_whenSuccess_matchesTopicFromRepository() = runTest {
88-
backgroundScope.launch(UnconfinedTestDispatcher()) { viewModel.topicUiState.collect() }
88+
backgroundScope.launch(UnconfinedTestDispatcher()) { viewModel.topicUiState.collect() }
8989

9090
topicsRepository.sendTopics(testInputTopics.map(FollowableTopic::topic))
9191
userDataRepository.setFollowedTopicIds(setOf(testInputTopics[1].topic.id))
@@ -111,7 +111,7 @@ class TopicViewModelTest {
111111

112112
@Test
113113
fun uiStateTopic_whenFollowedIdsSuccessAndTopicLoading_thenShowLoading() = runTest {
114-
backgroundScope.launch(UnconfinedTestDispatcher()) { viewModel.topicUiState.collect() }
114+
backgroundScope.launch(UnconfinedTestDispatcher()) { viewModel.topicUiState.collect() }
115115

116116
userDataRepository.setFollowedTopicIds(setOf(testInputTopics[1].topic.id))
117117
assertEquals(TopicUiState.Loading, viewModel.topicUiState.value)
@@ -120,7 +120,7 @@ class TopicViewModelTest {
120120
@Test
121121
fun uiStateTopic_whenFollowedIdsSuccessAndTopicSuccess_thenTopicSuccessAndNewsLoading() =
122122
runTest {
123-
backgroundScope.launch(UnconfinedTestDispatcher()) { viewModel.topicUiState.collect() }
123+
backgroundScope.launch(UnconfinedTestDispatcher()) { viewModel.topicUiState.collect() }
124124

125125
topicsRepository.sendTopics(testInputTopics.map { it.topic })
126126
userDataRepository.setFollowedTopicIds(setOf(testInputTopics[1].topic.id))
@@ -134,7 +134,7 @@ class TopicViewModelTest {
134134
@Test
135135
fun uiStateTopic_whenFollowedIdsSuccessAndTopicSuccessAndNewsIsSuccess_thenAllSuccess() =
136136
runTest {
137-
backgroundScope.launch(UnconfinedTestDispatcher()) {
137+
backgroundScope.launch(UnconfinedTestDispatcher()) {
138138
combine(
139139
viewModel.topicUiState,
140140
viewModel.newsUiState,
@@ -153,7 +153,7 @@ class TopicViewModelTest {
153153

154154
@Test
155155
fun uiStateTopic_whenFollowingTopic_thenShowUpdatedTopic() = runTest {
156-
backgroundScope.launch(UnconfinedTestDispatcher()) { viewModel.topicUiState.collect() }
156+
backgroundScope.launch(UnconfinedTestDispatcher()) { viewModel.topicUiState.collect() }
157157

158158
topicsRepository.sendTopics(testInputTopics.map { it.topic })
159159
// Set which topic IDs are followed, not including 0.

0 commit comments

Comments
 (0)