mirror of
https://github.com/kiwix/kiwix-android.git
synced 2025-08-03 10:46:53 -04:00
Refactored the ZimManageViewModelTest
according to according to OPDS catalog fetching.
This commit is contained in:
parent
95dddd470a
commit
136052e0bb
@ -119,6 +119,7 @@ class ZimManageViewModelTest {
|
||||
private val booksOnFileSystem = MutableStateFlow<List<Book>>(emptyList())
|
||||
private val books = MutableStateFlow<List<BookOnDisk>>(emptyList())
|
||||
private val languages = MutableStateFlow<List<Language>>(emptyList())
|
||||
private val onlineContentLanguage = MutableStateFlow("")
|
||||
private val fileSystemStates =
|
||||
MutableStateFlow<FileSystemState>(FileSystemState.DetectingFileSystem)
|
||||
private val networkStates = MutableStateFlow(NetworkState.NOT_CONNECTED)
|
||||
@ -158,7 +159,9 @@ class ZimManageViewModelTest {
|
||||
} returns networkCapabilities
|
||||
every { networkCapabilities.hasTransport(TRANSPORT_WIFI) } returns true
|
||||
every { sharedPreferenceUtil.prefWifiOnly } returns true
|
||||
every { sharedPreferenceUtil.getCachedLanguageList() } returns languages.value
|
||||
coEvery { onlineLibraryManager.getOnlineBooksLanguage() } returns listOf("eng")
|
||||
every { sharedPreferenceUtil.onlineContentLanguage } returns onlineContentLanguage
|
||||
downloads.value = emptyList()
|
||||
booksOnFileSystem.value = emptyList()
|
||||
books.value = emptyList()
|
||||
|
Loading…
x
Reference in New Issue
Block a user