test: cover data mapper generator hosts#430
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 expands coverage for the DataMapperGenerator by adding many more TinyBDD scenarios and updates the generator to emit containing partial wrappers for nested mapper hosts (aligning with the nested-wrapper behavior used by other generators in the repo).
Changes:
- Update
DataMapperGeneratorsource emission to wrap nested mapper hosts in their containing type declarations. - Expand
DataMapperGeneratorTeststo cover defaults/type-shapes, nested accessibility wrappers, malformed type arguments, projection missing/duplicates, invalid projection signatures, and emitted-compilation success checks.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| test/PatternKit.Generators.Tests/DataMapperGeneratorTests.cs | Adds broader TinyBDD scenario coverage and validates generated code can emit successfully. |
| src/PatternKit.Generators/DataMapping/DataMapperGenerator.cs | Emits containing type wrappers for nested mapper hosts and refactors type declaration emission accordingly. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| { | ||
| AppendTypeDeclaration(sb, containingType, indentLevel); | ||
| sb.AppendLine(); | ||
| sb.AppendLine(new string(' ', indentLevel * 4) + "{"); | ||
| indentLevel++; |
Test Results 12 files 12 suites 9m 39s ⏱️ Results for commit 934d9a1. |
Code Coverage |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #430 +/- ##
==========================================
+ Coverage 90.25% 96.10% +5.84%
==========================================
Files 551 551
Lines 44331 44351 +20
Branches 6379 6382 +3
==========================================
+ Hits 40013 42623 +2610
+ Misses 1862 1728 -134
+ 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.