Skip to content

Commit 179fe03

Browse files
committed
Add TaskRepositorySyncTest in :tasks-core with Mockito
1 parent da94c08 commit 179fe03

File tree

2 files changed

+462
-1
lines changed

2 files changed

+462
-1
lines changed

tasks-core/src/commonMain/kotlin/net/opatry/tasks/data/TaskRepository.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222

2323
package net.opatry.tasks.data
2424

25+
import androidx.annotation.VisibleForTesting
2526
import kotlinx.coroutines.Dispatchers
2627
import kotlinx.coroutines.ExperimentalCoroutinesApi
2728
import kotlinx.coroutines.async
@@ -60,7 +61,8 @@ private fun RemoteTaskList.asTaskListEntity(localId: Long?, sorting: LocalTaskLi
6061
)
6162
}
6263

63-
private fun RemoteTask.asTaskEntity(parentListLocalId: Long, parentTaskLocalId: Long?, taskLocalId: Long?): LocalTask {
64+
@VisibleForTesting
65+
internal fun RemoteTask.asTaskEntity(parentListLocalId: Long, parentTaskLocalId: Long?, taskLocalId: Long?): LocalTask {
6466
return LocalTask(
6567
id = taskLocalId ?: 0,
6668
remoteId = id,

0 commit comments

Comments
 (0)