test(domain): write failing tests for RelayId newtype validation
Tests cover validation requirements for the RelayId newtype: - Valid relay IDs (1-8 for 8-channel controller) - Invalid IDs outside valid range - Smart constructor error handling - Type-safe ID representation TDD red phase: Tests fail until RelayId is implemented. Ref: T017 (specs/001-modbus-relay-control/tasks.md)
This commit is contained in:
@@ -202,7 +202,7 @@
|
||||
|
||||
**⚠️ TDD CRITICAL**: Write failing tests FIRST for every type, then implement
|
||||
|
||||
- [ ] **T017** [US1] [TDD] Write tests for RelayId newtype
|
||||
- [x] **T017** [US1] [TDD] Write tests for RelayId newtype
|
||||
- Test: RelayId::new(1) → Ok(RelayId(1))
|
||||
- Test: RelayId::new(8) → Ok(RelayId(8))
|
||||
- Test: RelayId::new(0) → Err(InvalidRelayId)
|
||||
|
||||
Reference in New Issue
Block a user