Skip to content

Commit

Permalink
Fix AreNot function and update renovate.json
Browse files Browse the repository at this point in the history
  • Loading branch information
fgather committed Apr 27, 2022
1 parent 45b7802 commit fd50f73
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -310,16 +310,7 @@ public static IPredicate<T> AreNested()

public static IPredicate<T> AreNot(Type firstType, params Type[] moreTypes)
{
IEnumerable<T> Filter(IEnumerable<T> ruleTypes, Architecture architecture)
{
var typeList = moreTypes.Select(architecture.GetITypeOfType)
.Concat(new[] {architecture.GetITypeOfType(firstType)}).OfType<T>();
return ruleTypes.Except(typeList);
}

var description = moreTypes.Aggregate("are not \"" + firstType.FullName + "\"",
(current, obj) => current + " or \"" + obj.FullName + "\"");
return new ArchitecturePredicate<T>(Filter, description);
return AreNot(new List<Type>() {firstType}.Concat(moreTypes));
}

public static IPredicate<T> AreNot(IEnumerable<Type> types)
Expand Down
3 changes: 2 additions & 1 deletion renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"MSTest.TestAdapter",
"MSTest.TestFramework",
"JetBrains.Annotations",
"NUnit3TestAdapter"
"NUnit3TestAdapter",
"nunit"
]
}

0 comments on commit fd50f73

Please sign in to comment.