Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
git clone --depth 1 https://github.com/adonai-labs/agent-runwayWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/rules/adonai-labs/agent-runway/dotnet-testing)<a href="https://agentmods.dev/rules/adonai-labs/agent-runway/dotnet-testing"><img src="https://agentmods.dev/badge/rules/adonai-labs/agent-runway/dotnet-testing/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/rules/adonai-labs/agent-runway/dotnet-testing"><img src="https://agentmods.dev/badge/rules/adonai-labs/agent-runway/dotnet-testing.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00000 | $0.01348 |
| Opus 5 | $0.00000 | $0.00674 |
| Sonnet 5 | $0.00000 | $0.00270 |
| Haiku 4.5 | $0.00000 | $0.00135 |
Grade A, and why
dotnet-testing scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 195 lines — stays where its author put it; the contents beside it link to each section on GitHub.
.NET Testing Standards
.NET-specific testing practices. For universal testability principles, see engineering-principles.mdc. For test strategy (what to test at each layer), see dotnet-architecture.mdc.
Conflict resolution: Where this file provides .NET-specific guidance that differs from
engineering-principles.mdc, this file takes precedence for.csand.csprojfiles.
Test naming
Use the MethodName_StateUnderTest_ExpectedBehaviour format for unit tests and Given_When_Then for scenario-based integration tests:
// Unit test — method under test is explicit
[Fact]
public async Task PlaceOrder_WhenCustomerHasInsufficientCredit_ReturnsFailure() { }
// Integration test — scenario is explicit
[Fact]
public async Task GivenAuthenticatedUser_WhenPlacingOrderWithInvalidLines_ThenReturnsBadRequest() { }
- Test class name matches the subject under test:
OrderServiceTests,PlaceOrderCommandHandlerTests - Do not use
Testsuffix on test project folders; useMyApp.Application.Tests
Project structure
tests/
├── MyApp.Domain.Tests/ ← entity and value object behaviour
├── MyApp.Application.Tests/ ← handler, validator, pipeline behaviour
├── MyApp.Infrastructure.Tests/ ← EF Core, HTTP clients, adapters
└── MyApp.Api.Tests/ ← full request/response via WebApplicationFactory
Each test project references only the layer it tests; it does not skip layers.
Unit tests — handlers and domain
- Use
xUnitwithFluentAssertions; avoid rawAssert.*calls - No infrastructure dependencies; stub with
NSubstituteorMoq - Arrange/Act/Assert sections separated by a blank line; no inline comments labelling them
[Fact]
public async Task Handle_WhenOrderNotFound_ReturnsFailure()
{
var repository = Substitute.For<IOrderRepository>();
repository.GetByIdAsync(Arg.Any<Guid>(), Arg.Any<CancellationToken>())
.Returns((Order?)null);
var handler = new GetOrderByIdQueryHandler(repository);
var result = await handler.Handle(new GetOrderByIdQuery(Guid.NewGuid()), default);
result.IsFailure.Should().BeTrue();
result.Error.Should().Contain("not found");
}
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 12d ago First seen · 195 lines · 1,348 tokens per session scan A 930ed5f80b66
dotnet-testing is a cursor rule published in the GitHub repository adonai-labs/agent-runway (2 stars, last pushed 26d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,348 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.
Other cursor rules, from other repositories
roslyn-mcp-dev-conventions
Conventions when editing Tools and Services in this repo.
jest-unit-testing-cursorrules-prompt-file
Cursor rules for Jest development with unit testing.
python-cursorrules-prompt-file-best-practices
Cursor rules for Python development with best practices integration.
go
Idiomatic Go rules. Explicit error handling, interface-based design, context-first concurrency.
python-general-coding-standards
A set of general standards for Python projects, including type hints, input checking, code style, security, web requests, background work, and tests. It also covers FastAPI-specific tasks such as CORS and authentication.
csharp
C# / .NET coding standards (Frontier).