Skip to content

test: Add comprehensive Document class validation and functionality tests #4174

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed

Conversation

alxkm
Copy link
Contributor

@alxkm alxkm commented Aug 17, 2025

Adds essential test coverage for the Document class to improve code quality and prevent regressions.

Tests Added:

  • Input validation (null/empty ID, metadata validation)
  • Builder pattern validation and custom ID generator support
  • Content formatter functionality and error handling
  • Document mutation ensuring immutability
  • Equals/hashCode contract verification
  • Text document behavior validation
  • Metadata immutability guarantees

Benefits:

  • Prevents runtime errors through comprehensive validation testing
  • Ensures API contracts are maintained during refactoring
  • Improves confidence in Document class reliability
  • Covers edge cases and error conditions

Coverage: 19 new test methods covering validation, builder patterns, mutation, equality, and core functionality.

…ests

Co-authored-by: Oleksandr Klymenko <[email protected]>
Signed-off-by: Oleksandr Klymenko <[email protected]>
@markpollack markpollack self-assigned this Aug 20, 2025
@markpollack markpollack added this to the 1.1.0.M1 milestone Aug 20, 2025
spring-builds pushed a commit that referenced this pull request Aug 20, 2025
…ests

Co-authored-by: Oleksandr Klymenko <[email protected]>
Signed-off-by: Oleksandr Klymenko <[email protected]>

Fixes #4174

(cherry picked from commit 2bca047)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants