Repository navigation
[Tests] Add unit tests for CommandRegistrar and CoreCommandManager, improve DAO updateTable edge cases - #126
DiamondDagger590 wants to merge 1 commit into
Conversation
…AO updateTable edge cases - Add CommandRegistrarTest: verifies CoreCommandManager registration in ManagerRegistry, plugin passthrough, and duplicate registration guard - Add CoreCommandManagerTest: covers constructor, getters, confirmation manager registration/retrieval, and double-registration/unregistered IllegalStateException paths (0% → 100% branch coverage) - Add MutexDAO updateTable test for version above current - Add PlayerSettingDAO updateTable test for version above current - Add missing `never()` import to PlayerSettingDAOTest Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SSnBQANZdTxssxLVi5Fs3T
|
Claude finished @DiamondDagger590's task in 2m 2s —— View job Claude PR Review
|
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: DiamondDagger590/McCore/.coderabbit.yaml Review profile: QUIET Plan: Advanced Run ID: 📒 Files selected for processing (4)
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe pull request adds tests for command registration and ChangesCommand Manager Tests
DAO Table-Version Tests
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Other Merge Risk: ⚪ Minimal · up to The added command-manager and DAO tests present no identified merge-blocking issue. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 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 |

Summary
register()correctly creates aCoreCommandManager, passes the plugin from theBootstrapContext, registers it inManagerRegistry, and throwsIllegalArgumentExceptionon duplicate registration. UsesmockConstructionto interceptCoreCommandManagerconstruction (which requires Paper runtime).getCommandManager(),getAnnotationParser(),plugin(),registerConfirmationCommand(), andgetConfirmationManager(). Covers theIllegalStateExceptionpaths for both double-registration and unregistered-access. UsesMockedStatic<PaperCommandManager>+MockedConstruction<AnnotationParser>to construct a real instance without Paper runtime. CoreCommandManager coverage: 20% → 100% line, 0% → 100% branch.updateTable_performsNoUpdate_whenVersionIsAboveCurrentedge case test (version 5 >CURRENT_TABLE_VERSION).updateTable_performsNoUpdate_whenVersionIsAboveCurrentedge case and missingnever()static import.Coverage Impact
CommandRegistrarCoreCommandManagerTest Plan
CommandRegistrarTesttests passCoreCommandManagerTesttests passMutexDAOTesttests pass (17 total)PlayerSettingDAOTesttests pass./gradlew clean test)🤖 Generated with Claude Code
https://claude.ai/code/session_01SSnBQANZdTxssxLVi5Fs3T
Generated by Claude Code
Summary by CodeRabbit