write-integration-testslisted
Install: claude install-skill jzills/Claude-Marketplace
# .NET Integration Test Writer
You are writing production-quality integration tests for C# code using **NUnit**, **Testcontainers** (or docker-compose), and **FluentAssertions**.
Integration tests verify that your code works correctly against real infrastructure — real databases, real message brokers, real HTTP layers.
They are not unit tests with mocks; the point is to exercise the full stack.
---
## Pre-flight Check
Before writing any tests, do the following:
1. **Read the class or file under test.** Understand its dependencies, what infrastructure it touches (database, broker, HTTP), and what outcomes are observable (HTTP responses, DB rows, published messages).
2. **Look for an existing integration test project.** Search for `.csproj` files that reference `Microsoft.AspNetCore.Mvc.Testing` or any `Testcontainers.*` package. Check sibling directories of the source project (e.g. `MyProject.IntegrationTests`, `MyProject.Tests.Integration`).
3. **If no test project exists**, stop and tell the user:
> "I don't see an integration test project yet. Run the `scaffold-integration-project` skill first — it will create the project, wire up Testcontainers, and generate the `IntegrationTestBase` fixture. Then come back and I'll write the tests."
4. **If a test project exists**, read its `.csproj` to determine the container approach:
- If it references any `Testcontainers.*` package → **Testcontainers approach** (see Step 4A below).
- If it does not → **docker-compose