Skip to content

[Unit Tests] RequireEmptyOffhandSetting, AbilityUpgradeRewardType, DistributionRewardEntry coverage#253

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

[Unit Tests] RequireEmptyOffhandSetting, AbilityUpgradeRewardType, DistributionRewardEntry coverage#253
DiamondDagger590 wants to merge 1 commit into
recodefrom
claude/brave-goldberg-dsmgwo

Conversation

@DiamondDagger590

Copy link
Copy Markdown
Owner

Summary

  • RequireEmptyOffhandSettingTest (18 tests): Covers linked-node cycling (ENABLED↔DISABLED, full cycle, all variants reachable), fromString round-trips (case-insensitive, mixed case, unknown/empty input), getSettingKey (expected key, shared across variants, constant match), onSettingChange (no-op smoke tests), and getExpansionKey presence.
  • AbilityUpgradeRewardTypeCoverageTest (22 tests): Covers fromSerializedConfig (ability+tier parsing, tier default, localization-route/display preservation, Number type handling, new instance creation), serializeConfig (base instance defaults, omission of empty display/null localization-route, inclusion when present, round-trip), withLocalizationRoute (new instance, field preservation), withInlineDisplayLabel (new instance, field preservation), withAmountMultiplier (returns same instance), getNumericAmount (empty for both base and configured), describeForDisplay no-arg (title-case formatting, single/multi-word ability names), getKey (configured instance preserves key), and getExpansionKey.
  • DistributionRewardEntryTest (17 tests): Covers canonical constructor validation (negative minScaledAmount, zero/negative topCount throw IllegalArgumentException, boundary valid case, field preservation), convenience constructor defaults (SCALE, DISCARD, 1, 1, null, reward reference), and resolveForPlayer (null fallback returns primary, fallback condition true returns fallback reward, fallback condition false returns primary).

Test plan

  • All 57 new tests pass via ./gradlew test
  • Full test suite passes (BUILD SUCCESSFUL, zero failures)
  • Testing audit persona (persona-testing.mdc) reviewed — actionable findings fixed (FQN in method body, misplaced @Nested grouping)
  • No regressions in existing tests

🤖 Generated with Claude Code

https://claude.ai/code/session_01AzKgFtvZy31o6AiyMZC1PT


Generated by Claude Code

…pe, and DistributionRewardEntry

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

coderabbitai Bot commented Jun 20, 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 23 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: d8cbddfd-7815-4d09-860b-e210ed2cf5ad

📥 Commits

Reviewing files that changed from the base of the PR and between 9b47c9a and 7ae1c4a.

📒 Files selected for processing (3)
  • src/test/java/us/eunoians/mcrpg/quest/board/distribution/DistributionRewardEntryTest.java
  • src/test/java/us/eunoians/mcrpg/quest/reward/builtin/AbilityUpgradeRewardTypeCoverageTest.java
  • src/test/java/us/eunoians/mcrpg/setting/impl/RequireEmptyOffhandSettingTest.java
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/brave-goldberg-dsmgwo

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