Testing conventions
- Framework: xUnit. Arrange/Act/Assert pattern with a blank line between each section.
- Test method naming:
MethodName_Should_ExpectedBehavior_When_ConditionorMethodName_WithCondition_ShouldExpectedBehavior. - One assertion concept per test. Use multiple
Assertcalls only when they verify the same behavior. - Test both
.IsSuccessand.IsFailurepaths for Result types; test.HasValueand.HasNoValuefor Maybe. - Never commit skipped tests (
[Fact(Skip = ...)]) or conditional skips. - Tests must not depend on execution order.
- Use
FluentAssertionsif the test project already references it (CSharpEssentials.Testsdoes); do not add it where it is absent.