test: cover factory generator edge cases#418
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 the generator test suite to cover additional edge cases and previously-uncovered branches in FactoriesGenerator, supporting the coverage goals in #413.
Changes:
- Adds new TinyBDD scenarios for
FactoryMethodedge cases (empty hosts, default validation, duplicate/null keys, signature mismatch). - Adds new TinyBDD scenarios for
FactoryClassedge cases (abstract products, multi-base ambiguity, async factory creation fallback). - Extends internal helper assertions (unknown enum literals, null-key compatibility, accessibility formatting, async return formatting).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| [Scenario("FactoryMethod ValidatesDefaultsAndStringKeyComparer")] | ||
| [Fact] | ||
| public void FactoryMethod_ValidatesDefaultsAndStringKeyComparer() |
| [Scenario("FactoryClass FlagsAbstractProductAndMultipleBases")] | ||
| [Fact] | ||
| public void FactoryClass_FlagsAbstractProductAndMultipleBases() |
Code Coverage |
Test Results 12 files 12 suites 10m 3s ⏱️ Results for commit e352cb2. |
🔍 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 #418 +/- ##
==========================================
+ Coverage 89.65% 95.75% +6.09%
==========================================
Files 551 551
Lines 44183 44183
Branches 6357 6357
==========================================
+ Hits 39614 42306 +2692
+ Misses 2048 1877 -171
+ Partials 2521 0 -2521
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