test: cover competing consumer generator hosts#429
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
Adds nested-type wrapper emission to CompetingConsumerGroupGenerator so generated factories compile even when the host type is nested inside other partial types, and significantly expands the TinyBDD scenarios for that generator to cover defaults, escaping, alternate host shapes, nested accessibility, and malformed type arguments.
Changes:
- Refactor
GenerateSourceto walk containing types and emit matchingpartialwrappers with proper indentation, factored intoGetContainingTypes/AppendTypeDeclarationhelpers. - Add scenarios for default group name /
MaxConcurrentDeliveries, escaped group names, abstract/sealed/struct host shapes, andEmitSuccessassertions. - Add theory covering
null!typeofarguments and a scenario covering nested hosts with protected / private-protected / protected-internal accessibility.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/PatternKit.Generators/Messaging/CompetingConsumerGroupGenerator.cs | Emits containing partial type wrappers around the generated factory and extracts type-declaration helpers. |
| test/PatternKit.Generators.Tests/CompetingConsumerGroupGeneratorTests.cs | Adds three new TinyBDD scenarios covering defaults/shapes, nested accessibility wrappers, and malformed type arguments. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Test Results 12 files 12 suites 10m 29s ⏱️ Results for commit 66184d0. |
Code Coverage |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #429 +/- ##
==========================================
+ Coverage 90.23% 96.07% +5.84%
==========================================
Files 551 551
Lines 44311 44331 +20
Branches 6376 6379 +3
==========================================
+ Hits 39984 42592 +2608
+ Misses 1871 1739 -132
+ Partials 2456 0 -2456
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:
Coverage:
Validation:
Closes part of #413.