test(infrastructure): write RelayLabelRepository trait tests
Add reusable test suite with 18 test functions covering get_label(), save_label(), delete_label(), and get_all_labels() methods. Tests verify contract compliance for any repository implementation. Added delete_label() method to trait interface and implemented it in MockRelayLabelRepository to support complete CRUD operations. TDD phase: RED - Tests written before SQLite implementation (T036) Ref: T035 (specs/001-modbus-relay-control/tasks.md)
This commit is contained in:
@@ -531,7 +531,7 @@
|
||||
- **Complexity**: Medium | **Uncertainty**: High
|
||||
- **Note**: Use #[ignore] attribute, run with `cargo test -- --ignored`
|
||||
|
||||
- [ ] **T035** [P] [US4] [TDD] Write tests for RelayLabelRepository trait
|
||||
- [x] **T035** [P] [US4] [TDD] Write tests for RelayLabelRepository trait
|
||||
- Test: `get_label(RelayId(1)) → Option<RelayLabel>`
|
||||
- Test: `set_label(RelayId(1), label) → Result<(), RepositoryError>`
|
||||
- Test: `delete_label(RelayId(1)) → Result<(), RepositoryError>`
|
||||
|
||||
Reference in New Issue
Block a user