test(domain): write failing tests for Relay aggregate
Created test suite for Relay entity covering construction, state toggling, and explicit state control methods. Tests intentionally fail as Relay struct is not yet implemented. Tests cover: - Relay::new() with id, state, and optional label - toggle() flipping state between On/Off - turn_on() setting state to On - turn_off() setting state to Off TDD phase: RED - Tests written, implementation pending (T022) Ref: T021 (specs/001-modbus-relay-control/tasks.md)
This commit is contained in:
@@ -231,7 +231,7 @@
|
||||
- **File**: src/domain/relay.rs
|
||||
- **Complexity**: Low | **Uncertainty**: Low
|
||||
|
||||
- [ ] **T021** [US1] [TDD] Write tests for Relay aggregate
|
||||
- [x] **T021** [US1] [TDD] Write tests for Relay aggregate
|
||||
- Test: Relay::new(RelayId(1), RelayState::Off, None) creates relay
|
||||
- Test: relay.toggle() flips state
|
||||
- Test: relay.turn_on() sets state to On
|
||||
|
||||
Reference in New Issue
Block a user