Project: ManagedCode.MCPGateway.Tests Owned by: ManagedCode.MCPGateway package maintainers
Parent: ../../AGENTS.md
- This project verifies the shipped behavior of
ManagedCode.MCPGatewaythrough integration-style tests. - It owns regression coverage for local tools, MCP tools, search, invocation, embeddings, meta-tools, and chat-client integration.
Search/Invocation/MetaTools/ChatClient/Agents/TestSupport/
- In scope: caller-visible gateway behavior, deterministic test doubles, MCP test hosts, and integration-style assertions.
- Out of scope: production package implementation, packaging metadata, and consumer-facing README examples.
- Protected or high-risk areas: parallel test isolation, deterministic embedding behavior, MCP transport test hosts, and regression coverage for search ranking and invocation.
build:dotnet build tests/ManagedCode.MCPGateway.Tests/ManagedCode.MCPGateway.Tests.csproj -c Release --no-restoretest:dotnet test --solution ManagedCode.MCPGateway.slnx -c Release --no-buildcoverage:dotnet tool run coverlet tests/ManagedCode.MCPGateway.Tests/bin/Release/net10.0/ManagedCode.MCPGateway.Tests.dll --target "dotnet" --targetargs "test --solution ManagedCode.MCPGateway.slnx -c Release --no-build" --format cobertura --output artifacts/coverage/coverage.cobertura.xmlcoverage-report:dotnet tool run reportgenerator -reports:"artifacts/coverage/coverage.cobertura.xml" -targetdir:"artifacts/coverage-report" -reporttypes:"HtmlSummary;MarkdownSummaryGithub"format:dotnet format ManagedCode.MCPGateway.slnxanalyze:dotnet build tests/ManagedCode.MCPGateway.Tests/ManagedCode.MCPGateway.Tests.csproj -c Release --no-restore -p:RunAnalyzers=true
For this .NET project:
- test framework:
TUnit - runner model:
Microsoft.Testing.Platform - analyzer severity lives in the repo-root
.editorconfig
mcaf-dotnet-analyzer-configmcaf-dotnet-code-analysismcaf-dotnet-coverletmcaf-dotnet-formatmcaf-testingmcaf-dotnet-reportgeneratormcaf-dotnet-roslynatormcaf-dotnet-tunitmcaf-dotnet-quality-cimcaf-dotnet-complexitymcaf-dotnet-features
- Stricter maintainability limits:
file_max_loc:400type_max_loc:300function_max_loc:90max_nesting_depth:4
- Required local docs: keep test names and helper structure aligned with the behavior documented in
README.mdanddocs/Features/. - Local exception policy: any temporary breach must be justified in this file or the nearest durable test doc before the task is closed.
- Keep tests focused on observable gateway behavior, not internal implementation trivia.
- Prefer deterministic local fakes and test helpers over network-dependent or timing-fragile assertions.
- Do not weaken parallel isolation to hide shared-state bugs; fix the shared state instead.
- When a production change affects search or invocation semantics, add or update the corresponding test coverage in the matching test area.