Skip to content

[Unit Tests] McRPGContentPack, QuestSource builtins, objective type processProgress coverage#252

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

[Unit Tests] McRPGContentPack, QuestSource builtins, objective type processProgress coverage#252
DiamondDagger590 wants to merge 1 commit into
recodefrom
claude/brave-goldberg-sevf6k

Conversation

@DiamondDagger590

Copy link
Copy Markdown
Owner

Summary

  • McRPGContentPackTest (10 tests): Covers the abstract McRPGContentPack base class — getContentExpansion(), getContent() (empty, immutable, defensive copy), and addContent() (single, multiple, duplicate dedup, retrievable). Pure JUnit, no MockBukkit needed.

  • QuestSourceBuiltinCoverageTest (19 tests): Covers all 4 built-in quest sources (AbilityUpgradeQuestSource, BoardPersonalQuestSource, BoardLandQuestSource, ManualQuestSource). Tests key values, namespace, isAbandonable() behavior, expansion key presence, and cross-source key uniqueness.

  • ObjectiveTypeProcessProgressTest (21 tests): Covers processProgress() for DamageTakenObjectiveType (wrong context, zero/negative damage, rounding, unconfigured any-cause, configured matching/non-matching causes), BlockPlaceObjectiveType (wrong context, unconfigured any-block), ConsumeItemObjectiveType (wrong context, unconfigured any-item), and CraftItemObjectiveType (wrong context, normal click, multi-amount result, shift-click matrix computation, min-slot logic, empty-matrix fallback). Also covers DamageTakenObjectiveType.parseConfig() (missing key, cause filtering, case-insensitivity, key preservation).

All 3 target areas were previously at 0% or ~12% coverage. Full test suite passes with zero failures.

Test plan

  • ./gradlew test passes with all new and existing tests green
  • Self-audited against persona-testing.mdc checklist
  • Test naming follows CLAUDE.md conventions (action_outcome_whenCondition, short @DisplayName labels)
  • McRPGBaseTest used only where Bukkit/MockBukkit interaction is needed
  • No duplicate work with existing open test PRs

🤖 Generated with Claude Code

https://claude.ai/code/session_01CcRBzccGuEq2yiXvmmz872


Generated by Claude Code

…rocessProgress coverage

Add unit tests for three previously uncovered areas:

- McRPGContentPackTest: 10 tests covering getContentExpansion, getContent
  (empty, immutable, defensive copy), and addContent (single, multiple,
  duplicate, retrievable)

- QuestSourceBuiltinCoverageTest: 19 tests covering all 4 built-in quest
  sources (AbilityUpgrade, BoardPersonal, BoardLand, Manual) with key
  validation, abandonable behavior, expansion key checks, and cross-source
  key uniqueness

- ObjectiveTypeProcessProgressTest: 21 tests covering processProgress for
  DamageTaken (zero/negative/rounding/configured causes), BlockPlace,
  ConsumeItem, and CraftItem (normal click, shift click matrix computation,
  empty matrix fallback) plus DamageTaken parseConfig validation

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CcRBzccGuEq2yiXvmmz872
@coderabbitai

coderabbitai Bot commented Jun 19, 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 49 minutes and 12 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.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits.

🚦 How do rate limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan refill rate.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, the refill rate gradually slows as usage increases. The highest same-day bursts are limited more strictly.

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: 891dcd86-33e6-4705-bb0d-439e67f046f2

📥 Commits

Reviewing files that changed from the base of the PR and between 9b47c9a and 030a590.

📒 Files selected for processing (3)
  • src/test/java/us/eunoians/mcrpg/expansion/content/McRPGContentPackTest.java
  • src/test/java/us/eunoians/mcrpg/quest/objective/type/builtin/ObjectiveTypeProcessProgressTest.java
  • src/test/java/us/eunoians/mcrpg/quest/source/builtin/QuestSourceBuiltinCoverageTest.java
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/brave-goldberg-sevf6k

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