Skip to content

test: add characterization tests for damage, wearer-tracking, warp, XP, potion, set-detection, and messaging logic#12

Merged
nbdSteve merged 1 commit into
masterfrom
fm/armorplus-4a-chartests-x2
Jul 9, 2026
Merged

test: add characterization tests for damage, wearer-tracking, warp, XP, potion, set-detection, and messaging logic#12
nbdSteve merged 1 commit into
masterfrom
fm/armorplus-4a-chartests-x2

Conversation

@nbdSteve

@nbdSteve nbdSteve commented Jul 9, 2026

Copy link
Copy Markdown
Owner

What Changed

Adds 72 regression tests (8 new test classes) pinning current behavior of Bukkit-integrated classes via Mockito:

Test class Count What it covers
HandSetDataTest 15 calculateFinalDamage pure math, hitWithoutSetBuff
BasicSetDataTest 12 onHit/onDamage damage calc and knockback
SetPlayerManagerTest 9 add/remove/isWearing state transitions, getPiecesWearing
SetIsWearingTest 9 Set.isWearingSet/verifyPiece via MockedConstruction<NBTItem>
SetStatusEffectsManagerTest 6 potionCheck amplifier comparison logic
WarpUtilTest 5 isSafe three-block safety check
ExperienceSetDataTest 6 onTargetDeath XP multiplier math
MessageTypeTest + CommandDebugTest 10 Placeholder substitution and colorize integration

Also adds -Dnet.bytebuddy.experimental=true to surefire <argLine> - required for Mockito's ByteBuddy on JDK 25.

Risk

Low. Zero production code changes (src/main/** untouched). Only adds test files, updates AGENTS.md, and modifies pom.xml surefire config.

Testing

$ JAVA_HOME=<jdk25> mvn -B clean verify
Tests run: 115, Failures: 0, Errors: 0, Skipped: 0
All coverage checks have been met.
BUILD SUCCESS

Existing 100% core gate on PlayerDirectionUtil, ColorUtil, Piece, SetType, SetDataType still passes.
Bytecode confirmed at Java 8 (major version 52).

…P, potion, set-detection, and messaging logic

Regression tests pinning current behavior of Bukkit-integrated classes:
- HandSetDataTest (15) - calculateFinalDamage pure math, hitWithoutSetBuff
- BasicSetDataTest (12) - onHit/onDamage damage calc and knockback
- SetPlayerManagerTest (9) - add/remove/isWearing state, getPiecesWearing
- SetIsWearingTest (9) - Set.isWearingSet/verifyPiece via MockedConstruction<NBTItem>
- SetStatusEffectsManagerTest (6) - potionCheck amplifier logic
- WarpUtilTest (5) - isSafe three-block safety check
- ExperienceSetDataTest (6) - onTargetDeath XP multiplier
- MessageTypeTest + CommandDebugTest (10) - placeholder substitution

Build: adds -Dnet.bytebuddy.experimental=true to surefire argLine
(required for Mockito on JDK 25). Zero production code changes.
@nbdSteve
nbdSteve force-pushed the fm/armorplus-4a-chartests-x2 branch from 5e64ef5 to daa946c Compare July 9, 2026 05:47
@nbdSteve nbdSteve changed the title test: add characterization tests pinning current behavior for rearch safety net (Phase 4A) test: add characterization tests for damage, wearer-tracking, warp, XP, potion, set-detection, and messaging logic Jul 9, 2026
@sonarqubecloud

sonarqubecloud Bot commented Jul 9, 2026

Copy link
Copy Markdown

@nbdSteve
nbdSteve merged commit 7543993 into master Jul 9, 2026
2 checks passed
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.

1 participant