Skip to content

test: Unit tests for DataAnnotations validation interceptors#415

Closed
Copilot wants to merge 1 commit into
mainfrom
copilot/add-unit-tests-dataannotations-interceptors
Closed

test: Unit tests for DataAnnotations validation interceptors#415
Copilot wants to merge 1 commit into
mainfrom
copilot/add-unit-tests-dataannotations-interceptors

Conversation

Copilot AI commented Apr 16, 2026

Copy link
Copy Markdown
Contributor

Adds comprehensive unit tests for the three DataAnnotations pipeline interceptors and the AddDataAnnotations() extension, ensuring regression coverage for BCL validation behavior.

New Test Coverage

  • DataAnnotationsRequestInterceptorTests — null handler, no attributes (pass-through), valid input, missing required, range violation, max-length violation, multiple simultaneous violations
  • DataAnnotationsEventInterceptorTests — null handler, no attributes (pass-through), valid input, missing required, multiple violations
  • DataAnnotationsStreamQueryInterceptorTests — null handler, no attributes (pass-through), valid input, missing required, range violation, max-length violation, multiple violations; asserts exception is thrown before any item is yielded
  • DataAnnotationsExtensionsTests — all three interceptors registered with Scoped lifetime, idempotent registration (no duplicates on repeated calls), successful resolution from DI

All tests run across net8.0, net9.0, and net10.0 target frameworks.

Copilot AI linked an issue Apr 16, 2026 that may be closed by this pull request
3 tasks
Copilot AI changed the title [WIP] Add unit tests for DataAnnotations validation interceptors test: Unit tests for DataAnnotations validation interceptors Apr 16, 2026
Copilot AI requested a review from samtrion April 16, 2026 23:20
@samtrion samtrion closed this Apr 17, 2026
@samtrion samtrion deleted the copilot/add-unit-tests-dataannotations-interceptors branch April 17, 2026 07:03
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.

test: Unit tests for DataAnnotations validation interceptors

2 participants