From 208babbce32f9bac2484c8070bd4b08006e0a8f2 Mon Sep 17 00:00:00 2001 From: davidoskky Date: Fri, 14 Oct 2022 00:03:20 +0200 Subject: [PATCH] Correct tests --- .../repository/RepositoryTest.kt | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/shared/src/commonTest/kotlin/bou/amine/apps/readerforselfossv2/repository/RepositoryTest.kt b/shared/src/commonTest/kotlin/bou/amine/apps/readerforselfossv2/repository/RepositoryTest.kt index b1cc19e..61109d5 100644 --- a/shared/src/commonTest/kotlin/bou/amine/apps/readerforselfossv2/repository/RepositoryTest.kt +++ b/shared/src/commonTest/kotlin/bou/amine/apps/readerforselfossv2/repository/RepositoryTest.kt @@ -179,12 +179,12 @@ class RepositoryTest() { val itemParameter2 = FakeItemParameters() val itemParameter3 = FakeItemParameters() itemParameter2.tags = "Test, Stuff" + itemParameter2.id = "2" itemParameter3.tags = "Other, Tag" - coEvery { db.itemsQueries.items().executeAsList() } returnsMany listOf( - generateTestDBItems(itemParameter1), - generateTestDBItems(itemParameter2), + itemParameter3.id = "3" + coEvery { db.itemsQueries.items().executeAsList() } returns generateTestDBItems(itemParameter1) + + generateTestDBItems(itemParameter2) + generateTestDBItems(itemParameter3) - ) every { connectivityStatus.isNetworkConnected } returns MutableStateFlow(false) every { appSettingsService.isItemCachingEnabled() } returns true @@ -206,12 +206,12 @@ class RepositoryTest() { val itemParameter2 = FakeItemParameters() val itemParameter3 = FakeItemParameters() itemParameter2.sourcetitle = "Test" + itemParameter2.id = "2" itemParameter3.sourcetitle = "Other" - coEvery { db.itemsQueries.items().executeAsList() } returnsMany listOf( - generateTestDBItems(itemParameter1), - generateTestDBItems(itemParameter2), - generateTestDBItems(itemParameter3) - ) + itemParameter3.id = "3" + coEvery { db.itemsQueries.items().executeAsList() } returns generateTestDBItems(itemParameter1) + + generateTestDBItems(itemParameter2) + + generateTestDBItems(itemParameter3) every { connectivityStatus.isNetworkConnected } returns MutableStateFlow(false) every { appSettingsService.isItemCachingEnabled() } returns true