Skip to content

[Unit Tests] Skill events, specialized ability attributes, and McRPGGainReason coverage#244

Open
DiamondDagger590 wants to merge 1 commit into
recodefrom
claude/brave-goldberg-0ajuzw
Open

[Unit Tests] Skill events, specialized ability attributes, and McRPGGainReason coverage#244
DiamondDagger590 wants to merge 1 commit into
recodefrom
claude/brave-goldberg-0ajuzw

Conversation

@DiamondDagger590

Copy link
Copy Markdown
Owner

Summary

  • SkillEventCoverageTest (43 tests): Covers all 7 skill event classes — SkillEvent base, SkillGainExpEvent, PostSkillGainExpEvent, SkillGainLevelEvent, PostSkillGainLevelEvent, SkillRegisterEvent, SkillUnregisterEvent. Tests constructor overloads (Skill vs NamespacedKey), experience/level clamping via Math.max(0, val), cancellation state, gain reason defaults, and handler list consistency.
  • SpecializedAbilityAttributeCoverageTest (56 tests): Covers 4 specialized AbilityAttribute implementations — AbilityLocationAttribute, RemoteTransferItemSetAttribute, MassHarvestPullItemsAttribute, AbilityUpgradeQuestAttribute. Tests shouldContentBeSaved() pass/fail branches, create(), convertContent(), serializeContent(), getDefaultContent(), display priority, database key names, namespaced keys, and error paths.
  • McRPGGainReasonTest (14 tests): Covers the McRPGGainReason enum using @ParameterizedTest/@EnumSource for key generation, display names, namespace verification, uniqueness, and GainReason interface implementation.

All 113 new tests pass. 12 pre-existing failures on the recode branch (InstantIrrigationTest, AbilityListenerManaTest, SkillListenerMaxLevelExperienceTest) are unrelated.

Test plan

  • All 3 new test files compile without errors
  • All 113 new tests pass via ./gradlew test
  • No regressions introduced (pre-existing failures unchanged)
  • Annotation ordering follows CLAUDE.md convention (@Test/@ParameterizedTest before @DisplayName)
  • @DisplayName uses short descriptive labels per CLAUDE.md
  • Method naming follows action_outcome_whenCondition convention

https://claude.ai/code/session_01NT6pXCUYxSWBPLR2V8Qgfw


Generated by Claude Code

…ainReason coverage

Add three new test files targeting previously untested areas:
- SkillEventCoverageTest: 43 tests for all 7 skill event classes
- SpecializedAbilityAttributeCoverageTest: 56 tests for 4 specialized attributes
- McRPGGainReasonTest: 14 tests for the gain reason enum

https://claude.ai/code/session_01NT6pXCUYxSWBPLR2V8Qgfw
@coderabbitai

coderabbitai Bot commented Jun 11, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@DiamondDagger590, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 43 minutes and 58 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more credits in the billing tab to continue.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 44d26d5a-c11e-44f7-841d-048362f6c5b2

📥 Commits

Reviewing files that changed from the base of the PR and between 9b47c9a and 61e684a.

📒 Files selected for processing (3)
  • src/test/java/us/eunoians/mcrpg/ability/attribute/SpecializedAbilityAttributeCoverageTest.java
  • src/test/java/us/eunoians/mcrpg/event/skill/SkillEventCoverageTest.java
  • src/test/java/us/eunoians/mcrpg/skill/experience/context/McRPGGainReasonTest.java
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/brave-goldberg-0ajuzw

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions

Copy link
Copy Markdown

Extensibility Review

Breaking change risk: NONE — this diff adds only test classes with no changes to production source code.

After a thorough review of all three files in this diff, every changed file resides under src/test/java/. No production classes, interfaces, events, registries, NamespacedKey constants, getDatabaseName() implementations, or public API surfaces are modified, added, or removed.

No extensibility concerns found.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants