40086a331f
**TerminalUI Coverage Fix:** - Added explicit test for empty input case (lines 64-65 previously uncovered) - Test "TerminalUI should explicitly handle empty input by re-prompting" validates that multiple empty inputs are properly handled by re-prompting - UI module coverage improved to near-100% **MoveCommand Immutability (Anti-pattern Fix):** - Changed MoveCommand fields from var to val: moveResult, previousBoard, previousHistory, previousTurn - Changed ResetCommand fields from var to val: previousBoard, previousHistory, previousTurn - Updated GameEngine to use .copy() instead of direct mutation when updating command state (lines 88, 95, 103, 112) - Removed 3 edge-case tests that relied on command mutation (now impossible with immutable fields) **MoveCommand Immutability Tests:** - Added MoveCommandImmutabilityTest to verify: - Fields cannot be mutated after creation - equals/hashCode respect immutability invariant - .copy() creates new instances with updated values All tests pass; 100% core coverage maintained. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
17 lines
895 B
XML
17 lines
895 B
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<project version="4">
|
|
<component name="ScalaCompilerConfiguration">
|
|
<profile name="Gradle 1" modules="NowChessSystems.modules.api.main,NowChessSystems.modules.api.scoverage,NowChessSystems.modules.api.test">
|
|
<option name="deprecationWarnings" value="true" />
|
|
<option name="uncheckedWarnings" value="true" />
|
|
</profile>
|
|
<profile name="Gradle 2" modules="NowChessSystems.modules.core.main,NowChessSystems.modules.core.scoverage,NowChessSystems.modules.core.test,NowChessSystems.modules.ui.main,NowChessSystems.modules.ui.scoverage,NowChessSystems.modules.ui.test">
|
|
<option name="deprecationWarnings" value="true" />
|
|
<option name="uncheckedWarnings" value="true" />
|
|
<parameters>
|
|
<parameter value="-encoding" />
|
|
<parameter value="UTF-8" />
|
|
</parameters>
|
|
</profile>
|
|
</component>
|
|
</project> |