Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: DependOnAny fails for other objects #332

Open
stecydube opened this issue Jan 3, 2025 · 0 comments
Open

Bug: DependOnAny fails for other objects #332

stecydube opened this issue Jan 3, 2025 · 0 comments

Comments

@stecydube
Copy link

I've got this test:

public void DataPostgres_ShouldDependOnCoreAbstractionsAndCoreEntitiesAndCoreInterfaces()
{
    var rule = Types().That().Are(InfrastructureDataPostgresLayer)
                      .Should().DependOnAny(CoreAbstractionsLayer)
                      .AndShould().DependOnAny(CoreEntitiesLayer)
                      .AndShould().DependOnAny(CoreInterfacesLayer);
    rule.Check(Architecture);
}

Somehow this fails because of types outside my projects.

ArchUnitNET.xUnit.FailedArchRuleException : "Types that are Infrastructure Data Postgres Layer should depend on any Core Abstractions Layer" failed:
Infrastructure.Data.Postgres.AssemblyMarker does depend on System.Object
Infrastructure.Data.Postgres.DesignTimeDbContextFactory does depend on System.Object and Microsoft.EntityFrameworkCore.Design.IDesignTimeDbContextFactory`1 and Infrastructure.Data.Postgres.AppDbContext and System.String and Microsoft.Extensions.Configuration.ConfigurationBuilder and System.IO.Directory and Microsoft.Extensions.Configuration.FileConfigurationExtensions and Microsoft.Extensions.Configuration.JsonConfigurationExtensions and Microsoft.Extensions.Configuration.IConfigurationBuilder and Microsoft.EntityFrameworkCore.DbContextOptionsBuilder`1 and Microsoft.Extensions.Configuration.ConfigurationExtensions and Microsoft.EntityFrameworkCore.NpgsqlDbContextOptionsBuilderExtensions and Microsoft.Extensions.Configuration.IConfigurationRoot
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

No branches or pull requests

1 participant