From a04a6bf5acfe9df9c18063a52992b064b443cb6c Mon Sep 17 00:00:00 2001 From: yongsuk44 Date: Sat, 23 Mar 2024 20:45:58 +0900 Subject: [PATCH] Modify comments to ''@TestOnly' annotation --- .../core/testing/repository/TestUserDataRepository.kt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/core/testing/src/main/kotlin/com/google/samples/apps/nowinandroid/core/testing/repository/TestUserDataRepository.kt b/core/testing/src/main/kotlin/com/google/samples/apps/nowinandroid/core/testing/repository/TestUserDataRepository.kt index be76112dc..29611b7f9 100644 --- a/core/testing/src/main/kotlin/com/google/samples/apps/nowinandroid/core/testing/repository/TestUserDataRepository.kt +++ b/core/testing/src/main/kotlin/com/google/samples/apps/nowinandroid/core/testing/repository/TestUserDataRepository.kt @@ -24,6 +24,7 @@ import kotlinx.coroutines.channels.BufferOverflow.DROP_OLDEST import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.MutableSharedFlow import kotlinx.coroutines.flow.filterNotNull +import org.jetbrains.annotations.TestOnly val emptyUserData = UserData( bookmarkedNewsResources = emptySet(), @@ -112,9 +113,7 @@ class TestUserDataRepository : UserDataRepository { } } - /** - * A test-only API to allow setting of user data directly. - */ + @TestOnly fun setUserData(userData: UserData) { _userData.tryEmit(userData) }