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:
2026-01-11 00:59:58 +01:00
parent 306fa38935
commit 8c1d5433de
5 changed files with 468 additions and 1 deletions

View File

@@ -6,5 +6,9 @@
/// Mock repository implementation for testing.
pub mod label_repository;
/// Comprehensive tests for `RelayLabelRepository` trait contract (T035).
#[cfg(test)]
pub mod label_repository_tests;
/// `SQLite` repository implementation for relay labels.
pub mod sqlite_repository;