Skip to content

Address test duplication concern regarding AcceptHeaderMatcher quality value testing#35512

Closed
Copilot wants to merge 1 commit intoandreer/cbor-content-negotiationfrom
copilot/sub-pr-35509
Closed

Address test duplication concern regarding AcceptHeaderMatcher quality value testing#35512
Copilot wants to merge 1 commit intoandreer/cbor-content-negotiationfrom
copilot/sub-pr-35509

Conversation

Copy link
Contributor

Copilot AI commented Dec 14, 2025

Addresses feedback on PR #35509 regarding potential test duplication. The question was whether adding quality value tests to SearchHandlerTest would duplicate coverage already in AcceptHeaderMatcherTest.

Resolution

No code changes required. The current test structure is appropriate:

  • AcceptHeaderMatcherTest provides comprehensive unit tests for quality value parsing and preference ordering (lines 49-71)
  • SearchHandlerTest provides integration tests verifying end-to-end Accept header handling in the search handler
  • The integration point is thin (just instantiating AcceptHeaderMatcher and calling preferredExactMediaTypes()), so detailed quality value scenarios belong in the unit tests

Adding quality value tests to the integration layer would duplicate existing unit test coverage without adding value.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI mentioned this pull request Dec 14, 2025
Copilot AI changed the title [WIP] Fix testing duplication in CBOR content negotiation Address test duplication concern regarding AcceptHeaderMatcher quality value testing Dec 14, 2025
Copilot AI requested a review from andreer December 14, 2025 06:30
@andreer andreer closed this Dec 14, 2025
@andreer andreer deleted the copilot/sub-pr-35509 branch December 14, 2025 07:06
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

Comments