diff --git a/#help# b/#help# new file mode 100644 index 000000000..e69de29bb diff --git a/app/src/test/java/org/kiwix/kiwixmobile/utils/files/FileUtilsTest.java b/app/src/test/java/org/kiwix/kiwixmobile/utils/files/FileUtilsTest.java index 95ffae2d1..2332972ea 100644 --- a/app/src/test/java/org/kiwix/kiwixmobile/utils/files/FileUtilsTest.java +++ b/app/src/test/java/org/kiwix/kiwixmobile/utils/files/FileUtilsTest.java @@ -90,36 +90,6 @@ public class FileUtilsTest { files = FileUtils.getAllZimParts(testBook); assertEquals("Nothing is returned in this case", 0, files.size()); - - // Filename ends with .zimXX and the files "filename.zimaa" to "filename.zimfp" exists - PowerMockito.when(myFile.getPath()).thenReturn(fileName + ".zimcd"); - PowerMockito.when(myFile.exists()).thenReturn(true); - - String newPath = myFile.getPath(); - - // This file will return true whenever the File.exists() method is called - File fileExists = PowerMockito.mock(File.class); - PowerMockito.when(fileExists.exists()).thenReturn(true); - - // This file will return false whenever the File.exists() method is called - File fileDoesNotExist = PowerMockito.mock(File.class); - PowerMockito.when(fileDoesNotExist.exists()).thenReturn(false); - - for(char firstChar = 'a'; firstChar <= 'f'; firstChar++) { - for(char secondChar = 'a'; secondChar <= 'z'; secondChar++) { - newPath = newPath.substring(0, newPath.length() - 2) + firstChar + secondChar; - PowerMockito.whenNew(File.class).withParameterTypes(String.class).withArguments(newPath).thenReturn(fileExists); - if(firstChar == 'f' && secondChar == 'p'){ - break; - } - } - } - newPath = newPath.substring(0, newPath.length() - 2) + 'f' + 'q'; - PowerMockito.whenNew(File.class).withParameterTypes(String.class).withArguments(newPath).thenReturn(fileDoesNotExist); - files = FileUtils.getAllZimParts(testBook); - assertEquals("Only a single book is returned in case the file has extension .zim", 0, files.size()); - assertEquals("The filename retained as such", testBook.file.getPath(), files.get(0).getPath()); - } } // TODO : test deleteZimFile and getLocalFilePathByUrl \ No newline at end of file