From dbe178cd2e40a70dd59d99fa3efc9d4c085e46b1 Mon Sep 17 00:00:00 2001 From: Dmitri Date: Mon, 2 Dec 2024 22:21:25 +0200 Subject: [PATCH] Fix for test case --- .../com/mobiledevpro/peoplelist/PeopleListViewModelTest.kt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/feature/people_list/src/test/kotlin/com/mobiledevpro/peoplelist/PeopleListViewModelTest.kt b/feature/people_list/src/test/kotlin/com/mobiledevpro/peoplelist/PeopleListViewModelTest.kt index 2ea28fd..eeb4659 100644 --- a/feature/people_list/src/test/kotlin/com/mobiledevpro/peoplelist/PeopleListViewModelTest.kt +++ b/feature/people_list/src/test/kotlin/com/mobiledevpro/peoplelist/PeopleListViewModelTest.kt @@ -32,6 +32,7 @@ import org.junit.After import org.junit.Assert.assertTrue import org.junit.Before import org.junit.Test +import kotlin.test.assertEquals class PeopleListViewModelTest { @@ -53,10 +54,8 @@ class PeopleListViewModelTest { @Test fun stateTest() = runTest { - vm.uiState.test { - // assertEquals("State is not Loading", PeopleProfileUIState.Loading, awaitItem()) - + assertEquals(PeopleProfileUIState.Loading, awaitItem()) assertTrue( "People list is empty", (awaitItem() as PeopleProfileUIState.Success).profileList.isNotEmpty()