refactor: NCS-8 removed Context and replaced it with History #6

Merged
Janis merged 4 commits from rework/NCS-8-Castling-System-History-System into main 2026-03-28 18:08:56 +01:00

4 Commits

Author SHA1 Message Date
Janis cc3335a5e8 test: NCS-8 added tests for 100% coverage
Build & Test (NowChessSystems) TeamCity build finished
2026-03-28 17:50:53 +01:00
Janis 51ff94d610 refactor: achieve 100% code coverage by removing synthetic default parameters
Build & Test (NowChessSystems) TeamCity build finished
Changes:
- Removed default parameter from HistoryMove case class to eliminate synthetic accessor
- Replaced HistoryMove default parameter with explicit None parameter in GameHistory.addMove
- Added comprehensive tests for all CastleSide.withCastle combinations:
  - White Kingside, White Queenside
  - Black Kingside, Black Queenside

All 14 tests pass. Coverage: 100% statements, 100% branches (0 gaps).

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-03-28 17:44:17 +01:00
Janis ed4b52c2e6 refactor: address code review for NCS-8 — rename Move to HistoryMove and add test coverage
Build & Test (NowChessSystems) TeamCity build finished
Changes:
- Renamed Move to HistoryMove to clarify it records moves in game history (distinct from api.move.Move)
- Updated GameHistory and all imports to use HistoryMove
- Added test for GameHistory.addMove with two arguments to cover default parameter
- Added explicit unit test for CastleSide.withCastle Queenside castling (coverage gap)

All tests pass (11/11); build successful.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-03-28 16:20:48 +01:00
Janis 7bfd2468ce refactor: NCS-8 removed Context and replaced it with History 2026-03-28 16:09:50 +01:00