docs: add .NET coding standards and reference from phase docs

Establish project-wide rules for testing (xUnit 3 / Shouldly /
NSubstitute), logging (Microsoft.Extensions.Logging + Serilog +
LogContext), and general C# conventions. Referenced from CLAUDE.md
and phases 4-7.
This commit is contained in:
Joseph Doherty
2026-02-26 07:27:30 -05:00
parent f7a4f56ce4
commit 8051436f57
8 changed files with 275 additions and 5 deletions

View File

@@ -10,6 +10,7 @@ Every module, feature, and test in the porting database must have either a .NET
- Phases 1-3 complete: all Go items in the DB, all libraries mapped
- Verify with: `dotnet run --project tools/NatsNet.PortTracker -- report summary --db porting.db`
- Read and follow the [.NET Coding Standards](../../standards/dotnet-standards.md) — all naming, testing, and logging decisions must comply
## Source and Target Locations
@@ -149,7 +150,7 @@ dotnet run --project tools/NatsNet.PortTracker -- test map <id> \
--db porting.db
```
Go test naming (`TestParserValid`) translates to .NET naming (`TryParse_ValidInput_ReturnsTrue`). Each Go `Test*` function maps to one or more `[Fact]` or `[Theory]` methods. Table-driven Go tests often become `[Theory]` with `[InlineData]` or `[MemberData]`.
Go test naming (`TestParserValid`) translates to .NET naming (`TryParse_ValidInput_ReturnsTrue`). Each Go `Test*` function maps to one or more `[Fact]` or `[Theory]` methods. Table-driven Go tests often become `[Theory]` with `[InlineData]` or `[MemberData]`. Use Shouldly for assertions and NSubstitute for mocking — see the [.NET Coding Standards](../../standards/dotnet-standards.md) for details.
### Step 4: Mark N/A items