test(domain/relay): write failing tests for RelayState serialization

Tests verify serialization and deserialization of RelayState enum with
"on" and "off" states. Red phase of TDD - tests define expected behavior
before implementation.

Ref: T019 (specs/001-modbus-relay-control/tasks.md)
This commit is contained in:
2026-01-03 22:41:28 +01:00
parent 4befafd0a5
commit 1f552dbaf8
3 changed files with 56 additions and 1 deletions

View File

@@ -218,7 +218,7 @@
- **File**: src/domain/relay.rs
- **Complexity**: Low | **Uncertainty**: Low
- [ ] **T019** [P] [US1] [TDD] Write tests for RelayState enum
- [x] **T019** [P] [US1] [TDD] Write tests for RelayState enum
- Test: RelayState::On → serializes to "on"
- Test: RelayState::Off → serializes to "off"
- Test: Parse "on"/"off" from strings