test: cover event store generator hosts#423
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 TinyBDD test coverage for the EventStore source generator and fixes nested host emission to wrap generated types in their containing partial type declarations rather than emitting invalid top-level nested types. This raises generator-only source coverage from 81.8% to 98.8%, contributing to issue #413.
Changes:
- Extracted type-declaration emission into helper methods and added containing-type wrapper generation with proper indentation.
- Added scenarios covering default store names, escaped names, abstract/sealed/internal/struct hosts, and malformed type arguments.
- Added an emit-validated scenario for nested hosts with private/protected/private protected/protected internal accessibilities.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/PatternKit.Generators/EventSourcing/EventStoreGenerator.cs | Emit containing partial type wrappers around nested event store hosts with indentation tracking. |
| test/PatternKit.Generators.Tests/EventStoreGeneratorTests.cs | New scenarios for defaults, host shapes, malformed args, and emit-verified nested hosts; adds CompileWithUpdated helper. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Test Results 12 files 12 suites 9m 32s ⏱️ Results for commit c142688. |
🔍 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. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #423 +/- ##
==========================================
+ Coverage 89.99% 95.95% +5.96%
==========================================
Files 551 551
Lines 44186 44205 +19
Branches 6358 6361 +3
==========================================
+ Hits 39765 42417 +2652
+ Misses 1934 1788 -146
+ Partials 2487 0 -2487
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:
|
Code Coverage |
Summary
Part of #413.
Validation