Skip to content

Add lightweight architecture testing sample - #2

Merged
balajibashyam merged 3 commits into
mainfrom
feature/architecture-testing-sample
Jul 27, 2026
Merged

Add lightweight architecture testing sample#2
balajibashyam merged 3 commits into
mainfrom
feature/architecture-testing-sample

Conversation

@balajibashyam

Copy link
Copy Markdown
Contributor

Summary

Adds a minimal .NET 10 architecture-testing companion sample for the Architecture Testing in .NET: Enforce Layer and Module Boundaries with NetArchTest and ArchUnitNET tutorial.

What's included

  • New sample: software-architecture/architecture-testing-dotnet/ — 12 files

    • A layered .NET 10 solution: Domain, Application, Infrastructure, ArchitectureTests
    • One forbidden-dependency rule using NetArchTest.eNhancedEdition 1.4.5
    • Typed assembly markers for reliable assembly location
    • Selector non-empty guard (vacuous-pass protection)
    • Readable xUnit v3 failure output
    • dotnet test execution
  • Root README: New sample row in the table + updated repository structure

  • GitHub Actions: New test-architecture-rules job in the shared workflow; path filters updated

Deliberately omitted (stays in the full tutorial)

ArchUnitNET, Roslyn analyzer projects, convention rules, module slicing, reflection checks, CIL limitations, legacy baselines, web API, EF Core, databases, containers, production deployment

Versions

  • .NET SDK: 10.0.302
  • NetArchTest.eNhancedEdition: 1.4.5
  • xunit.v3: 3.2.2

Validation

  • dotnet restore — passed
  • dotnet build --configuration Release — passed (0 errors, 0 warnings)
  • dotnet test --configuration Release — passed (1/1)
  • Security scan — clean (no credentials, tokens, API keys, or private paths)

- .NET 10 layered solution: Domain, Application, Infrastructure, ArchitectureTests
- NetArchTest.eNhancedEdition 1.4.5 with typed assembly markers
- One forbidden-dependency rule: Domain must not depend on outer layers
- Selector non-empty guard (vacuous-pass protection)
- Readable xUnit v3 failure output
- Verified: dotnet restore, build, and test all pass (0 errors, 0 warnings)
- New row in the available samples table
- Updated repository structure diagram to include software-architecture/
- Preserved all existing sample rows
- Added path filter for software-architecture/architecture-testing-dotnet/**
- New test-architecture-rules job: restore, build, and test the architecture sample
- Preserved all existing workflow jobs
@balajibashyam
balajibashyam merged commit 8771f04 into main Jul 27, 2026
4 checks passed
@balajibashyam
balajibashyam deleted the feature/architecture-testing-sample branch July 27, 2026 15:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant