From 5301f471ece120c5159d4e65de0e2d058636aacd Mon Sep 17 00:00:00 2001 From: Bruno Wieczorek Date: Sat, 10 Dec 2022 19:59:42 +0100 Subject: [PATCH] Replace forEachIndexed with zip in UsersRemoteRepositoryTest --- .../data/users/core/UsersRemoteRepositoryTest.kt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/data/users/core/src/commonTest/kotlin/dev/burnoo/demo/listapp/data/users/core/UsersRemoteRepositoryTest.kt b/data/users/core/src/commonTest/kotlin/dev/burnoo/demo/listapp/data/users/core/UsersRemoteRepositoryTest.kt index 13f28c6..fa68cab 100644 --- a/data/users/core/src/commonTest/kotlin/dev/burnoo/demo/listapp/data/users/core/UsersRemoteRepositoryTest.kt +++ b/data/users/core/src/commonTest/kotlin/dev/burnoo/demo/listapp/data/users/core/UsersRemoteRepositoryTest.kt @@ -31,12 +31,12 @@ class UsersRemoteRepositoryTest { pager.loadPage() val users = awaitItem().currentList - users.forEachIndexed { index, userItem -> - userItem.id.value shouldBe testNetworkUsers[index].id - userItem.firstName shouldBe testNetworkUsers[index].firstName - userItem.lastName shouldBe testNetworkUsers[index].lastName - userItem.title shouldBe testNetworkUsers[index].title - userItem.photoUrl shouldBe testNetworkUsers[index].picture + users.zip(testNetworkUsers) { userItem, networkUser -> + userItem.id.value shouldBe networkUser.id + userItem.firstName shouldBe networkUser.firstName + userItem.lastName shouldBe networkUser.lastName + userItem.title shouldBe networkUser.title + userItem.photoUrl shouldBe networkUser.picture } } }