Fixed failing test cases.

This commit is contained in:
CalebK 2024-11-21 13:45:21 +03:00 committed by Kelson
parent cd73d6eb89
commit 9b64e5d815
2 changed files with 9 additions and 10 deletions

View File

@ -128,19 +128,18 @@ class CopyMoveFileHandlerTest {
}
@Test
fun validateZimFileCanCopyOrMoveShouldReturnFalseWhenDetectingFileSystem() =
runTest {
every { fileHandler.isBookLessThan4GB() } returns true
prepareFileSystemAndFileForMockk(fileSystemState = DetectingFileSystem)
fun validateZimFileCanCopyOrMoveShouldReturnFalseWhenDetectingFileSystem() = runTest {
every { fileHandler.isBookLessThan4GB() } returns true
prepareFileSystemAndFileForMockk(fileSystemState = DetectingFileSystem)
val result = fileHandler.validateZimFileCanCopyOrMove(storageFile)
val result = fileHandler.validateZimFileCanCopyOrMove(storageFile)
assertFalse(result)
coVerify { fileHandler.handleDetectingFileSystemState() }
}
assertFalse(result)
coVerify { fileHandler.handleDetectingFileSystemState() }
}
@Test
fun validateZimFileCanCopyOrMoveShouldReturnFalseWhenCannotWrite4GbFile() = runTest {
fun validateZimFileCanCopyOrMoveShouldReturnFalseWhenCannotWrite4GbFile() = runBlocking {
every { fileHandler.isBookLessThan4GB() } returns true
every { fileHandler.showCopyMoveDialog() } just Runs
every {

View File

@ -42,7 +42,7 @@ object Versions {
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"