test: add comprehensive test coverage for modifiers, integration, ViewModel, and UI dialogs (Closes #108) #118

Merged
shahondin1624 merged 1 commits from feature/issue-108-test-coverage-gaps into main 2026-04-04 21:22:06 +02:00
Owner

Summary

  • Add ModifierSystemTest: cache LRU eviction, cache hits, modifier accumulation, type safety with multiple modifier types, accumulateModifiers for DiceRoll
  • Add IntegrationTest: attribute change -> damage monitor recalculation, derived attribute calculations, full character lifecycle, serialization round-trips preserving behavior
  • Add CharacterViewModelTest: save/load/error paths via DataLoader, character transformation patterns, round-trip persistence after modifications
  • Add EditDialogValidationTest: UI validation for AttributeEditDialog (boundary values, empty, out-of-range) and CharacterDataEditDialog (name, age, nuyen, essence, karma constraints)
  • Add Kover plugin for test coverage reporting with documentation in CLAUDE.md

Closes #108

Test plan

  • Run ./gradlew :sharedUI:allTests and verify all new tests pass
  • Run ./gradlew :sharedUI:koverHtmlReport and verify coverage report is generated
  • Verify modifier cache tests correctly validate LRU eviction at max size 5
  • Verify integration tests cover attribute -> damage monitor recalculation flow
  • Verify UI dialog tests validate both valid and invalid input states

🤖 Generated with Claude Code

## Summary - Add **ModifierSystemTest**: cache LRU eviction, cache hits, modifier accumulation, type safety with multiple modifier types, accumulateModifiers for DiceRoll - Add **IntegrationTest**: attribute change -> damage monitor recalculation, derived attribute calculations, full character lifecycle, serialization round-trips preserving behavior - Add **CharacterViewModelTest**: save/load/error paths via DataLoader, character transformation patterns, round-trip persistence after modifications - Add **EditDialogValidationTest**: UI validation for AttributeEditDialog (boundary values, empty, out-of-range) and CharacterDataEditDialog (name, age, nuyen, essence, karma constraints) - Add **Kover** plugin for test coverage reporting with documentation in CLAUDE.md Closes #108 ## Test plan - [ ] Run `./gradlew :sharedUI:allTests` and verify all new tests pass - [ ] Run `./gradlew :sharedUI:koverHtmlReport` and verify coverage report is generated - [ ] Verify modifier cache tests correctly validate LRU eviction at max size 5 - [ ] Verify integration tests cover attribute -> damage monitor recalculation flow - [ ] Verify UI dialog tests validate both valid and invalid input states 🤖 Generated with [Claude Code](https://claude.com/claude-code)
shahondin1624 added 1 commit 2026-04-04 21:21:59 +02:00
Add four new test files covering previously untested areas:
- ModifierSystemTest: cache LRU behavior, modifier accumulation, type safety
- IntegrationTest: attribute->damage monitor recalculation, derived values, serialization round-trips
- CharacterViewModelTest: save/load/error paths via DataLoader, character transforms
- EditDialogValidationTest: UI validation for AttributeEditDialog and CharacterDataEditDialog

Also adds Kover plugin for test coverage reporting and documents usage in CLAUDE.md.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
shahondin1624 merged commit fd8306b386 into main 2026-04-04 21:22:06 +02:00
shahondin1624 deleted branch feature/issue-108-test-coverage-gaps 2026-04-04 21:22:06 +02:00
Sign in to join this conversation.