A fully functional Android app built entirely with Kotlin and Jetpack Compose
Replace comments with proper `@TestOnly` annotations
Simon Marquisb68732856768
diff --git a/core/testing/src/main/kotlin/com/google/samples/apps/nowinandroid/core/testing/repository/TestSearchContentsRepository.kt b/core/testing/src/main/kotlin/com/google/samples/apps/nowinandroid/core/testing/repository/TestSearchContentsRepository.ktindex 4a3baba44..5436cd10f 100644--- a/core/testing/src/main/kotlin/com/google/samples/apps/nowinandroid/core/testing/repository/TestSearchContentsRepository.kt+++ b/core/testing/src/main/kotlin/com/google/samples/apps/nowinandroid/core/testing/repository/TestSearchContentsRepository.kt@@ -24,6 +24,7 @@ import kotlinx.coroutines.flow.Flowimport kotlinx.coroutines.flow.MutableStateFlowimport kotlinx.coroutines.flow.combineimport kotlinx.coroutines.flow.update+import org.jetbrains.annotations.TestOnlyclass TestSearchContentsRepository : SearchContentsRepository {@@ -46,14 +47,10 @@ class TestSearchContentsRepository : SearchContentsRepository {override fun getSearchContentsCount(): Flow<Int> = combine(cachedTopics, cachedNewsResources) { topics, news -> topics.size + news.size }- /**- * Test only method to add the topics to the stored list in memory- */+ @TestOnlyfun addTopics(topics: List<Topic>) = cachedTopics.update { it + topics }- /**- * Test only method to add the news resources to the stored list in memory- */+ @TestOnlyfun addNewsResources(newsResources: List<NewsResource>) =cachedNewsResources.update { it + newsResources }}