aggregate-testing
CommunityGenerate robust tests for event-sourced aggregates
AuthorFaysilAlshareef
Version1.0.0
Installs0
System Documentation
What problem does it solve?
This skill provides patterns and best practices to reliably test event-sourced aggregates in .NET projects, reducing brittle tests and manual setup when events have private constructors or complex nested data.
Core Features & Use Cases
- Constructor bypassing: Use a CustomConstructorFaker pattern to instantiate event and data types without invoking primary constructors.
- Deterministic fakers: Create event and event-data fakers that populate metadata and nested properties for repeatable test scenarios.
- Assertion extensions and integration helpers: Field-by-field assertions between protobuf requests and persisted events, plus DbContextHelper and GrpcClientHelper to validate database persistence and outbox messaging in integration tests.
- Use Case: Add comprehensive tests for create and update commands that verify event sequences, outbox messages, and correct exception handling for duplicates or invalid operations.
Quick Start
Create an integration test that uses a CustomConstructorFaker to generate an OrderCreated event, sends the corresponding gRPC command via GrpcClientHelper, and asserts persisted events and outbox messages with the provided assertion extensions.
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: aggregate-testing Download link: https://github.com/FaysilAlshareef/dotnet-ai-kit/archive/main.zip#aggregate-testing 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 471,000+ vetted skills library on demand.