Skip to main content

Module mock

Module mock 

Source
Expand description

Mock implementation that combines both publish/subscribe and request/response patterns for unit testing without a NATS server.

Structsยง

MockBus
Combined in-memory message bus for unit tests.
MockPublisher
In-memory Publisher for use in unit tests.
MockReceivedCommand
Mock implementation of ReceivedCommand for unit tests.
MockReceivedEvent
A received event wrapper for use in unit tests.
MockSubscriber
Helper for creating test event streams.
ReplyChecker
Receives the reply captured by a MockReceivedCommand.