Add project-wide instruction files for Fuchs migration
Playwright Tests / test (push) Has been cancelled
Playwright Tests / test (push) Has been cancelled
Added detailed instruction files for configuration, controller structure, C# standards, OCORE library usage, ImageSharp licensing, and testing. These documents define rules for settings, DI, file layout, package management, and test practices to ensure consistency and compliance during the .NET 10 migration.
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
---
|
||||
applyTo: "Fuchs.Tests/**,**/*Tests/**,**/*Tests.cs"
|
||||
---
|
||||
|
||||
# Testing Instructions
|
||||
|
||||
## Framework
|
||||
- Tests use **xUnit** on **.NET 10** (e.g., `Fuchs.Tests`).
|
||||
- Run via Visual Studio Test Explorer or `dotnet test`.
|
||||
|
||||
## Conventions
|
||||
- One test class per unit under test; name it `<TypeUnderTest>Tests`.
|
||||
- Name test methods `Method_Scenario_ExpectedResult` (e.g., `ReadBalance_EmptyString_ThrowsInvalidDataException`).
|
||||
- Use `[Theory]` + `[InlineData]` for parameterized cases; `[Fact]` for single cases.
|
||||
- Arrange / Act / Assert structure; keep tests deterministic and independent (no shared mutable state, no real network/DB calls).
|
||||
|
||||
## What to Cover
|
||||
- Pure parsing/algorithmic helpers (MT940 parsing, date/decimal parsing, HTML cleanup, OData envelope handling, entity helpers) — these are the highest-value, side-effect-free targets.
|
||||
- For library classes that accept `ILogger<T>?`, pass `NullLogger<T>.Instance` (or a test logger) in tests.
|
||||
|
||||
## Workflow
|
||||
- After any code change, build the full solution and run the affected test project before concluding.
|
||||
- Treat a green run (e.g., `Fuchs.Tests` all passing) as the validation gate; never leave the suite red.
|
||||
- When fixing a bug, add or update a test that reproduces it where practical.
|
||||
Reference in New Issue
Block a user