Commit Graph

2 Commits

Author SHA1 Message Date
Cal Corum
b10ecbf733 Add unit tests for pack system
Add comprehensive test coverage for CardPack, PackSlot, DefaultPackSlots,
and PackParser classes. Tests verify TypeID generation, slot weight
configurations, file parsing with various formats, and default pack creation.

Test coverage:
- CardPack: GenerateTypeID consistency and uniqueness
- PackSlot: Default values, rarity/card weight population
- DefaultPackSlots: Slot weight distributions, GetDefaultSlots
- PackParser: File parsing, multiple packs/slots, card-specific weights

Total: 60 tests (29 existing + 31 new)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-19 22:12:54 -06:00
Cal Corum
8d23f152eb Add unit testing framework and refactor parsing logic
- Created TradingCardMod.Tests.csproj with xUnit for testable components
- Extracted CardParser.cs with pure parsing logic (no Unity deps)
- Extracted TradingCard.cs data class from ModBehaviour
- Added 37 unit tests covering parsing, validation, rarity mapping
- Updated cards.txt format with optional description field
- Fixed DLL references (explicit HintPath for paths with spaces)
- Fixed Harmony UnpatchAll API usage
- Updated CLAUDE.md with test commands and current project status

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-18 19:40:43 -06:00