Skip to content

Commit b687328

Browse files
committed
Replace comments with proper @TestOnly annotations
1 parent a83f669 commit b687328

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

core/testing/src/main/kotlin/com/google/samples/apps/nowinandroid/core/testing/repository/TestSearchContentsRepository.kt

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ import kotlinx.coroutines.flow.Flow
2424
import kotlinx.coroutines.flow.MutableStateFlow
2525
import kotlinx.coroutines.flow.combine
2626
import kotlinx.coroutines.flow.update
27+
import org.jetbrains.annotations.TestOnly
2728

2829
class TestSearchContentsRepository : SearchContentsRepository {
2930

@@ -46,14 +47,10 @@ class TestSearchContentsRepository : SearchContentsRepository {
4647

4748
override fun getSearchContentsCount(): Flow<Int> = combine(cachedTopics, cachedNewsResources) { topics, news -> topics.size + news.size }
4849

49-
/**
50-
* Test only method to add the topics to the stored list in memory
51-
*/
50+
@TestOnly
5251
fun addTopics(topics: List<Topic>) = cachedTopics.update { it + topics }
5352

54-
/**
55-
* Test only method to add the news resources to the stored list in memory
56-
*/
53+
@TestOnly
5754
fun addNewsResources(newsResources: List<NewsResource>) =
5855
cachedNewsResources.update { it + newsResources }
5956
}

0 commit comments

Comments
 (0)