refactor(tests): tighten ExceptionHandlerSetup.Collector to private#12
Conversation
Nothing outside ExceptionHandlerSetup needs the FakeLogCollector directly - the four `_setup.Logger.Collector.GetSnapshot()` call sites reach it via FakeLogger<T>'s own property, not the setup's redundant exposure. Marking it private keeps the test fixture's surface area honest. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Important Review skippedReview was skipped due to path filters ⛔ Files ignored due to path filters (1)
CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
There was a problem hiding this comment.
Pull request overview
Narrows the test fixture API surface by making ExceptionHandlerSetup.Collector private, since the tests already access log snapshots via FakeLogger<T>.Collector rather than through the setup object.
Changes:
- Changed
ExceptionHandlerSetup.Collectorfrompublictoprivatein the test fixture.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Sister to #12 ($ExceptionHandlerSetup.Collector). The only consumer is DisposeAsync inside the same private sealed class, so public access was unnecessary surface. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Summary
ExceptionHandlerSetup.Collectorwaspublicbut nothing outside the class needs it — the four_setup.Logger.Collector.GetSnapshot()call sites inExceptionHandlerTestsreach the collector viaFakeLogger<T>'s own property, not the setup's redundant exposure. Marking itprivatekeeps the test fixture's surface area honest.Test plan
_setup.Logger.Collector(i.e.,FakeLogger<T>.Collector), not_setup.CollectorBuild & Test (backend)green (no behavioural change, accessibility only)