Skip to content

test(arch): add NetArchTest suite enforcing the dependency rule in VSA#52

Merged
emeraldleaf merged 1 commit into
mainfrom
test/architecture-tests-netarchtest
Jun 3, 2026
Merged

test(arch): add NetArchTest suite enforcing the dependency rule in VSA#52
emeraldleaf merged 1 commit into
mainfrom
test/architecture-tests-netarchtest

Conversation

@emeraldleaf

@emeraldleaf emeraldleaf commented May 29, 2026

Copy link
Copy Markdown
Owner

Summary

First implementation of the "architecture tests" rung from the convention → architecture tests → project split enforcement spectrum (CLAUDE.md "Promotion signal" + docs/vsa-vs-clean-architecture.md). It proves the thesis those docs argue: Clean's dependency rule can be enforced deterministically in NextAurora's single-project VSA shape without the 4-project split — at the namespace level, failing CI on violation.

What landed

  • New test project tests/NextAurora.ArchitectureTests (NetArchTest.Rules 1.3.2, added to Directory.Packages.props; registered in NextAurora.slnx). References all five services so the tests can inspect their assemblies.
  • DependencyRuleTests — a theory asserting each service's Domain namespace (Catalog/Order/Payment/Shipping) has no compiled dependency on EF Core, ASP.NET, Wolverine, Dapper, Npgsql, Microsoft.Data.SqlClient, Microsoft.Extensions.Caching, or its own Infrastructure/Features. Same boundary a 4-project layout enforces via project references — as a CI-gated test in one project.
  • NotificationService intentionally excluded — it's the "no aggregate" service (no Domain folder), so there's no domain boundary to assert.

Result

4/4 green. Codifies the already-decoupled state — the Domain folders import only NextAurora.Contracts DTOs + BCL; the EF/Wolverine/Infrastructure mentions in Domain are all in XML-doc comments, which NetArchTest ignores (it inspects compiled IL, not text).

Why it matters

Moves the dependency rule from convention + architecture-reviewer + CodeRabbit (review-enforced) to also test-enforced (deterministic). Per docs/vsa-vs-clean-architecture.md, review still covers the judgment calls a static test can't express — e.g. the no-repository-wrapper ban — so the layers are complementary, not redundant.

Scope note

Deliberately focused on the Domain-isolation rule (the core dependency-rule assertion). Possible follow-ups, not in this PR: cross-service boundary checks (no service references another's assembly) and a Features→Domain direction assertion. Kept tight + guaranteed-green for the first arch-test PR.

Test plan

  • dotnet test on the arch-test project — 4/4 pass
  • Full dotnet build clean (1 pre-existing benchmark warning, unrelated)
  • NetArchTest.Rules 1.3.2 restores under CPM
  • CI picks it up via the solution's test step (it's registered in NextAurora.slnx)

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Tests

    • Added automated architecture compliance tests enforcing Clean Architecture dependency rules across service domains.
  • Chores

    • Added a new test project to the solution and configured it for architecture testing and coverage.
    • Centralized a package version for the architecture-testing library to ensure consistent test behavior.

@coderabbitai

coderabbitai Bot commented May 29, 2026

Copy link
Copy Markdown

Review Change Stack

Walkthrough

This PR adds an architecture test project that uses NetArchTest.Rules (1.3.2) to assert Domain layers across services (Catalog, Order, Payment, Shipping) have no compiled dependencies on infrastructural namespaces or their service's Infrastructure/Features layers.

Changes

Architecture Dependency Testing

Layer / File(s) Summary
Test project infrastructure and dependencies
Directory.Packages.props, tests/NextAurora.ArchitectureTests/NextAurora.ArchitectureTests.csproj, NextAurora.slnx
Centralizes NetArchTest.Rules (1.3.2) package version, configures the test project with xUnit, AwesomeAssertions, coverlet, AspNetCore framework reference, and project references to Catalog, Order, Payment, Shipping, and Notification services. Test project is added to the solution.
Domain dependency rule test implementation
tests/NextAurora.ArchitectureTests/DependencyRuleTests.cs
Parameterized Domain_depends_on_nothing_infrastructural test builds a forbidden namespace list from shared infrastructure (EF Core, ASP.NET Core, Wolverine, Dapper, cache, DB providers) plus the service's Infrastructure and Features namespaces, runs NetArchTest against each {service}.Domain, and fails with the list of violating type names.

