First-class test helpers for asserting which events were published, with what attributes, and in what order.
The problem today: Deveel.Events.TestPublisher provides a basic in-memory publisher, but there are no assertion helpers, no subscription testing support, and no way to assert negative cases (event was not published).
What we will build: A rich EventPublisherAssertions API (compatible with xUnit, NUnit, and MSTest) offering fluent assertions such as AssertPublished<TEvent>(), AssertPublishedWith(e => e.Source == ...), AssertPublishedInOrder(...), and AssertNotPublished<TEvent>(). An in-memory event bus will allow integration tests to exercise full publish-subscribe round trips without a real broker.
Benefits:
- Makes event-driven behaviour a first-class testable concern alongside the domain model.
- Fluent assertion API dramatically reduces test boilerplate.
- The in-memory bus enables full-stack integration tests that run in milliseconds, without Docker or a real broker.
- Negative assertions catch regressions where a previously emitted event is accidentally removed.
The problem today:
Deveel.Events.TestPublisherprovides a basic in-memory publisher, but there are no assertion helpers, no subscription testing support, and no way to assert negative cases (event was not published).What we will build: A rich
EventPublisherAssertionsAPI (compatible with xUnit, NUnit, and MSTest) offering fluent assertions such asAssertPublished<TEvent>(),AssertPublishedWith(e => e.Source == ...),AssertPublishedInOrder(...), andAssertNotPublished<TEvent>(). An in-memory event bus will allow integration tests to exercise full publish-subscribe round trips without a real broker.Benefits: