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:
@@ -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
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@ Confirm zero unmapped items, validate all N/A justifications, enforce naming con
|
||||
|
||||
- Phase 4 complete: all items have .NET mappings or N/A status
|
||||
- Verify with: `dotnet run --project tools/NatsNet.PortTracker -- report summary --db porting.db`
|
||||
- Naming verification must check compliance with the [.NET Coding Standards](../../standards/dotnet-standards.md)
|
||||
|
||||
## Source and Target Locations
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@ Implement every non-N/A module, feature, and test in the porting database. Work
|
||||
## Prerequisites
|
||||
|
||||
- Phase 5 complete: all mappings verified, no collisions, naming validated
|
||||
- Read and follow the [.NET Coding Standards](../../standards/dotnet-standards.md) — covers testing (xUnit 3 / Shouldly / NSubstitute), logging (Microsoft.Extensions.Logging + Serilog + LogContext), async patterns, and performance guidelines
|
||||
- .NET solution structure created:
|
||||
- `dotnet/src/ZB.MOM.NatsNet.Server/ZB.MOM.NatsNet.Server.csproj`
|
||||
- `dotnet/src/ZB.MOM.NatsNet.Server.Host/ZB.MOM.NatsNet.Server.Host.csproj`
|
||||
|
||||
@@ -9,7 +9,7 @@ Every ported module passes its targeted tests. Every item in the database reache
|
||||
## Prerequisites
|
||||
|
||||
- Phase 6 complete: all non-N/A items at `complete` or better
|
||||
- All tests ported and compilable
|
||||
- All tests ported and compilable per [.NET Coding Standards](../../standards/dotnet-standards.md) (xUnit 3 / Shouldly / NSubstitute)
|
||||
- Verify readiness: `dotnet run --project tools/NatsNet.PortTracker -- phase check 6 --db porting.db`
|
||||
|
||||
## Source and Target Locations
|
||||
|
||||
Reference in New Issue
Block a user