test: cover table data gateway generator hosts#427
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 hardens Table Data Gateway source generation for nested host types and expands generator scenario coverage toward the source-generator coverage goal in #413.
Changes:
- Adds emitted-compilation assertions and new TinyBDD/xUnit scenarios for diagnostics, defaults, escaped table names, host shapes, nested wrappers, and malformed type arguments.
- Updates
TableDataGatewayGeneratorto emit containing partial type wrappers around nested generated hosts.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
src/PatternKit.Generators/TableDataGateway/TableDataGatewayGenerator.cs |
Adds nested containing-type wrapper generation for Table Data Gateway hosts. |
test/PatternKit.Generators.Tests/TableDataGatewayGeneratorTests.cs |
Expands generator tests and validates emitted compilations for successful scenarios. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| .Append(rowName).Append(", ").Append(keyName).Append(">.Create(\"").Append(Escape(tableName)).Append("\", ").Append(selectorName).AppendLine(").Build();"); | ||
| sb.AppendLine("}"); | ||
| return sb.ToString(); | ||
| sb.Append("partial ").Append(type.TypeKind == TypeKind.Struct ? "struct" : "class").Append(' ').Append(type.Name); |
Test Results 12 files 12 suites 10m 32s ⏱️ Results for commit ad5ca65. |
Code Coverage |
🔍 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 #427 +/- ##
==========================================
+ Coverage 90.14% 96.03% +5.88%
==========================================
Files 551 551
Lines 44269 44291 +22
Branches 6370 6373 +3
==========================================
+ Hits 39908 42534 +2626
+ Misses 1894 1757 -137
+ Partials 2467 0 -2467
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:
|
Summary:
Coverage:
Validation:
Closes part of #413.