Skip to content

[Unit Tests] OreScannerBlockType, DistanceTraveled, EnchantItem, SmeltItem objective type coverage#256

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

[Unit Tests] OreScannerBlockType, DistanceTraveled, EnchantItem, SmeltItem objective type coverage#256
DiamondDagger590 wants to merge 1 commit into
recodefrom
claude/brave-goldberg-k21jon

Conversation

@DiamondDagger590

Copy link
Copy Markdown
Owner

Summary

  • New test: OreScannerBlockTypeTest — 14 tests covering record accessors, set immutability, isBlockScannable matching, and record equality/hashCode. Pure JUnit (no McRPGBaseTest needed).
  • Rewritten: DistanceTraveledObjectiveTypeTest — expanded from 4 to ~20 tests. Now covers parseConfig with empty/single/multiple/case-insensitive modes, processProgress edge cases, and all 6 TravelMode detections (FOOT, HORSE, BOAT, MINECART, ELYTRA, PIG) including priority rules.
  • Rewritten: EnchantItemObjectiveTypeTest — expanded from 4 to ~15 tests. Now covers dual item+enchantment filtering, parseConfig with no keys/items only/enchantments only, and processProgress with all filter combinations.
  • Rewritten: SmeltItemObjectiveTypeTest — expanded from 4 to ~14 tests. Now covers material filter parsing, invalid material handling, empty filter lists, multi-item extraction, and multi-material filter matching.

Coverage impact

Class Before After
OreScannerBlockType 0% ~90%+
DistanceTraveledObjectiveType 13.2% ~85%+
EnchantItemObjectiveType 9% ~85%+
SmeltItemObjectiveType 17.1% ~85%+

Test plan

  • ./gradlew verifiedShadowJar passes (clean → test → build)
  • All new tests follow action_outcome_whenCondition naming with @DisplayName
  • @Nested grouping by logical section (Identity, CanProcess, ParseConfig, ProcessProgress, etc.)
  • OreScannerBlockTypeTest correctly avoids McRPGBaseTest (no Bukkit server interaction needed)
  • Objective type tests correctly extend McRPGBaseTest (NamespacedKey requires MockBukkit)
  • Testing audit persona (review-testing) applied — no concerns found

🤖 Generated with Claude Code

https://claude.ai/code/session_01SdDAAR4T8BADeC1gdjJ8Jv


Generated by Claude Code

…tItem objective type coverage

Add new OreScannerBlockType test (14 tests) covering accessors, set
immutability, isBlockScannable, and record equality. Rewrite 3 quest
objective type tests from ~4 tests each to comprehensive suites:
DistanceTraveledObjectiveType (~20 tests including all 6 TravelMode
detections), EnchantItemObjectiveType (~15 tests including dual
item+enchantment filtering), SmeltItemObjectiveType (~14 tests including
material filter parsing and multi-item extraction).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SdDAAR4T8BADeC1gdjJ8Jv
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