🎯 2 (Simple) | ⏱️ ~12 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'test(arch): add NetArchTest suite enforcing the dependency rule in VSA' accurately summarizes the main change: adding a new architecture test suite that uses NetArchTest to enforce dependency rules in the Vertical Slice Architecture.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch test/architecture-tests-netarchtest

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov

codecov Bot commented May 29, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@tests/NextAurora.ArchitectureTests/DependencyRuleTests.cs`:
- Around line 43-74: Add a companion test that asserts the Application and
Features namespaces don't reference Infrastructure: create a new theory (mirror
the existing Domain_depends_on_nothing_infrastructural) e.g.
Application_and_Features_do_not_depend_on_infrastructure with the same
InlineData anchors; build forbidden =
ForbiddenInDomain.Append($"{service}.Infrastructure").ToArray(); then use
Types.InAssembly(domainAnchor.Assembly).That().ResideInNamespace($"{service}.Application").Or().ResideInNamespace($"{service}.Features").ShouldNot().HaveDependencyOnAny(forbidden).GetResult()
and assert result.IsSuccessful.Should().BeTrue(...) with a failure message
listing result.FailingTypeNames so offenders are reported.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 019fbfad-3184-4e3e-b838-117d227f4935

📥 Commits

Reviewing files that changed from the base of the PR and between 6f340be and 8cba0d4.

📒 Files selected for processing (4)
  • Directory.Packages.props
  • NextAurora.slnx
  • tests/NextAurora.ArchitectureTests/DependencyRuleTests.cs
  • tests/NextAurora.ArchitectureTests/NextAurora.ArchitectureTests.csproj

Comment on lines +43 to +74
[Theory]
[InlineData(typeof(CatalogService.Domain.Product), "CatalogService")]
[InlineData(typeof(OrderService.Domain.Order), "OrderService")]
[InlineData(typeof(PaymentService.Domain.Payment), "PaymentService")]
[InlineData(typeof(ShippingService.Domain.Shipment), "ShippingService")]
public void Domain_depends_on_nothing_infrastructural(Type domainAnchor, string service)
{
// ARRANGE — the anchor type pins the service's assembly; we scope the rule to that
// service's Domain namespace. The forbidden set is the shared infrastructural concerns
// PLUS the service's own Infrastructure + Features namespaces — Domain is the inner
// circle, so a Domain→Infrastructure or Domain→Features reference inverts the dependency
// rule. Justified Domain dependencies (NextAurora.Contracts DTOs/events, BCL) are not
// in the list and stay allowed.
var forbidden = ForbiddenInDomain
.Append($"{service}.Infrastructure")
.Append($"{service}.Features")
.ToArray();

// ACT — assert no type in {service}.Domain has a compiled dependency on any forbidden
// namespace. This is the same boundary a 4-project split enforces via project
// references, expressed as a CI-gated test in a single-project VSA codebase.
var result = Types.InAssembly(domainAnchor.Assembly)
.That().ResideInNamespace($"{service}.Domain")
.ShouldNot().HaveDependencyOnAny(forbidden)
.GetResult();

// ASSERT — green codifies the decoupled state; a failure names the offending Domain
// types so the inversion is obvious in CI output.
result.IsSuccessful.Should().BeTrue(
because: $"{service}.Domain must stay free of infrastructure — offending types: " +
string.Join(", ", result.FailingTypeNames ?? []));
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Missing architecture check for Application/Features → Infrastructure coupling.

Line [65] scopes enforcement to {service}.Domain only. The suite still needs a companion rule asserting the Application/Features layer does not reference {service}.Infrastructure.

➕ Suggested follow-up test
+    [Theory]
+    [InlineData(typeof(CatalogService.Domain.Product), "CatalogService")]
+    [InlineData(typeof(OrderService.Domain.Order), "OrderService")]
+    [InlineData(typeof(PaymentService.Domain.Payment), "PaymentService")]
+    [InlineData(typeof(ShippingService.Domain.Shipment), "ShippingService")]
+    public void Application_does_not_depend_on_its_own_infrastructure(Type serviceAnchor, string service)
+    {
+        // ARRANGE — in this repo’s VSA shape, Features acts as the application layer.
+        var forbidden = new[] { $"{service}.Infrastructure" };
+
+        // ACT — enforce Application/Features → Infrastructure is forbidden.
+        var result = Types.InAssembly(serviceAnchor.Assembly)
+            .That().ResideInNamespace($"{service}.Features")
+            .ShouldNot().HaveDependencyOnAny(forbidden)
+            .GetResult();
+
+        // ASSERT — failing type names make the inversion obvious in CI output.
+        result.IsSuccessful.Should().BeTrue(
+            because: $"{service}.Features must not depend on {service}.Infrastructure — offending types: " +
+                     string.Join(", ", result.FailingTypeNames ?? []));
+    }

As per coding guidelines CLAUDE.md referenced content requires enforcing architectural invariants that “Domain → nothing” and “Domain and Application layers must never reference Infrastructure.”

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tests/NextAurora.ArchitectureTests/DependencyRuleTests.cs` around lines 43 -
74, Add a companion test that asserts the Application and Features namespaces
don't reference Infrastructure: create a new theory (mirror the existing
Domain_depends_on_nothing_infrastructural) e.g.
Application_and_Features_do_not_depend_on_infrastructure with the same
InlineData anchors; build forbidden =
ForbiddenInDomain.Append($"{service}.Infrastructure").ToArray(); then use
Types.InAssembly(domainAnchor.Assembly).That().ResideInNamespace($"{service}.Application").Or().ResideInNamespace($"{service}.Features").ShouldNot().HaveDependencyOnAny(forbidden).GetResult()
and assert result.IsSuccessful.Should().BeTrue(...) with a failure message
listing result.FailingTypeNames so offenders are reported.

@emeraldleaf

Copy link
Copy Markdown
Owner Author

@coderabbitai — declining the Application/Features → Infrastructure suggestion. The proposed test would fail on the current codebase because {service}.Features{service}.Infrastructure.Data is intentional in this project's VSA shape, per CLAUDE.md:

"Data access: DbContext directly, no repository wrappers — Handlers take DbContext (or IDbContextFactory<T>) directly. No IFooRepository interfaces. Microsoft.EntityFrameworkCore.DbContext is already the Unit of Work; DbSet<T> is already the Repository. A wrapper interface (IOrderRepository) adds a layer without adding capability."

Every Feature handler in the repo imports DbContext from its sibling Infrastructure namespace (e.g. ProcessPayment.cs:7 does using PaymentService.Infrastructure.Data;). Adding the proposed test would flag every handler as a violation of the project's own canonical pattern.

The Domain layer IS supposed to know nothing about infrastructure — that's what this PR enforces deterministically via NetArchTest. The application layer's coupling to data infrastructure is part of the simplicity-refactor's deliberate choice (the previous Clean Architecture attempt in CatalogService was retired specifically because the layer split wasn't earning its keep at this scale).

See:

  • CLAUDE.md "Data access: DbContext directly, no repository wrappers"
  • CLAUDE.md "Promotion signal — when to consider Clean Architecture"
  • docs/dev-loop.md "Enforcement spectrum"

The arch-test rung correctly covers Domain → no infrastructure; that's the rule that genuinely applies here.

@coderabbitai

coderabbitai Bot commented Jun 3, 2026

Copy link
Copy Markdown

Tip

For best results, initiate chat on the files or code changes.

@emeraldleaf — understood, and thank you for the thorough explanation. The FeaturesInfrastructure.Data coupling is clearly a deliberate, CLAUDE.md-sanctioned pattern in this VSA shape (DbContext-as-UoW directly in handlers), not a violation. The architecture test is correctly scoped to Domain isolation only, which is exactly the invariant worth enforcing at CI level here. I'll keep that context for future reviews.

🐇 (noted and filed away)


✏️ Learnings added
Learnt from: emeraldleaf
URL: https://github.com/emeraldleaf/NextAurora/pull/52

Timestamp: 2026-06-03T00:20:30.311Z
Learning: In NextAurora's VSA shape, `{service}.Features` handlers are explicitly allowed — and expected — to depend directly on `{service}.Infrastructure.Data` (i.e., EF Core `DbContext` / `IDbContextFactory<T>`). There are no `IFooRepository` wrappers; `DbContext` is the Unit of Work and `DbSet<T>` is the Repository. Any architecture test that flags `Features` → `Infrastructure` as a violation would contradict the project's canonical pattern. The architecture-test suite (NetArchTest) correctly enforces only the `Domain` → no-infrastructure rule. Reference: CLAUDE.md "Data access: DbContext directly, no repository wrappers" and "Promotion signal — when to consider Clean Architecture".

Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.


🧠 Learnings used
Learnt from: CR
Repo: emeraldleaf/NextAurora PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-06-01T00:22:55.437Z
Learning: Applies to **/*.Tests.cs : Unit tests for domain logic and handlers. Test structure — AAA with narrative comments: Arrange → Act → Assert with // ARRANGE, // ACT, // ASSERT markers (all caps, em-dash explanation). Each phase carries a story comment explaining what's being set up, why it matters, what's being called, and what each assertion verifies. Junior dev should understand the contract and failure mode without reading the SUT. Security/concurrency/idempotency tests get full story; trivial happy-path can be shorter.

Learnt from: CR
Repo: emeraldleaf/NextAurora PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-06-01T00:22:55.438Z
Learning: Project structure — Vertical Slice Architecture (VSA) for every service. Organize by feature instead of kind. All five services follow the same single-project shape: Features/ (command/query + validator + handler co-located), Domain/ (aggregates, value objects, ports), Infrastructure/ (EF Core, caching, gateways), Endpoints/ (Minimal-API registrations), Program.cs, .csproj.

Learnt from: CR
Repo: emeraldleaf/NextAurora PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-06-01T00:22:55.438Z
Learning: Layer Dependencies — Domain → nothing. Application → Domain. Infrastructure → Domain + Application. Api → all layers. A service with no domain entities doesn't need a Domain project — ports (I*Sender, I*Resolver) live in Application/Interfaces/ instead.

Learnt from: CR
Repo: emeraldleaf/NextAurora PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2026-05-25T04:11:13.079Z
Learning: Applies to **/*Tests.cs : Focus unit tests on domain logic and business rules in isolation

Learnt from: CR
Repo: emeraldleaf/NextAurora PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2026-05-25T04:11:13.079Z
Learning: Applies to **/*Tests.cs : Implement integration tests for aggregate boundaries, persistence, and service integrations

Learnt from: CR
Repo: emeraldleaf/NextAurora PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-06-01T00:22:55.437Z
Learning: Applies to **/{*.Tests.cs,Infrastructure/DependencyInjection.cs} : Wolverine handler discovery is NOT DI registration — two separate containers. opts.Discovery.IncludeAssembly(...) builds Wolverine's internal handler-type map; Wolverine constructs handlers itself via IServiceScopeFactory. Therefore: serviceProvider.GetRequiredService<MyHandler>() throws InvalidOperationException unless you also AddScoped<MyHandler>(). Production paths go through IMessageBus and never hit this; the path that does is integration tests that resolve handlers directly to assert EF projection SQL. Rule: any handler resolved by GetRequiredService<T>() in tests must have explicit services.AddScoped<T>() in that service's AddXInfrastructure registration.

Learnt from: CR
Repo: emeraldleaf/NextAurora PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-06-01T00:22:55.437Z
Learning: Applies to **/Tests.Integration/**/*.cs : Integration tests with Testcontainers for infrastructure — tests/{Service}.Tests.Integration, booting real API via WebApplicationFactory<Program>. Tests need Docker (macOS: DOCKER_HOST=~/.docker/run/docker.sock, CI has standard path).

Learnt from: CR
Repo: emeraldleaf/NextAurora PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2026-05-25T04:11:13.079Z
Learning: Explicitly review implementations against DDD aggregate boundaries, Single Responsibility Principle, domain rule encapsulation, test naming patterns `MethodName_Condition_ExpectedResult()`, and ubiquitous language consistency before implementation

Learnt from: CR
Repo: emeraldleaf/NextAurora PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2026-05-25T04:11:13.079Z
Learning: Applies to **/*.cs : Implement application services to orchestrate domain operations and coordinate with infrastructure

Learnt from: CR
Repo: emeraldleaf/NextAurora PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-06-01T00:22:55.438Z
Learning: Apply Dependency Inversion Principle — always depend on abstractions (interfaces), never on concrete implementations. Domain and Application layers must never reference Infrastructure.

Learnt from: CR
Repo: emeraldleaf/NextAurora PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-06-01T00:22:55.437Z
Learning: Applies to **/*.Tests.cs : Handlers resolved directly in tests must be DI-registered — if test does scope.ServiceProvider.GetRequiredService<MyHandler>(), handler must be AddScoped<MyHandler>()' in AddXInfrastructure. Wolverine handler-discovery does not populate IServiceCollection. Failure mode: InvalidOperationException at first test run.

Learnt from: CR
Repo: emeraldleaf/NextAurora PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2026-05-25T04:11:13.079Z
Learning: Follow Clean Architecture layer structure with proper dependency rules in NextAurora projects

Learnt from: CR
Repo: emeraldleaf/NextAurora PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-06-01T00:22:55.437Z
Learning: Applies to **/Tests.Integration/**/*.cs : Outbox-in-non-handler test — code paths that publish events from outside a Wolverine handler (BackgroundService sweepers, recovery jobs) need integration test asserting a row appears in wolverine.outgoing_envelopes in same transaction as entity write.

First implementation of the "architecture tests" rung from the
convention → architecture tests → project split enforcement spectrum
(CLAUDE.md "Promotion signal" + docs/vsa-vs-clean-architecture.md). Proves
the thesis those docs argue: Clean's dependency rule can be enforced
deterministically in NextAurora's single-project VSA shape WITHOUT the
4-project split — at the namespace level, failing CI on violation.

What landed:
- New test project tests/NextAurora.ArchitectureTests (NetArchTest.Rules
  1.3.2, added to Directory.Packages.props; registered in NextAurora.slnx).
  References all five services so the tests can inspect their assemblies.
- DependencyRuleTests: a theory asserting each service's Domain namespace
  (Catalog/Order/Payment/Shipping) has no compiled dependency on EF Core,
  ASP.NET, Wolverine, Dapper, Npgsql, Microsoft.Data.SqlClient,
  Microsoft.Extensions.Caching, or its own Infrastructure/Features. That's
  the same boundary a 4-project layout enforces via project references —
  expressed as a CI-gated test in one project.
- NotificationService intentionally excluded: it's the "no aggregate"
  service with no Domain folder, so there's no domain boundary to assert.

4/4 green — codifies the already-decoupled state (the Domain folders import
only NextAurora.Contracts DTOs + BCL; the EF/Wolverine/Infrastructure
mentions in Domain are all in XML-doc comments, which NetArchTest ignores
since it inspects compiled IL).

This moves the dependency rule from convention + architecture-reviewer +
CodeRabbit (review-enforced) to *also* test-enforced (deterministic). Per
docs/vsa-vs-clean-architecture.md, review still covers the judgment calls a
static test can't express (e.g. the no-repository-wrapper ban) — the layers
are complementary.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@emeraldleaf emeraldleaf force-pushed the test/architecture-tests-netarchtest branch from 8cba0d4 to 20fca93 Compare June 3, 2026 00:21

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@tests/NextAurora.ArchitectureTests/DependencyRuleTests.cs`:
- Line 48: Rename the test method Domain_depends_on_nothing_infrastructural to
follow the MethodName_Condition_ExpectedResult() convention (for example
DomainNamespace_WhenInspected_HasNoInfrastructureDependency) so it matches the
repository's unit-test naming pattern; update the method declaration in the
DependencyRuleTests class and any references or test attributes that refer to
Domain_depends_on_nothing_infrastructural to use the new name.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 72b28ad5-8869-47ba-b241-65891ed8cab6

📥 Commits

Reviewing files that changed from the base of the PR and between 8cba0d4 and 20fca93.

📒 Files selected for processing (4)
  • Directory.Packages.props
  • NextAurora.slnx
  • tests/NextAurora.ArchitectureTests/DependencyRuleTests.cs
  • tests/NextAurora.ArchitectureTests/NextAurora.ArchitectureTests.csproj

[InlineData(typeof(OrderService.Domain.Order), "OrderService")]
[InlineData(typeof(PaymentService.Domain.Payment), "PaymentService")]
[InlineData(typeof(ShippingService.Domain.Shipment), "ShippingService")]
public void Domain_depends_on_nothing_infrastructural(Type domainAnchor, string service)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick | 🔵 Trivial | 💤 Low value

Test name deviates from the repo's MethodName_Condition_ExpectedResult() convention.

Domain_depends_on_nothing_infrastructural is descriptive BDD-style but doesn't follow the mandated unit-test naming pattern. Consider e.g. DomainNamespace_WhenInspected_HasNoInfrastructureDependency for consistency with the rest of the suite.

As per coding guidelines: "Use MethodName_Condition_ExpectedResult() naming pattern for all unit tests".

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tests/NextAurora.ArchitectureTests/DependencyRuleTests.cs` at line 48, Rename
the test method Domain_depends_on_nothing_infrastructural to follow the
MethodName_Condition_ExpectedResult() convention (for example
DomainNamespace_WhenInspected_HasNoInfrastructureDependency) so it matches the
repository's unit-test naming pattern; update the method declaration in the
DependencyRuleTests class and any references or test attributes that refer to
Domain_depends_on_nothing_infrastructural to use the new name.

@emeraldleaf emeraldleaf merged commit 3767aa7 into main Jun 3, 2026
8 checks passed
@emeraldleaf emeraldleaf deleted the test/architecture-tests-netarchtest branch June 3, 2026 00:31
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