Expand description
Mock implementation that combines both publish/subscribe and request/response patterns for unit testing without a NATS server.
ModulesΒ§
- command π
- Mock implementations of
RequesterandResponderfor unit testing without a NATS server. - event π
- Mock implementations of
PublisherandSubscriberfor unit testing without a NATS server.
StructsΒ§
- MockBus
- Combined in-memory message bus for unit tests.
- Mock
Publisher - In-memory
Publisherfor use in unit tests. - Mock
Received Command - Mock implementation of
ReceivedCommandfor unit tests. - Mock
Received Event - A received event wrapper for use in unit tests.
- Mock
Subscriber - Helper for creating test event streams.
- Reply
Checker - Receives the reply captured by a
MockReceivedCommand.
Type AliasesΒ§
- Mock
Command πPayload - A received commandβs payload paired with the channel its reply must be sent back on.
- Mock
Published πMessages - A List of messages represented as a tuple of an identifier and the bytes.
- Mock
Responder πHash Map - A map of command responders grouped by the command subject pattern they serve.
- Mock
Sender πHash Map - A map of senders grouped by the emitting type of the sender.