You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
NotImplementAny(interfaces) returns FAIL if interfaces is Empty #446
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,
...
changed the title [-]NotImplementAny(interfaces) returns FAIL is interfaces is Empty[/-][+]NotImplementAny(interfaces) returns FAIL if interfaces is Empty[/+]on Jan 21, 2026
Activity
[-]NotImplementAny(interfaces) returns FAIL is interfaces is Empty[/-][+]NotImplementAny(interfaces) returns FAIL if interfaces is Empty[/+]