mirror of
https://github.com/kiwix/kiwix-android.git
synced 2025-09-08 06:42:21 -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 booksOnFileSystem = MutableStateFlow<List<Book>>(emptyList())
|
||||||
private val books = MutableStateFlow<List<BookOnDisk>>(emptyList())
|
private val books = MutableStateFlow<List<BookOnDisk>>(emptyList())
|
||||||
private val languages = MutableStateFlow<List<Language>>(emptyList())
|
private val languages = MutableStateFlow<List<Language>>(emptyList())
|
||||||
|
private val onlineContentLanguage = MutableStateFlow("")
|
||||||
private val fileSystemStates =
|
private val fileSystemStates =
|
||||||
MutableStateFlow<FileSystemState>(FileSystemState.DetectingFileSystem)
|
MutableStateFlow<FileSystemState>(FileSystemState.DetectingFileSystem)
|
||||||
private val networkStates = MutableStateFlow(NetworkState.NOT_CONNECTED)
|
private val networkStates = MutableStateFlow(NetworkState.NOT_CONNECTED)
|
||||||
@ -158,7 +159,9 @@ class ZimManageViewModelTest {
|
|||||||
} returns networkCapabilities
|
} returns networkCapabilities
|
||||||
every { networkCapabilities.hasTransport(TRANSPORT_WIFI) } returns true
|
every { networkCapabilities.hasTransport(TRANSPORT_WIFI) } returns true
|
||||||
every { sharedPreferenceUtil.prefWifiOnly } returns true
|
every { sharedPreferenceUtil.prefWifiOnly } returns true
|
||||||
|
every { sharedPreferenceUtil.getCachedLanguageList() } returns languages.value
|
||||||
coEvery { onlineLibraryManager.getOnlineBooksLanguage() } returns listOf("eng")
|
coEvery { onlineLibraryManager.getOnlineBooksLanguage() } returns listOf("eng")
|
||||||
|
every { sharedPreferenceUtil.onlineContentLanguage } returns onlineContentLanguage
|
||||||
downloads.value = emptyList()
|
downloads.value = emptyList()
|
||||||
booksOnFileSystem.value = emptyList()
|
booksOnFileSystem.value = emptyList()
|
||||||
books.value = emptyList()
|
books.value = emptyList()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user