Added an e2e test harness with a fake R701 device
Check, format and test / build (push) Successful in 47s
Check, format and test / build (push) Successful in 47s
tests/mock/mod.rs emulates the device's TCP protocol (ping, get_name, get_total_record_count, get_record_bytes), grounded in the reverse engineering notes at https://nicolabelluti.me/posts/2024/05/studying-a-communication-protocol/, so tests/e2e.rs can exercise the real R701 client against it instead of needing a physical reader. Starts with one test (connect + ping); more scenarios (get_name, record streaming, error cases) to follow. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Generated
+12
@@ -251,9 +251,21 @@ dependencies = [
|
||||
"mio",
|
||||
"pin-project-lite",
|
||||
"socket2",
|
||||
"tokio-macros",
|
||||
"windows-sys",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tokio-macros"
|
||||
version = "2.7.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6328af13490e73a9b4694030fafd93f8c8c6a9dede33e821c3fc63eddf8042ba"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "tokio-stream"
|
||||
version = "0.1.19"
|
||||
|
||||
Reference in New Issue
Block a user