nysiris-testkit
In-memory transport and fixtures for tests that use the Nysiris-Core chat crates. Nothing here touches the network, Nym, or the filesystem unless your test asks it to.
Install
[]
= "0.1"
What you get
MemoryTransport— aTransportimplementation that records what was sent.sent()— inspect recordedSentPayloads without consuming them.take()— drain the recorded sends, which is how a test plays the other side of a conversation.len()andis_empty()— quick assertions on delivery counts.
MemoryTransport is cheap to clone and share through Arc<dyn Transport>, so
two ChatEngines can be wired together in a single test. Because it never
drops or reorders, it models an ideal network; ack and retry behaviour has to be
tested separately.
Example
use Transport;
use MemoryTransport;
Security
Test-only code. Do not use MemoryTransport outside tests or examples. See
SECURITY.md
for the repository's reporting process.
License
Apache-2.0. See LICENSE.