Class RecordingEventBundleOutboxDispatcher
- Namespace
- Stratara.Testing.EntityFrameworkCore
- Assembly
- Stratara.Testing.EntityFrameworkCore.dll
An IEventBundleOutboxDispatcher test double that records every dispatched bundle
instead of publishing to a broker. Lets tests assert which events the write side emitted on
SaveChangesAsync without standing up RabbitMQ or Azure Service Bus.
public sealed class RecordingEventBundleOutboxDispatcher : IEventBundleOutboxDispatcher
- Inheritance
-
RecordingEventBundleOutboxDispatcher
- Implements
- Inherited Members
- Extension Methods
Properties
Bundles
Every bundle handed to EnqueueEventBundleAsync(EventBundle, CancellationToken), in dispatch order.
public IReadOnlyList<EventBundle> Bundles { get; }
Property Value
Methods
EnqueueEventBundleAsync(EventBundle, CancellationToken)
Enqueue eventBundle for asynchronous dispatch.
public Task EnqueueEventBundleAsync(EventBundle eventBundle, CancellationToken cancellationToken = default)
Parameters
eventBundleEventBundlecancellationTokenCancellationToken
Returns
EnqueueOutboxEntriesAsync(IEnumerable<OutboxEntry>, CancellationToken)
Drain previously-persisted outboxEntries by attempting to
publish each one and deleting on success. Used by the outbox worker.
public Task EnqueueOutboxEntriesAsync(IEnumerable<OutboxEntry> outboxEntries, CancellationToken cancellationToken = default)
Parameters
outboxEntriesIEnumerable<OutboxEntry>cancellationTokenCancellationToken