mirror of
https://github.com/kiwix/kiwix-android.git
synced 2025-08-03 18:56:44 -04:00
Fixed failing test cases.
This commit is contained in:
parent
cd73d6eb89
commit
9b64e5d815
@ -128,19 +128,18 @@ class CopyMoveFileHandlerTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun validateZimFileCanCopyOrMoveShouldReturnFalseWhenDetectingFileSystem() =
|
fun validateZimFileCanCopyOrMoveShouldReturnFalseWhenDetectingFileSystem() = runTest {
|
||||||
runTest {
|
every { fileHandler.isBookLessThan4GB() } returns true
|
||||||
every { fileHandler.isBookLessThan4GB() } returns true
|
prepareFileSystemAndFileForMockk(fileSystemState = DetectingFileSystem)
|
||||||
prepareFileSystemAndFileForMockk(fileSystemState = DetectingFileSystem)
|
|
||||||
|
|
||||||
val result = fileHandler.validateZimFileCanCopyOrMove(storageFile)
|
val result = fileHandler.validateZimFileCanCopyOrMove(storageFile)
|
||||||
|
|
||||||
assertFalse(result)
|
assertFalse(result)
|
||||||
coVerify { fileHandler.handleDetectingFileSystemState() }
|
coVerify { fileHandler.handleDetectingFileSystemState() }
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun validateZimFileCanCopyOrMoveShouldReturnFalseWhenCannotWrite4GbFile() = runTest {
|
fun validateZimFileCanCopyOrMoveShouldReturnFalseWhenCannotWrite4GbFile() = runBlocking {
|
||||||
every { fileHandler.isBookLessThan4GB() } returns true
|
every { fileHandler.isBookLessThan4GB() } returns true
|
||||||
every { fileHandler.showCopyMoveDialog() } just Runs
|
every { fileHandler.showCopyMoveDialog() } just Runs
|
||||||
every {
|
every {
|
||||||
|
@ -42,7 +42,7 @@ object Versions {
|
|||||||
|
|
||||||
const val io_objectbox: String = "3.5.0"
|
const val io_objectbox: String = "3.5.0"
|
||||||
|
|
||||||
const val io_mockk: String = "1.13.7"
|
const val io_mockk: String = "1.13.13"
|
||||||
|
|
||||||
const val android_arch_lifecycle_extensions: String = "1.1.1"
|
const val android_arch_lifecycle_extensions: String = "1.1.1"
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user