| Clean Architecture Toolkit for .NET | |||||
|
Clean Architecture Toolkit is a clean, modular architecture foundation for .NET applications. It embraces SOLID principles and focuses on maintainability, testability, and scalability through clear boundaries and pluggable design. |
|
||||
|
| HOME | REPO OVERVIEW | DEMO | CAT.UNITTESTING | |
|||||
A message sender for unit tests. It records the events that were published and the commands that were sent, in one list and in order. It sends nothing.
public class FakeMessageSender : Cat.Messaging.Abstractions.ICatMessageSenderInheritance System.Object → FakeMessageSender
Implements ICatMessageSender
| Properties | |
|---|---|
| Sent | Every message that was published or sent, in order. |
| Methods | |
|---|---|
| Of<T>() | Gives the messages of one type, in order. The type can be a message class, or ICatEventMessage or ICatCommandMessage. |
| PublishAsync(ICatEventMessage, Nullable<DateTimeOffset>, CancellationToken) | Publishes an event to its topic. |
| Reset() | Clears the recorded messages. |
| SendAsync(ICatCommandMessage, Nullable<DateTimeOffset>, CancellationToken) | Sends a command message to its queue. |