Fix BL-15836 Allow Minimal Book constructor for ErrorBook#7658
Fix BL-15836 Allow Minimal Book constructor for ErrorBook#7658StephenMcConnel merged 1 commit intoVersion6.2from
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the
✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Pull request overview
This PR fixes an issue where ErrorBook could not be instantiated in production code due to a guard in the Book base class constructor that only allowed instantiation during unit tests.
Changes:
- Added a protected
Book(bool allowNonTestCtor)constructor to allow specific subclasses to bypass the unit-test guard - Modified ErrorBook to call
base(true)to use the new constructor path - Improved code comments for clarity and consistency
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/BloomExe/Book/Book.cs | Added protected constructor with boolean parameter to allow subclasses to bypass unit-test guard; improved comment formatting |
| src/BloomExe/Book/ErrorBook.cs | Modified constructor to call base(true) to bypass guard; improved and cleaned up comments |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
StephenMcConnel
left a comment
There was a problem hiding this comment.
@StephenMcConnel reviewed 2 files and all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on @hatton).
This change is