mirror of
https://github.com/affaan-m/everything-claude-code.git
synced 2026-04-04 08:13:30 +08:00
feat(rules): add C# language support (#704)
* feat(rules): add C# language support * feat: add everything-claude-code ECC bundle (#705) * feat: add everything-claude-code ECC bundle (.claude/ecc-tools.json) * feat: add everything-claude-code ECC bundle (.claude/skills/everything-claude-code/SKILL.md) * feat: add everything-claude-code ECC bundle (.agents/skills/everything-claude-code/SKILL.md) * feat: add everything-claude-code ECC bundle (.agents/skills/everything-claude-code/agents/openai.yaml) * feat: add everything-claude-code ECC bundle (.claude/identity.json) * feat: add everything-claude-code ECC bundle (.codex/agents/explorer.toml) * feat: add everything-claude-code ECC bundle (.codex/agents/reviewer.toml) * feat: add everything-claude-code ECC bundle (.codex/agents/docs-researcher.toml) * feat: add everything-claude-code ECC bundle (.claude/rules/everything-claude-code-guardrails.md) * feat: add everything-claude-code ECC bundle (.claude/research/everything-claude-code-research-playbook.md) * feat: add everything-claude-code ECC bundle (.claude/team/everything-claude-code-team-config.json) * feat: add everything-claude-code ECC bundle (.claude/enterprise/controls.md) * feat: add everything-claude-code ECC bundle (.claude/commands/database-migration.md) * feat: add everything-claude-code ECC bundle (.claude/commands/feature-development.md) * feat: add everything-claude-code ECC bundle (.claude/commands/add-language-rules.md) --------- Co-authored-by: ecc-tools[bot] <257055122+ecc-tools[bot]@users.noreply.github.com> * ci: retrigger --------- Co-authored-by: ecc-tools[bot] <257055122+ecc-tools[bot]@users.noreply.github.com>
This commit is contained in:
46
rules/csharp/testing.md
Normal file
46
rules/csharp/testing.md
Normal file
@@ -0,0 +1,46 @@
|
||||
---
|
||||
paths:
|
||||
- "**/*.cs"
|
||||
- "**/*.csx"
|
||||
- "**/*.csproj"
|
||||
---
|
||||
# C# Testing
|
||||
|
||||
> This file extends [common/testing.md](../common/testing.md) with C#-specific content.
|
||||
|
||||
## Test Framework
|
||||
|
||||
- Prefer **xUnit** for unit and integration tests
|
||||
- Use **FluentAssertions** for readable assertions
|
||||
- Use **Moq** or **NSubstitute** for mocking dependencies
|
||||
- Use **Testcontainers** when integration tests need real infrastructure
|
||||
|
||||
## Test Organization
|
||||
|
||||
- Mirror `src/` structure under `tests/`
|
||||
- Separate unit, integration, and end-to-end coverage clearly
|
||||
- Name tests by behavior, not implementation details
|
||||
|
||||
```csharp
|
||||
public sealed class OrderServiceTests
|
||||
{
|
||||
[Fact]
|
||||
public async Task FindByIdAsync_ReturnsOrder_WhenOrderExists()
|
||||
{
|
||||
// Arrange
|
||||
// Act
|
||||
// Assert
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## ASP.NET Core Integration Tests
|
||||
|
||||
- Use `WebApplicationFactory<TEntryPoint>` for API integration coverage
|
||||
- Test auth, validation, and serialization through HTTP, not by bypassing middleware
|
||||
|
||||
## Coverage
|
||||
|
||||
- Target 80%+ line coverage
|
||||
- Focus coverage on domain logic, validation, auth, and failure paths
|
||||
- Run `dotnet test` in CI with coverage collection enabled where available
|
||||
Reference in New Issue
Block a user