Repository navigation
Move Test Fixtures onto Shared FakeTools Helpers - #1126
Conversation
Sidecar rename tests use WriteSampleToolData, and tests that seeded State by re-parsing the sidecar pass the state to CopyUnverifiedSample instead. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 28 minutes. View limit details
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. |
|
A recorded local strict-review pass covers head |
PR Summary by QodoUse shared FakeTools helpers for test fixtures
AI Description
Diagram
High-Level Assessment
Files changed (3)
|
Code Review by Qodo🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)
Great, no issues found!Qodo reviewed your code and found no material issues that require reviewTip of the day💡 Did you know, you can keep summaries lean with Findings visible per group, which tucks the rest behind a View link |
There was a problem hiding this comment.
🟢 Approval recommended
The reviewed changes are confined to test code that routes state seeding through shared FakeTools helpers while keeping every test's assertions unchanged, and no active issues were found in them.
No open issues 🎉
What changed in this PR
This PR finishes moving the test classes onto the shared FakeTools helpers in PlexCleanerTests/FakeTools.cs. Each test now seeds its sidecar State through the new state parameter of FakeTools.CopyUnverifiedSample, and the sample tool data fakes are written by FakeTools.WriteSampleToolData. The change touches test code only, with no production changes. Each test keeps its assertions.
Changes:
- Seeds
Statethrough thestateparameter ofFakeTools.CopyUnverifiedSamplein the verify-error and scan tests, instead of re-parsing and rewriting the sidecar. - Replaces the inline sample-data fake setup in the sidecar rename test with
FakeTools.WriteSampleToolData. - Removes usings left unused by these changes.
| File | Description |
|---|---|
| PlexCleanerTests/VerifyToolErrorTests.cs | Seeds State through CopyUnverifiedSample. Removes the unused System.Text.Json.Nodes using. |
| PlexCleanerTests/SidecarRenameStateTests.cs | Seeds State through CopyUnverifiedSample and uses WriteSampleToolData for the sample tool fakes. Removes the unused ptr727.Utilities using. |
| PlexCleanerTests/ScanStateTests.cs | Seeds State through CopyUnverifiedSample. Removes the unused System.Text.Json.Nodes using. |
Review effort: Lite
Move the remaining test sites onto the shared
FakeToolshelpers added earlier.SidecarRenameStateTestswrites its sample tool data fakes withFakeTools.WriteSampleToolData.SidecarRenameStateTests,ScanStateTests, andVerifyToolErrorTestsseedStatethrough thestateparameter ofFakeTools.CopyUnverifiedSampleinstead of re-parsing the sidecar.Closes on promotion: #1124
🤖 Generated with Claude Code