Skip to content

Test/paginated response - #8

Open
motchiy-tuti wants to merge 2 commits into
ratingtesting:masterfrom
motchiy-tuti:test/paginated-response
Open

motchiy-tuti wants to merge 2 commits into
ratingtesting:masterfrom
motchiy-tuti:test/paginated-response

Conversation

@motchiy-tuti

Copy link
Copy Markdown

What does this PR do?

Adds dedicated unit tests for PaginatedResponse<T> parsing edge cases (test/shared/models/paginated_response_test.dart) and enhances PaginatedResponse with robust page, hasMore, and toJson serialization support.

  • Covers fromJson with non-empty page and empty items list.
  • Handles missing or null page / hasMore fields with safe default fallbacks.
  • Adds toJson() round-trip verification.

Type of change

  • feat β€” new feature for template users
  • fix β€” bug in the template
  • docs β€” documentation only
  • refactor β€” refactoring without behavior change
  • test β€” adding/fixing tests
  • chore β€” CI, deps, tooling

Checklist

  • flutter analyze lib/ test/ --fatal-infos β€” 0 issues
  • dart format --set-exit-if-changed . β€” no diff
  • flutter test β€” all tests pass
  • Tests added for new logic (domain layer required)
  • Documentation updated (README, ARCHITECTURE.md, CHANGELOG.md if needed)
  • No hardcoded secrets / API keys / domains
  • Clean Architecture Dependency Rule NOT violated (domain does not depend on data/presentation)
  • New dependency? Updated Stack table in README/ARCHITECTURE + pubspec.yaml

Notes for reviewers

All verification checks (flutter analyze, flutter test, and tool/check_boundaries.dart) passed successfully without any issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants