test: cover proxy generator edge cases#417
Conversation
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
There was a problem hiding this comment.
Pull request overview
This PR fixes proxy generation for synchronous-return methods that accept CancellationToken, preventing invalid async method signatures while expanding proxy generator coverage for edge cases tied to issue #413.
Changes:
- Treat only Task/ValueTask-returning members as per-method async generation candidates.
- Add/extend proxy generator tests for CancellationToken sync members, ref/out/in forwarding, explicit async configuration, protected-internal members, and literal defaults.
- Add compile/emit validation for several generated proxy scenarios.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
src/PatternKit.Generators/ProxyGenerator.cs |
Updates per-member async routing to require async return types instead of treating CancellationToken alone as async. |
test/PatternKit.Generators.Tests/ProxyGeneratorTests.cs |
Adds and extends TinyBDD scenarios covering proxy generator edge cases and regression behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Test Results 12 files 12 suites 9m 42s ⏱️ Results for commit c5a4f4f. |
Code Coverage |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #417 +/- ##
==========================================
+ Coverage 89.63% 95.71% +6.08%
==========================================
Files 551 551
Lines 44183 44183
Branches 6357 6357
==========================================
+ Hits 39602 42289 +2687
+ Misses 2051 1894 -157
+ Partials 2530 0 -2530
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
🔍 PR Validation ResultsVersion: `` ✅ Validation Steps
📊 ArtifactsDry-run artifacts have been uploaded and will be available for 7 days. This comment was automatically generated by the PR validation workflow. |
Summary
Validation
Note: local solution-level dotnet test invocations hung in this Windows workspace after test processes completed; project-level runs above passed across net8/net9/net10.