ArchUnitNET icon indicating copy to clipboard operation
ArchUnitNET copied to clipboard

Adds a helper method to simplify the verification of dependencies

Open andreaslausen opened this issue 1 year ago • 1 comments

I created a method that really simpilifies the verification of dependencies at the assembly level. You just need to write var rule = Dependencies.Check(sourceAssembly, [targetAssembly1, targetAssembly2]), call rule.Check and you're done.

It would be awesome if this method would be integrated into ArchUnitNET.

andreaslausen avatar Jun 17 '24 11:06 andreaslausen

I like the idea, not sure though if such methods should be part of the core library, you could have many more and they could be part of your own Extensions. That would be different if you'd access some internal classes, for example. But hey, I'm just some random guy, not a maintainer :)

thojaw avatar Jul 01 '24 16:07 thojaw

Hi @andreaslausen, thank you for your PR. I'd agree with @thojaw here, since this would add a function that just contains another fluent expression I do not think this would belong in the core library. Additionally there is #130 which, although we cannot provide an ETA for the feature, make it possible to write something along the lines of Assemblies().That().Are(sourceAssembly).Should().NotDependOnAnyAssembliesThat().Are([targetAssembly1, targetAssembly2]).Check(architecture)

alexanderlinne avatar Oct 10 '24 17:10 alexanderlinne