From c6fb2ef6e1d5fba55fcec7ea60623fb13508ef4d Mon Sep 17 00:00:00 2001 From: sowjanyakch Date: Thu, 25 Jul 2024 19:27:52 +0200 Subject: [PATCH] refactoring Signed-off-by: sowjanyakch --- .../java/com/nextcloud/talk/contacts/ContactsViewModelTest.kt | 2 +- .../java/com/nextcloud/talk/contacts/apiService/FakeItem.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/test/java/com/nextcloud/talk/contacts/ContactsViewModelTest.kt b/app/src/test/java/com/nextcloud/talk/contacts/ContactsViewModelTest.kt index 4d92bb480..7bb905b43 100644 --- a/app/src/test/java/com/nextcloud/talk/contacts/ContactsViewModelTest.kt +++ b/app/src/test/java/com/nextcloud/talk/contacts/ContactsViewModelTest.kt @@ -54,7 +54,7 @@ class ContactsViewModelTest { } @Test - fun `fetch contacts with error`() = + fun `test error contacts state`() = runTest { viewModel = ContactsViewModel(FakeRepositoryError()) assert(viewModel.contactsViewState.value is ContactsUiState.Error) diff --git a/app/src/test/java/com/nextcloud/talk/contacts/apiService/FakeItem.kt b/app/src/test/java/com/nextcloud/talk/contacts/apiService/FakeItem.kt index 99539fa64..acfcbfe30 100644 --- a/app/src/test/java/com/nextcloud/talk/contacts/apiService/FakeItem.kt +++ b/app/src/test/java/com/nextcloud/talk/contacts/apiService/FakeItem.kt @@ -17,7 +17,7 @@ import com.nextcloud.talk.models.json.generic.GenericMeta import org.mockito.Mockito.mock object FakeItem { - val contacts: List? = + val contacts: List = listOf( AutocompleteUser(id = "android", label = "Android", source = "users"), AutocompleteUser(id = "android1", label = "Android 1", source = "users"),