Command to Event specification
✓ Published0🌍 Public
RRestuta
Last edited Oct 23, 2012
Created on Oct 23, 2012
This example demonstrates a command-to-event specification using the GoldMine CQRS framework, showing how a `CreateTaskCommand` sent through a `CommandBus` results in a single `TaskCreatedEvent`. The code relies on `Machine.Specifications` (MSpec) to define the behavioral test, using `Because` to trigger the command and `It` to assert that the `EventStore` contains exactly one matching event. It pairs `GoldMine.Core.Commands` and `GoldMine.Core.CommandHandlers` with an in-memory CQRS runtime, highlighting a test-driven verification of domain event generation. The rendering approach is purely code-based, with no visual output shown.
AI-generated description