Skip to content

Conversation

@alxkm
Copy link
Contributor

@alxkm alxkm commented Aug 7, 2025

Adds comprehensive test coverage for Document and DocumentBuilder classes focusing on:

Document Tests:

  • Metadata mode handling
  • Complex metadata structures and immutability
  • Document mutation and equality edge cases
  • Score validation
  • Text content edge cases (whitespace, unicode)
  • Hash code consistency

DocumentBuilder Tests:

  • Media vs text content validation and exclusivity
  • Metadata key validation with special characters
  • Builder state isolation between multiple builds
  • Method chaining verification
  • Content overwriting scenarios
  • Text formatting preservation (newlines, tabs)
  • Metadata accumulation vs replacement behavior

These tests improve robustness by covering previously untested edge cases, validation scenarios, and ensuring proper isolation between builder instances.

Test Coverage Improvements:

  • Added 21 new test methods across both test classes
  • Enhanced validation of error conditions
  • Improved coverage of builder pattern edge cases
  • Better testing of metadata handling complexity

…ses and validation tests

Signed-off-by: Alex Klimenko <[email protected]>
@sobychacko
Copy link
Contributor

Merged via c893629.

@sobychacko sobychacko closed this Aug 7, 2025
@sobychacko sobychacko added this to the 1.1.0.M1 milestone Aug 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants