BitzOrcas.Architecture.Tests enforces architectural rules that would otherwise be caught only at code review. These tests prevent structural violations from accumulating.
What it checks
| Rule | Description |
|---|---|
| Module boundaries | Modules don’t directly reference other module internals |
| DI registration | All required services are registered and resolvable |
| Naming conventions | Entity names follow biz_/sys_ prefix convention |
| Dependency direction | Domain → Application → Infrastructure (never reverse) |
| AOT compatibility | No reflection-heavy patterns in AOT-enabled projects |
Module boundary verification
Using NetArchTest or custom reflection checks:
// Verify modules don't depend on each other's internalsvar result = Types.InAssembly(moduleAssembly) .ShouldNot() .HaveDependencyOn(otherModuleAssembly) .GetResult();DI registration tests
Verify all required services can be resolved:
[Fact]public void CoreRuntime_AllRequiredServices_ShouldBeResolvable(){ var services = new ServiceCollection(); services.AddBitzOrcasCoreRuntime(MockConfiguration);
var provider = services.BuildServiceProvider(); provider.GetRequiredService<ICorrelationContext>(); provider.GetRequiredService<IAppClock>(); provider.GetRequiredService<IAuditLogger>(); // ... all core services}Running
dotnet test tests/BitzOrcas.Architecture.Tests