ArchUnitNET
ArchUnitNET copied to clipboard
`ResideInAssembly` should not match the fully qualified name
When using
Types()
.That()
…
.Should()
.OnlyDependOn(Types().That().ResideInAssembly("System.Console"))
.Check(Architecture);
This does currently not work, because ResideInAssembly matches the fully qualified name like System.Console, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a. This is unexpected, the condition should instead only match the name of the assembly.
You are correct, for most use-cases this would be the expected way. However in those set-ups: https://github.com/TNG/ArchUnitNET/issues/292 🤔
Ideally this would build upon #130 with a syntax like Types().That().ResideInAssembliesThat().HaveName(…) or Types().That().ResideInAssembliesThat().HaveFullName(…). That would also make it more clear what part of the name we are matching when reading the code of a test.
Closed in favor of #130