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

Assemblies as a Syntax element #130

Open
DialLuesebrink opened this issue Oct 18, 2021 · 3 comments
Open

Assemblies as a Syntax element #130

DialLuesebrink opened this issue Oct 18, 2021 · 3 comments
Assignees
Labels
good first issue Good for newcomers kind/feature Categorizes issue or PR as related to a new feature.

Comments

@DialLuesebrink
Copy link

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.");
@fgather fgather added kind/feature Categorizes issue or PR as related to a new feature. good first issue Good for newcomers labels Jan 14, 2022
@fgather
Copy link
Contributor

fgather commented Jan 14, 2022

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

@gaevoy
Copy link

gaevoy commented May 20, 2022

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

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

@JobaDiniz
Copy link

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

@mak638 mak638 self-assigned this Apr 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers kind/feature Categorizes issue or PR as related to a new feature.
Projects
None yet
Development

No branches or pull requests

5 participants