testing-cqrs-handlers
OfficialTest CQRS handlers with confidence and speed.
Software Engineering#testing#authorization#unit-testing#integration-testing#cqrs#reactive#event-emission
Authorfireflyframework
Version1.0.0
Installs0
System Documentation
What problem does it solve?
Writing robust tests for CQRS command and query handlers can be verbose and error-prone. This Skill guides you through unit tests using mocked buses, integration tests with authorization and validation, and event-emission checks to ensure handlers behave correctly.
Core Features & Use Cases
- Unit Testing Command Handlers: set up a mock ApplicationContext and verify command handling logic in isolation.
- Testing Query Handlers: validate query resolution and result translation with minimal dependencies.
- Mocking the Command Bus & Context Propagation: simulate bus interactions and ExecutionContext to exercise the full pipeline safely.
- Authorization & Validation Tests: ensure security and data integrity before business logic executes.
- Event Emission & EDA Tests: verify domain events are published when handlers succeed or are suppressed when not annotated.
- ExecutionContext Tests: exercise user/tenant context propagation, feature flags, and properties.
Quick Start
Create a unit test class for a CQRS handler and start by mocking the CommandBus and wiring a sample handler to verify basic command and event flows.
Dependency Matrix
Required Modules
None requiredComponents
Standard package💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: testing-cqrs-handlers Download link: https://github.com/fireflyframework/fireflyframework-claude-skills/archive/main.zip#testing-cqrs-handlers Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.