# TNG/ArchUnitNET

A C# architecture test library to specify and assert architecture rules in C# for automated testing.

Repository: https://github.com/TNG/ArchUnitNET
Canonical: https://ross.abutalabs.com/products/archunitnet
Language: C#
License: Apache-2.0
License Family: permissive
Last push: 2026-08-26T16:37:43+00:00

## Health v2 (maintenance only)
Score: 95/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 99, release rhythm 86, longevity 100
- inputs: {"age_days": 2596, "days_push": 7, "days_rel": 14, "gap_med": 48.0, "n_releases_24m": 13}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1353, forks 80 (observed 2026-08-28T04:04:28.570052+00:00)

## What it is
ArchUnitNET is a C# library for specifying and asserting architecture rules in automated tests, forked from Java's ArchUnit. It analyzes assemblies and checks dependencies between classes, members, and interfaces, with extensions for xUnit, NUnit, and MSTest.

## Use cases
- enforce layered architecture rules in C# tests
- assert that classes in one namespace don't depend on another layer
- verify interfaces are only implemented by allowed classes
- run architecture rules as part of CI unit tests
- prevent forbidden assembly dependencies in .NET codebases
- codify coding conventions as automated tests

## When to choose
- you have a .NET codebase and want architecture rules enforced automatically in tests
- you want an ArchUnit-style fluent API for C#
- you use xUnit, NUnit, or MSTest and want integrated architecture checks

## When to avoid
- you work in Java or another non-.NET language (use ArchUnit instead)
- you need runtime dependency enforcement rather than test-time checks
- you need static analysis features like linting or code style checks

## Facets
- artifact type: library
- maturity: active
- function: testing, developer-tools
- domain: testing, developer-tools, programming-languages
- platform: dotnet, c
- tags: architecture-tests, archunit, unit-testing, code-structure-analysis, xunit, nunit, mstest

## Member repositories
- TNG/ArchUnitNET (main) score 95

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:28.570052+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T04:42:05.837492+00:00, confidence not recorded.
  - readme: https://github.com/TNG/ArchUnitNET (fetched 2026-08-28T04:04:28.570052+00:00, sha dc3d98fee158)
- Data as of 2026-08-30T08:39:29.467469+00:00.
