Skip to content

Improve code coverage for ZimReaderContainer and ZimReaderSource #4708

@harshsomankar123-tech

Description

@harshsomankar123-tech

Particular area and files to be tested

  • ZimReaderContainer.kt
  • ZimReaderSource.kt

Current Status of the tests
Incomplete. Both files contain significant testing gaps in core ZIM reading abstractions. Needs unit tests to improve coverage as requested in parent issue #4633.

Particular Behaviour to be tested

  • ZimReaderContainer.kt: Execution paths for HTTP "Range" header handling in the load() function, redirect logic (isRedirect, getRedirect), routing methods (getPageUrlFromTitle), and property getters delegating to the file reader (fileSize, creator, language, etc.).
  • ZimReaderSource.kt: Initialization branches (File vs. URI constructors), validation methods (exists(), canOpenInLibkiwix()), archive creation (createArchive()) handling AssetFileDescriptors, and standard data class methods (equals(), hashCode()).
Image

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions