Skip to content

Assemblies as a Syntax element #130

Open

Description

@LilBulb1337

It would be nice to be able to write Rules like
Assemblies().That().Rererence(...)

You can do that with types but then you can have the assembly reference and the test will not fail if no type is used.

private static bool IsInTestAssembly(IType type) => type.Assembly.Attributes.Any(a => a.Name == nameof(TestAssemblyAttribute));

private static IObjectProvider<IType> TypesResidingingInTestAssemblies = Types().That().FollowCustomPredicate(IsInTestAssembly, "Are in test assembly.");

Activity

  1. fgather commented on Jan 14, 2022

    @fgather
    Contributor

    Hi @DialLuesebrink , sounds like a good idea. Would you like to create a PR?

  2. gaevoy commented on May 20, 2022

    @gaevoy

    @DialLuesebrink, check out an alternative option to verify dependencies.

    https://gaevoy.com/2022/05/19/review-dependencies-on-every-commit.html

  3. JobaDiniz commented on Oct 26, 2023

    @JobaDiniz

    @gaevoy this looks promising, how about integrating it into the ArchUnitNET project?

  4. self-assigned this
    on Apr 12, 2024
  5. removed their assignment
    on Aug 22, 2025
  6. added
    triage/acceptedIndicates an issue or PR is ready to be actively worked on.
    and removed on Nov 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/featureCategorizes issue or PR as related to a new feature.triage/acceptedIndicates an issue or PR is ready to be actively worked on.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions