Skip to content

[Unit Tests] ItemRewardType, CommandRewardType, ScalableCommandRewardType, QuestRarity coverage#249

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

[Unit Tests] ItemRewardType, CommandRewardType, ScalableCommandRewardType, QuestRarity coverage#249
DiamondDagger590 wants to merge 1 commit into
recodefrom
claude/brave-goldberg-fb0xql

Conversation

@DiamondDagger590

Copy link
Copy Markdown
Owner

Summary

  • Adds 76 new unit tests across 4 test files targeting quest reward types and quest rarity classes
  • ItemRewardTypeCoverageTest (30 tests): Covers fromSerializedConfig (top-level/nested/default amounts, display, localization, edge cases), serializeConfig round-trips, withAmountMultiplier (scaling, minimum enforcement, immutability), withLocalizationRoute, withInlineDisplayLabel, describeForDisplay (material formatting), getNumericAmount, and grant (inventory verification, empty/zero/nested configs)
  • CommandRewardTypeCoverageTest (15 tests): Covers fromSerializedConfig (display, missing commands, non-list commands, round-trip), withInlineDisplayLabel, describeForDisplay ("Special Reward" fallback), serializeConfig, grant (player placeholder, multiple commands, empty list), getNumericAmount, withAmountMultiplier
  • ScalableCommandRewardTypeCoverageTest (20 tests): Covers key/expansion, fromSerializedConfig (display, Integer type, defaults, round-trip), withInlineDisplayLabel, describeForDisplay (label+amount suffix), serializeConfig, grant (placeholder replacement, empty command, default instance), withAmountMultiplier (preserves label/command), withLocalizationRoute
  • QuestRarityCoverageTest (11 tests): Covers configureIcon all 3 branches (null section, section with material, section without material using real YamlDocument sections), QuestRarityRegistry advanced coverage (registered checks, getAll, register replaces, rollRarity weight distribution with seeded Random, clear, get empty, immutable keys)

Test plan

  • All 76 new tests pass
  • Full test suite passes (2371 tests, 0 failures)
  • ./gradlew verifiedShadowJar BUILD SUCCESSFUL
  • Tests extend McRPGBaseTest where Bukkit interaction is needed
  • No Mockito mocking of Bukkit classes — uses MockBukkit implementations
  • @Test before @DisplayName ordering followed
  • Method names follow action_outcome_whenCondition convention
  • Test files mirror production source package structure

https://claude.ai/code/session_014hgvFw6xUfgwM2CpENPphe


Generated by Claude Code

…Type, QuestRarity coverage

Add 76 new unit tests across 4 coverage test files:
- ItemRewardTypeCoverageTest (30 tests): fromSerializedConfig, grant,
  withAmountMultiplier, describeForDisplay, serializeConfig round-trips
- CommandRewardTypeCoverageTest (15 tests): fromSerializedConfig, grant,
  withInlineDisplayLabel, describeForDisplay, serializeConfig
- ScalableCommandRewardTypeCoverageTest (20 tests): fromSerializedConfig,
  grant with placeholder replacement, withAmountMultiplier, describeForDisplay
- QuestRarityCoverageTest (11 tests): configureIcon all 3 branches,
  QuestRarityRegistry advanced coverage including rollRarity weight distribution

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

coderabbitai Bot commented Jun 16, 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 48 minutes and 40 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ 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: 2f236de2-d29c-4e06-bec2-e9074622b477

📥 Commits

Reviewing files that changed from the base of the PR and between 9b47c9a and 887e991.

📒 Files selected for processing (4)
  • src/test/java/us/eunoians/mcrpg/quest/board/rarity/QuestRarityCoverageTest.java
  • src/test/java/us/eunoians/mcrpg/quest/reward/builtin/CommandRewardTypeCoverageTest.java
  • src/test/java/us/eunoians/mcrpg/quest/reward/builtin/ItemRewardTypeCoverageTest.java
  • src/test/java/us/eunoians/mcrpg/quest/reward/builtin/ScalableCommandRewardTypeCoverageTest.java
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/brave-goldberg-fb0xql

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.

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