feat: implemented the composite pattern and a pricing rules demo using it.#15
Merged
JerrettDavis merged 1 commit intomainfrom Sep 17, 2025
Merged
feat: implemented the composite pattern and a pricing rules demo using it.#15JerrettDavis merged 1 commit intomainfrom
JerrettDavis merged 1 commit intomainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR implements the Composite pattern and demonstrates it with a comprehensive pricing rules demo, while also updating TinyBDD dependencies across test projects.
- Implements Composite<TIn,TOut> pattern with fluent builder API for uniform treatment of leaves and compositions
- Adds a pricing calculator demo showcasing async sources, loyalty stacking, payment discounts, bundles, coupons, taxes, and rounding rules
- Updates TinyBDD package versions from 0.8.3 to 0.9.0 across all test projects
Reviewed Changes
Copilot reviewed 23 out of 23 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/PatternKit.Core/Structural/Composite/Composite.cs | Core implementation of Composite pattern with fluent builder |
| test/PatternKit.Tests/Structural/Composite/CompositeTests.cs | Comprehensive tests for Composite pattern functionality |
| src/PatternKit.Examples/Pricing/*.cs | Complete pricing calculator demo with domain models, sources, pipeline, and demo builder |
| test/PatternKit.Examples.Tests/Pricing/PricingDemoTests.cs | End-to-end tests for pricing calculator scenarios |
| docs/patterns/structural/composite/composite.md | Complete documentation and tutorial for Composite pattern |
| docs/patterns/index.md | Updated to include Composite pattern |
| test/**/packages.lock.json | Updated TinyBDD dependency versions to 0.9.0 |
| test/**/*.csproj | Updated TinyBDD package references to 0.9.0 |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Contributor
Code Coverage |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #15 +/- ##
==========================================
+ Coverage 84.63% 90.01% +5.37%
==========================================
Files 28 33 +5
Lines 1608 1932 +324
Branches 227 277 +50
==========================================
+ Hits 1361 1739 +378
- Misses 186 193 +7
+ Partials 61 0 -61
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:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.