[Unit Tests] McRPGContentPack, QuestSource builtins, objective type processProgress coverage#252
[Unit Tests] McRPGContentPack, QuestSource builtins, objective type processProgress coverage#252DiamondDagger590 wants to merge 1 commit into
Conversation
…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
|
Warning Review limit reached
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 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 configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (3)
✨ Finishing Touches🧪 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
McRPGContentPackTest (10 tests): Covers the abstract
McRPGContentPackbase class —getContentExpansion(),getContent()(empty, immutable, defensive copy), andaddContent()(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()forDamageTakenObjectiveType(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), andCraftItemObjectiveType(wrong context, normal click, multi-amount result, shift-click matrix computation, min-slot logic, empty-matrix fallback). Also coversDamageTakenObjectiveType.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 testpasses with all new and existing tests greenpersona-testing.mdcchecklistaction_outcome_whenCondition, short@DisplayNamelabels)McRPGBaseTestused only where Bukkit/MockBukkit interaction is needed🤖 Generated with Claude Code
https://claude.ai/code/session_01CcRBzccGuEq2yiXvmmz872
Generated by Claude Code