Skip to content

Add unit tests for operation name flow from client to server#4824

Merged
rockfordlhotka merged 2 commits intorocky/4359-method-flowfrom
copilot/sub-pr-4817
Feb 15, 2026
Merged

Add unit tests for operation name flow from client to server#4824
rockfordlhotka merged 2 commits intorocky/4359-method-flowfrom
copilot/sub-pr-4817

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 14, 2026

Description

Addresses #4359 comment requesting unit tests for the operation name flow feature.

Added comprehensive test coverage in OperationNameFlowTests.cs covering:

Operation Name Computation (10 tests)

  • No parameters → "Fetch"
  • Single/multiple parameters → "Fetch__Int32", "Fetch__Int32_String"
  • Arrays → "Fetch__Int32Array"
  • Generics → "Fetch__List_1_Int32"
  • Injected parameters excluded from name
  • All operation types (Create, Fetch, Execute, Delete)

End-to-End Flow (6 tests)

  • Client computes operation name via DataPortalOperationNameHelper.ComputeOperationName<T>()
  • Flows through CriteriaRequest.OperationName property
  • Server attempts name-based dispatch via IDataPortalOperationNamedMapping.InvokeNamedOperationAsync()
  • Covers all data portal operations (Create, Fetch, Execute, Insert, Update, DeleteSelf)

Test objects implement IDataPortalOperationNamedMapping to verify the name-based dispatch path is invoked before fallback to legacy reflection-based dispatch.

All tests pass. No regressions in existing data portal tests (89 tests).


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

Co-authored-by: rockfordlhotka <2333134+rockfordlhotka@users.noreply.github.com>
Copilot AI changed the title [WIP] Add flow operation names from client to server Add unit tests for operation name flow from client to server Feb 15, 2026
Copilot AI requested a review from rockfordlhotka February 15, 2026 00:10
@rockfordlhotka rockfordlhotka marked this pull request as ready for review February 15, 2026 00:15
@rockfordlhotka rockfordlhotka merged commit 71befff into rocky/4359-method-flow Feb 15, 2026
@rockfordlhotka rockfordlhotka deleted the copilot/sub-pr-4817 branch February 15, 2026 00:15
rockfordlhotka added a commit that referenced this pull request Feb 16, 2026
* #4359 Add name-based data portal operation dispatch

Client computes deterministic operation names (e.g., "Fetch__Int32") from
resolved method signatures and sends them through the wire protocol. The
server uses these names for O(1) switch-based dispatch, falling back to
criteria-based and then reflection-based dispatch for backwards compatibility.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Ignore claude local settings

* Add unit tests for operation name flow from client to server (#4824)

* Initial plan

* Add unit tests for operation name flow from client to server

Co-authored-by: rockfordlhotka <2333134+rockfordlhotka@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: rockfordlhotka <2333134+rockfordlhotka@users.noreply.github.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: rockfordlhotka <2333134+rockfordlhotka@users.noreply.github.com>
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