From 160428de9d3b77ecb300c5249c06849b8e5b16c7 Mon Sep 17 00:00:00 2001 From: MohitMaliFtechiz Date: Wed, 22 Mar 2023 17:02:01 +0530 Subject: [PATCH] Changes after review --- lib/src/test/test.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/src/test/test.java b/lib/src/test/test.java index ca50b5c..e78cb9d 100644 --- a/lib/src/test/test.java +++ b/lib/src/test/test.java @@ -44,13 +44,13 @@ public class test { } @Test - public void testReader() + public void testArchive() throws JNIKiwixException, IOException, ZimFileFormatException { Archive archive = new Archive("small.zim"); // test the zim file main page title assertEquals("Test ZIM file", archive.getMainEntry().getTitle()); // test zim file size - assertEquals(3, archive.getFilesize() / 1024); // The file size is in KiB + assertEquals(4070, archive.getFilesize()); // The file size is in KiB // test zim file main url assertEquals("A/main.html", archive.getMainEntry().getPath()); // test zim file content @@ -73,14 +73,14 @@ public class test { } @Test - public void testReaderByFd() + public void testArchiveByFd() throws JNIKiwixException, IOException, ZimFileFormatException { FileInputStream fis = new FileInputStream("small.zim"); Archive archive = new Archive(fis.getFD()); // test the zim file main page title assertEquals("Test ZIM file", archive.getMainEntry().getTitle()); // test zim file size - assertEquals(3, archive.getFilesize() / 1024); // The file size is in KiB + assertEquals(4070, archive.getFilesize()); // The file size is in KiB // test zim file main url assertEquals("A/main.html", archive.getMainEntry().getPath()); // test zim file content @@ -103,7 +103,7 @@ public class test { } @Test - public void testReaderWithAnEmbeddedArchive() + public void testArchiveWithAnEmbeddedArchive() throws JNIKiwixException, IOException, ZimFileFormatException { File plainArchive = new File("small.zim"); FileInputStream fis = new FileInputStream("small.zim.embedded"); @@ -111,7 +111,7 @@ public class test { // test the zim file main page title assertEquals("Test ZIM file", archive.getMainEntry().getTitle()); // test zim file size - assertEquals(3, archive.getFilesize() / 1024); // The file size is in KiB + assertEquals(4070, archive.getFilesize()); // The file size is in KiB // test zim file main url assertEquals("A/main.html", archive.getMainEntry().getPath()); // test zim file content