Generates C# backend unit and integration tests for EF Core DbContext repositories, domain services, and vertical slice handlers using xUnit / NUnit. Use when the user asks to "write unit tests for C#", "test ef core context", "write integration tests for dotnet", or mentions xUnit backend tests.
72
89%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Passed
No findings from the security scan
Generate unit and integration tests for non-UI C# code (EF Core DbContext, handlers, domain logic) using xUnit and in-memory or SQLite EF Core test contexts.
A diff of the specification change may follow the file path in the arguments. When it is there, it is the definitive list of what changed — work through it change by change. A removed line means the scenario it described was dropped: delete the tests that exist only for it instead of keeping them as passing extras.
Before writing new tests, look for an existing test class for this handler / repository (e.g.
PlaceOrderHandlerTests.cs). If one exists, update it to match the current specification and
implementation instead of creating a second test class:
PlaceOrderHandler.cs).UseSqlite("DataSource=:memory:") (keeping connection open during test execution) or Testcontainers for realistic relational database behavior. Avoid UseInMemoryDatabase for EF Core tests as it does not enforce relational constraints or raw SQL behavior.DbContext instance, then dispose or save changes.DbContext instance to prevent EF Core change tracking from masking bugs.DbContext instance.dotnet test to confirm tests pass."Next step: Run
/playwright-testto generate native C# end-to-end browser tests for your use cases."
c3a5da3
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.