Repository navigation
test: harden context map and gateway routing coverage - #473
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 adds source-generator test coverage for Context Map Descriptor and Gateway Routing variants to support the broader coverage goals in issue #413.
Changes:
- Adds Context Map Descriptor coverage for struct hosts and relationship kind emission.
- Adds Gateway Routing coverage for abstract/sealed hosts and nested accessibility variants.
- Adds a Gateway Routing helper intended to compile generated sources without emitting.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
test/PatternKit.Generators.Tests/GatewayRoutingGeneratorTests.cs |
Adds Gateway Routing generator scenarios for host shape and accessibility variants. |
test/PatternKit.Generators.Tests/ContextMapDescriptorGeneratorTests.cs |
Adds Context Map Descriptor generator scenario for struct hosts and relationship kind handling. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| ScenarioExpect.Contains("ContextRelationshipKind.AntiCorruptionLayer", text); | ||
| ScenarioExpect.Contains("ContextRelationshipKind.OpenHostService", text); | ||
| ScenarioExpect.Contains("ContextRelationshipKind.PublishedLanguage", text); | ||
| ScenarioExpect.Contains("ContextRelationshipKind.SeparateWays", text); |
| _ = RoslynTestHelpers.Run(compilation, new GatewayRoutingGenerator(), out var run, out _); | ||
| var result = run.Results.Single(); | ||
| return new(result.Diagnostics.ToArray(), result.GeneratedSources.Select(static source => source.SourceText.ToString()).ToArray(), EmitSuccess: true, EmitDiagnostics: []); |
| ScenarioExpect.Contains("private partial class PrivateGateway", generatedText); | ||
| ScenarioExpect.Contains("protected partial class ProtectedGateway", generatedText); | ||
| ScenarioExpect.Contains("protected internal partial class ProtectedInternalGateway", generatedText); | ||
| ScenarioExpect.Contains("private protected partial class PrivateProtectedGateway", generatedText); |
Test Results 12 files 12 suites 11m 1s ⏱️ Results for commit a1f3264. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #473 +/- ##
==========================================
+ Coverage 97.16% 97.30% +0.13%
==========================================
Files 579 579
Lines 47180 47180
Branches 3083 6768 +3685
==========================================
+ Hits 45843 45907 +64
+ Misses 1337 1273 -64
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 |
🔍 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
Refs #413
Verification
ContextMapDescriptorGeneratorTests|FullyQualifiedNameGatewayRoutingGeneratorTests"