-
Notifications
You must be signed in to change notification settings - Fork 76
Open
Labels
needs-triageIndicates that an issue needs to be categorized.Indicates that an issue needs to be categorized.
Description
Hello.
I tried to check if my Application implements any Interfaces from Domain Layer:
var rule = ArchRuleDefinition.Types()
.That().ResideInNamespaceMatching($"^application") // <-- application All Types of the application layer
.Should().NotImplementAnyInterfaces( // <-- This fails
ArchRuleDefinition.Interfaces()
.That().ResidesInNamespaceMatching($"^domain")) // <-- domain All Typs of the domain layer
Because the domain Layer does not contain any Interfaces yet, my test should always be green, but it fails.
After I discovered the NotImplementAnyInterfaces() Condition i found this in
TypeConditionsDefinitions -> NotImplementAny(interfaces):
foreach (var ruleType in ruleTypes.ToList())
{
var matchingInterfaces =
interfaceList.Count > 0
? ruleType.ImplementedInterfaces.Intersect(interfaceList).ToList()
: ruleType.ImplementedInterfaces.ToList(); //<-- Maybe this should be EmptyList, otherwise it fails when interfaceList is empty.
if (matchingInterfaces.Any())
{
yield return new ConditionResult(
ruleType,
false,
...
Metadata
Metadata
Assignees
Labels
needs-triageIndicates that an issue needs to be categorized.Indicates that an issue needs to be categorized.