@@ -44,13 +44,13 @@ private static String getTextFileContent(String path)
44
44
}
45
45
46
46
@ Test
47
- public void testReader ()
47
+ public void testArchive ()
48
48
throws JNIKiwixException , IOException , ZimFileFormatException {
49
49
Archive archive = new Archive ("small.zim" );
50
50
// test the zim file main page title
51
51
assertEquals ("Test ZIM file" , archive .getMainEntry ().getTitle ());
52
52
// test zim file size
53
- assertEquals (3 , archive .getFilesize () / 1024 ); // The file size is in KiB
53
+ assertEquals (4070 , archive .getFilesize ()); // The file size is in KiB
54
54
// test zim file main url
55
55
assertEquals ("A/main.html" , archive .getMainEntry ().getPath ());
56
56
// test zim file content
@@ -73,14 +73,14 @@ public void testReader()
73
73
}
74
74
75
75
@ Test
76
- public void testReaderByFd ()
76
+ public void testArchiveByFd ()
77
77
throws JNIKiwixException , IOException , ZimFileFormatException {
78
78
FileInputStream fis = new FileInputStream ("small.zim" );
79
79
Archive archive = new Archive (fis .getFD ());
80
80
// test the zim file main page title
81
81
assertEquals ("Test ZIM file" , archive .getMainEntry ().getTitle ());
82
82
// test zim file size
83
- assertEquals (3 , archive .getFilesize () / 1024 ); // The file size is in KiB
83
+ assertEquals (4070 , archive .getFilesize ()); // The file size is in KiB
84
84
// test zim file main url
85
85
assertEquals ("A/main.html" , archive .getMainEntry ().getPath ());
86
86
// test zim file content
@@ -103,15 +103,15 @@ public void testReaderByFd()
103
103
}
104
104
105
105
@ Test
106
- public void testReaderWithAnEmbeddedArchive ()
106
+ public void testArchiveWithAnEmbeddedArchive ()
107
107
throws JNIKiwixException , IOException , ZimFileFormatException {
108
108
File plainArchive = new File ("small.zim" );
109
109
FileInputStream fis = new FileInputStream ("small.zim.embedded" );
110
110
Archive archive = new Archive (fis .getFD (), 8 , plainArchive .length ());
111
111
// test the zim file main page title
112
112
assertEquals ("Test ZIM file" , archive .getMainEntry ().getTitle ());
113
113
// test zim file size
114
- assertEquals (3 , archive .getFilesize () / 1024 ); // The file size is in KiB
114
+ assertEquals (4070 , archive .getFilesize ()); // The file size is in KiB
115
115
// test zim file main url
116
116
assertEquals ("A/main.html" , archive .getMainEntry ().getPath ());
117
117
// test zim file content
0 commit comments