test(generators): cover transaction script and claim check#438
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 containing-type wrapper emission to the Transaction Script and Claim Check source generators (so generated factories can sit inside partial outer types) and significantly expands TinyBDD generator test coverage for invalid signatures, default names, host shape variants, escaped names, malformed type arguments, and nested hosts. Claim Check tests are also migrated onto the TinyBDD xUnit scenario base, and Transaction Script tests now compile/emit the generated output to catch regressions.
Changes:
- Refactor
TransactionScriptGeneratorandClaimCheckGeneratorto emit containing partial-type wrappers via sharedGetContainingTypes/AppendTypeDeclarationhelpers. - Greatly expand
ClaimCheckGeneratorTestsandTransactionScriptGeneratorTestswith theory-driven diagnostics, host shape, escaping, nesting, and malformed type-argument scenarios. - Have test compilation helpers emit the generated assembly and surface emit success/diagnostics through a new
GeneratorResultrecord.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/PatternKit.Generators/TransactionScript/TransactionScriptGenerator.cs | Emit containing partial type wrappers around generated Transaction Script factory. |
| src/PatternKit.Generators/Messaging/ClaimCheckGenerator.cs | Emit containing partial type wrappers around generated Claim Check factory. |
| test/PatternKit.Generators.Tests/TransactionScriptGeneratorTests.cs | Add invalid-signature theory rows, host shape, nested host, and malformed type-arg scenarios; assert emit success. |
| test/PatternKit.Generators.Tests/ClaimCheckGeneratorTests.cs | Migrate to TinyBDD xUnit base and add diagnostics theory, host shape, nested host, and malformed type-arg scenarios. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Test Results 12 files 12 suites 10m 22s ⏱️ Results for commit d3a014b. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #438 +/- ##
==========================================
+ Coverage 90.96% 96.48% +5.52%
==========================================
Files 551 551
Lines 44627 44667 +40
Branches 6426 6432 +6
==========================================
+ Hits 40595 43098 +2503
+ Misses 1682 1569 -113
+ Partials 2350 0 -2350
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. |
Code Coverage |
Summary
Validation
TransactionScriptGeneratorTests|FullyQualifiedNameClaimCheckGeneratorTests" --logger "console;verbosity=minimal"Coverage
Refs #413