From 56bee15686e44033a1c7f8e0626147a1ab19d7db Mon Sep 17 00:00:00 2001 From: Alexander Linne Date: Fri, 22 Aug 2025 08:59:41 +0200 Subject: [PATCH 1/2] Add Tests For Object Predicates Signed-off-by: Alexander Linne --- .gitignore | 6 +- .../MethodMemberConditionsDefinition.cs | 9 + .../MethodMembers/MethodMembersShould.cs | 15 + .../Elements/ObjectConditionsDefinition.cs | 4 +- .../Elements/ObjectPredicatesDefinition.cs | 16 +- .../Elements/ShouldRelateToObjectsThat.cs | 2 +- .../Types/TypeConditionsDefinition.cs | 9 + .../Syntax/Elements/Types/TypesShould.cs | 11 + .../AssemblyTestHelper/AssemblyTestHelper.cs | 5 + .../DependencyAssemblyTestHelpers.cs | 8 + .../Syntax/Elements/ObjectsShouldTests.cs | 1803 ++++++++++++++++- .../ObjectsShouldTests.AreTest.verified.txt | 39 + ...tsShouldTests.BeTypesThatTest.verified.txt | 19 + ...bjectsShouldTests.CallAnyTest.verified.txt | 264 ++- ...tsShouldTests.DependOnAnyTest.verified.txt | 394 ++++ ...sts.FollowCustomPredicateTest.verified.txt | 72 + ...ldTests.HaveAnyAttributesTest.verified.txt | 332 +++ ...nyAttributesWithArgumentsTest.verified.txt | 288 ++- ...yAttributesWithNamedArguments.verified.txt | 460 +++++ ...aveAttributeWithArgumentsTest.verified.txt | 574 ++++++ ...veAttributeWithNamedArguments.verified.txt | 722 ++++++- ...jectsShouldTests.HaveNameTest.verified.txt | 204 ++ .../ObjectsShouldTests.NotBeTest.verified.txt | 326 +++ ...ctsShouldTests.NotCallAnyTest.verified.txt | 226 +++ ...houldTests.NotDependOnAnyTest.verified.txt | 366 ++++ ...ests.NotHaveAnyAttributesTest.verified.txt | 356 +++- ...nyAttributesWithArgumentsTest.verified.txt | 294 +++ ...ributesWithNamedArgumentsTest.verified.txt | 286 +++ ...aveAttributeWithArgumentsTest.verified.txt | 578 +++++- ...tributeWithNamedArgumentsTest.verified.txt | 744 ++++++- ...tsShouldTests.NotHaveNameTest.verified.txt | 252 +++ ...sShouldTests.OnlyDependOnTest.verified.txt | 295 +++ ...dTests.OnlyHaveAttributesTest.verified.txt | 321 ++- coverlet.runsettings | 1 + 34 files changed, 9096 insertions(+), 205 deletions(-) create mode 100644 ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.AreTest.verified.txt create mode 100644 ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.BeTypesThatTest.verified.txt create mode 100644 ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.FollowCustomPredicateTest.verified.txt diff --git a/.gitignore b/.gitignore index ddc78779b..c1c617246 100644 --- a/.gitignore +++ b/.gitignore @@ -62,4 +62,8 @@ list_license.ps1 *.user # Visual Studio cache/options directory -.vs/ \ No newline at end of file +.vs/ + +# Test Results and Coverage Reports +TestResults/ +coveragereport/ diff --git a/ArchUnitNET/Fluent/Syntax/Elements/Members/MethodMembers/MethodMemberConditionsDefinition.cs b/ArchUnitNET/Fluent/Syntax/Elements/Members/MethodMembers/MethodMemberConditionsDefinition.cs index 7248dfabf..4b419aae0 100644 --- a/ArchUnitNET/Fluent/Syntax/Elements/Members/MethodMembers/MethodMemberConditionsDefinition.cs +++ b/ArchUnitNET/Fluent/Syntax/Elements/Members/MethodMembers/MethodMemberConditionsDefinition.cs @@ -10,6 +10,15 @@ namespace ArchUnitNET.Fluent.Syntax.Elements.Members.MethodMembers { public static class MethodMemberConditionsDefinition { + public static RelationCondition BeMethodMembersThat() + { + return new RelationCondition( + ObjectConditionsDefinition.Be, + "be method members that", + "are not method members that" + ); + } + public static ICondition BeConstructor() { return new SimpleCondition( diff --git a/ArchUnitNET/Fluent/Syntax/Elements/Members/MethodMembers/MethodMembersShould.cs b/ArchUnitNET/Fluent/Syntax/Elements/Members/MethodMembers/MethodMembersShould.cs index 45d0ade23..9444e7087 100644 --- a/ArchUnitNET/Fluent/Syntax/Elements/Members/MethodMembers/MethodMembersShould.cs +++ b/ArchUnitNET/Fluent/Syntax/Elements/Members/MethodMembers/MethodMembersShould.cs @@ -11,6 +11,21 @@ public class MethodMembersShould public MethodMembersShould(IArchRuleCreator ruleCreator) : base(ruleCreator) { } + public ShouldRelateToMethodMembersThat< + MethodMembersShouldConjunction, + MethodMember + > BeMethodMembersThat() + { + _ruleCreator.BeginComplexCondition( + ArchRuleDefinition.MethodMembers(), + MethodMemberConditionsDefinition.BeMethodMembersThat() + ); + return new ShouldRelateToMethodMembersThat< + MethodMembersShouldConjunction, + MethodMember + >(_ruleCreator); + } + public MethodMembersShouldConjunction BeConstructor() { _ruleCreator.AddCondition(MethodMemberConditionsDefinition.BeConstructor()); diff --git a/ArchUnitNET/Fluent/Syntax/Elements/ObjectConditionsDefinition.cs b/ArchUnitNET/Fluent/Syntax/Elements/ObjectConditionsDefinition.cs index 113b42a98..3ee509962 100644 --- a/ArchUnitNET/Fluent/Syntax/Elements/ObjectConditionsDefinition.cs +++ b/ArchUnitNET/Fluent/Syntax/Elements/ObjectConditionsDefinition.cs @@ -2939,7 +2939,7 @@ bool Condition(TRuleType obj, Architecture architecture) return true; } - return new ArchitectureCondition(Condition, failDescription, description); + return new ArchitectureCondition(Condition, description, failDescription); } public static ICondition NotHaveAttributeWithNamedArguments( @@ -3041,7 +3041,7 @@ bool Condition(TRuleType obj, Architecture architecture) return true; } - return new ArchitectureCondition(Condition, failDescription, description); + return new ArchitectureCondition(Condition, description, failDescription); } [Obsolete( diff --git a/ArchUnitNET/Fluent/Syntax/Elements/ObjectPredicatesDefinition.cs b/ArchUnitNET/Fluent/Syntax/Elements/ObjectPredicatesDefinition.cs index e42d9cb14..fd7b8960f 100644 --- a/ArchUnitNET/Fluent/Syntax/Elements/ObjectPredicatesDefinition.cs +++ b/ArchUnitNET/Fluent/Syntax/Elements/ObjectPredicatesDefinition.cs @@ -1439,7 +1439,7 @@ bool Condition(T obj, Architecture architecture) goto NextAttribute; } } - else if (!argumentList.Contains(arg)) + else if (!attributeArgs.Contains(arg)) { goto NextAttribute; } @@ -1527,7 +1527,7 @@ bool Predicate(T obj, Architecture architecture) goto NextAttribute; } } - else if (!argumentList.Contains(arg)) + else if (!attributeArgs.Contains(arg)) { goto NextAttribute; } @@ -2344,7 +2344,9 @@ bool Predicate(T obj, Architecture architecture) return false; } } - else if (attributeArguments.Contains(arg)) + else if ( + attributeArguments.Contains(arg) || typeAttributeArguments.Contains(arg) + ) { return false; } @@ -2434,7 +2436,7 @@ IEnumerable argumentValues ) { string description; - var argumentValueList = argumentValues?.ToList() ?? new List { null }; + var argumentValueList = argumentValues?.ToList() ?? new List { }; if (argumentValueList.IsNullOrEmpty()) { description = "do not have attribute \"" + attribute.FullName + "\""; @@ -2503,7 +2505,7 @@ IEnumerable argumentValues ) { string description; - var argumentValueList = argumentValues?.ToList() ?? new List { null }; + var argumentValueList = argumentValues?.ToList() ?? new List { }; if (argumentValueList.IsNullOrEmpty()) { description = "do not have attribute \"" + attribute.FullName + "\""; @@ -2784,7 +2786,7 @@ bool Predicate(T obj, Architecture architecture) goto NextAttribute; } } - else if (!argumentList.Contains(arg)) + else if (!attributeArgs.Contains(arg)) { goto NextAttribute; } @@ -2872,7 +2874,7 @@ bool Predicate(T obj, Architecture architecture) goto NextAttribute; } } - else if (!argumentList.Contains(arg)) + else if (!attributeArgs.Contains(arg)) { goto NextAttribute; } diff --git a/ArchUnitNET/Fluent/Syntax/Elements/ShouldRelateToObjectsThat.cs b/ArchUnitNET/Fluent/Syntax/Elements/ShouldRelateToObjectsThat.cs index 49c3aab5d..b8a7a82e4 100644 --- a/ArchUnitNET/Fluent/Syntax/Elements/ShouldRelateToObjectsThat.cs +++ b/ArchUnitNET/Fluent/Syntax/Elements/ShouldRelateToObjectsThat.cs @@ -1158,7 +1158,7 @@ IEnumerable argumentValues ) { _ruleCreator.ContinueComplexCondition( - ObjectPredicatesDefinition.DoNotHaveAnyAttributesWithArguments( + ObjectPredicatesDefinition.DoNotHaveAttributeWithArguments( attribute, argumentValues ) diff --git a/ArchUnitNET/Fluent/Syntax/Elements/Types/TypeConditionsDefinition.cs b/ArchUnitNET/Fluent/Syntax/Elements/Types/TypeConditionsDefinition.cs index 042efb9b5..7ca6c9bdb 100644 --- a/ArchUnitNET/Fluent/Syntax/Elements/Types/TypeConditionsDefinition.cs +++ b/ArchUnitNET/Fluent/Syntax/Elements/Types/TypeConditionsDefinition.cs @@ -165,6 +165,15 @@ bool Condition(TRuleType ruleType) return new SimpleCondition(Condition, description, failDescription); } + public static RelationCondition BeTypesThat() + { + return new RelationCondition( + ObjectConditionsDefinition.Be, + "be types that", + "are not types that" + ); + } + public static ICondition BeAssignableTo( IType firstType, params IType[] moreTypes diff --git a/ArchUnitNET/Fluent/Syntax/Elements/Types/TypesShould.cs b/ArchUnitNET/Fluent/Syntax/Elements/Types/TypesShould.cs index bd95f7b2a..960af13e3 100644 --- a/ArchUnitNET/Fluent/Syntax/Elements/Types/TypesShould.cs +++ b/ArchUnitNET/Fluent/Syntax/Elements/Types/TypesShould.cs @@ -57,6 +57,17 @@ public TRuleTypeShouldConjunction BeAssignableTo( return Create(_ruleCreator); } + public ShouldRelateToTypesThat BeTypesThat() + { + _ruleCreator.BeginComplexCondition( + ArchRuleDefinition.Types(true), + TypeConditionsDefinition.BeTypesThat() + ); + return new ShouldRelateToTypesThat( + _ruleCreator + ); + } + public TRuleTypeShouldConjunction BeAssignableTo(IType firstType, params IType[] moreTypes) { _ruleCreator.AddCondition( diff --git a/ArchUnitNETTests/AssemblyTestHelper/AssemblyTestHelper.cs b/ArchUnitNETTests/AssemblyTestHelper/AssemblyTestHelper.cs index e1e9aa6f8..2030a3ae2 100644 --- a/ArchUnitNETTests/AssemblyTestHelper/AssemblyTestHelper.cs +++ b/ArchUnitNETTests/AssemblyTestHelper/AssemblyTestHelper.cs @@ -25,6 +25,11 @@ public void AddSnapshotHeader(string header) snapshot.AppendLine("===== " + header + " =====\n"); } + public void AddSnapshotSubHeader(string subHeader) + { + snapshot.AppendLine("----- " + subHeader + " -----\n"); + } + private string FormatSnapshot(IArchRule rule, IEnumerable results) { var formatted = new StringBuilder(); diff --git a/ArchUnitNETTests/AssemblyTestHelper/DependencyAssemblyTestHelpers.cs b/ArchUnitNETTests/AssemblyTestHelper/DependencyAssemblyTestHelpers.cs index fff012da1..dbc805266 100644 --- a/ArchUnitNETTests/AssemblyTestHelper/DependencyAssemblyTestHelpers.cs +++ b/ArchUnitNETTests/AssemblyTestHelper/DependencyAssemblyTestHelpers.cs @@ -48,6 +48,12 @@ public class DependencyAssemblyTestHelper : AssemblyTestHelper public Class ClassWithoutDependencies; public Type ClassWithoutDependenciesSystemType = typeof(ClassWithoutDependencies); + public Class GenericBaseClass; + public Type GenericBaseClassSystemType = typeof(GenericBaseClass<>); + + public Class ChildClassOfGeneric; + public Type ChildClassOfGenericSystemType = typeof(ChildClassOfGeneric); + public Class OtherClassWithoutDependencies; public Type OtherClassWithoutDependenciesSystemType = typeof(OtherClassWithoutDependencies); @@ -84,6 +90,8 @@ public DependencyAssemblyTestHelper() ClassWithMultipleDependencies = Architecture.GetClassOfType( typeof(ClassWithMultipleDependencies) ); + GenericBaseClass = Architecture.GetClassOfType(typeof(GenericBaseClass<>)); + ChildClassOfGeneric = Architecture.GetClassOfType(typeof(ChildClassOfGeneric)); ClassWithoutDependencies = Architecture.GetClassOfType(typeof(ClassWithoutDependencies)); OtherClassWithoutDependencies = Architecture.GetClassOfType( typeof(OtherClassWithoutDependencies) diff --git a/ArchUnitNETTests/Fluent/Syntax/Elements/ObjectsShouldTests.cs b/ArchUnitNETTests/Fluent/Syntax/Elements/ObjectsShouldTests.cs index 27efb82c6..d1c839089 100644 --- a/ArchUnitNETTests/Fluent/Syntax/Elements/ObjectsShouldTests.cs +++ b/ArchUnitNETTests/Fluent/Syntax/Elements/ObjectsShouldTests.cs @@ -1,18 +1,71 @@ using System.Collections.Generic; using System.Linq; +using System.Reflection; using System.Threading.Tasks; using ArchUnitNET.Domain; using ArchUnitNET.Domain.Exceptions; using ArchUnitNET.Fluent; using ArchUnitNET.Fluent.Conditions; +using ArchUnitNET.Fluent.Predicates; +using ArchUnitNET.Fluent.Syntax.Elements.Types; using ArchUnitNETTests.AssemblyTestHelper; using Xunit; using static ArchUnitNET.Fluent.ArchRuleDefinition; namespace ArchUnitNETTests.Fluent.Syntax.Elements; +// csharpier-ignore public class ObjectsShouldTests { + [Fact] + public async Task AreTest() + { + var helper = new DependencyAssemblyTestHelper(); + + // Single argument + var predicates = new List { + Types().That().Are(helper.ChildClass), + Types().That().Are(helper.ChildClassSystemType), + Types().That().Are(Classes().That().Are(helper.ChildClass)), + Types().That().Are([helper.ChildClass]), + Types().That().Are([helper.ChildClassSystemType]), + }; + foreach (var predicate in predicates) + { + Assert.Equal([.. predicate.GetObjects(helper.Architecture)], new List { helper.ChildClass }); + } + + // Multiple arguments + predicates = new List { + Types().That().Are(helper.BaseClass, helper.ChildClass), + Types().That().Are(helper.BaseClassSystemType, helper.ChildClassSystemType), + Types().That().Are(Classes().That().Are(helper.BaseClass, helper.ChildClass)), + Types().That().Are([helper.BaseClass, helper.ChildClass]), + Types().That().Are([helper.BaseClassSystemType, helper.ChildClassSystemType]), + }; + foreach (var predicate in predicates) + { + Assert.Equal([.. predicate.GetObjects(helper.Architecture)], new List { helper.BaseClass, helper.ChildClass }); + } + + // Empty arguments + Assert.Equal([.. Types().That().Are(new List()).GetObjects(helper.Architecture)], new List()); + Assert.Equal([.. Types().That().Are([]).GetObjects(helper.Architecture)], new List()); + + // Empty inputs + Types().That().Are([]).Should().BeTypesThat().Are(helper.ChildClass).AssertOnlyViolations(helper); + + // Predicates as conditions + var should = Types().That().Are(helper.ChildClass).Should(); + should.BeTypesThat().Are(helper.ChildClass).AssertNoViolations(helper); + should.BeTypesThat().Are(helper.ChildClassSystemType).AssertNoViolations(helper); + should.BeTypesThat().Are(Classes().That().Are(helper.ChildClass)).AssertNoViolations(helper); + should.BeTypesThat().Are([helper.ChildClass]).AssertNoViolations(helper); + should.BeTypesThat().Are([helper.ChildClassSystemType]).AssertNoViolations(helper); + + await helper.AssertSnapshotMatches(); + } + [Fact] public async Task BeTest() { @@ -52,6 +105,20 @@ public async Task BeTest() await helper.AssertSnapshotMatches(); } + [Fact] + public async Task BeTypesThatTest() + { + var helper = new DependencyAssemblyTestHelper(); + helper.AddSnapshotHeader("No violations"); + var should = Types().That().Are(helper.ChildClass).Should(); + should.BeTypesThat().Are(helper.ChildClass).AssertNoViolations(helper); + + helper.AddSnapshotHeader("Violations"); + should = Types().That().Are(helper.BaseClass).Should(); + should.BeTypesThat().Are(helper.ChildClass).AssertOnlyViolations(helper); + await helper.AssertSnapshotMatches(); + } + [Fact] public async Task BeInternalTest() { @@ -189,32 +256,91 @@ public async Task BePublicTest() public async Task CallAnyTest() { var helper = new DependencyAssemblyTestHelper(); + helper.AddSnapshotHeader("No violations"); var should = MethodMembers().That().Are(helper.MethodWithSingleDependency).Should(); + + helper.AddSnapshotSubHeader("Conditions"); should.CallAny(helper.CalledMethod).AssertNoViolations(helper); should.CallAny([helper.CalledMethod]).AssertNoViolations(helper); should.CallAny(MethodMembers().That().Are(helper.CalledMethod)).AssertNoViolations(helper); + helper.AddSnapshotSubHeader("Predicates"); + should.Be(MethodMembers().That().CallAny(helper.CalledMethod)).AssertNoViolations(helper); + should.Be(MethodMembers().That().CallAny([helper.CalledMethod])).AssertNoViolations(helper); + should.Be(MethodMembers().That().CallAny(MethodMembers().That().Are(helper.CalledMethod))).AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should.BeMethodMembersThat().CallAny(helper.CalledMethod).AssertNoViolations(helper); + should.BeMethodMembersThat().CallAny([helper.CalledMethod]).AssertNoViolations(helper); + should.BeMethodMembersThat().CallAny(MethodMembers().That().Are(helper.CalledMethod)).AssertNoViolations(helper); + helper.AddSnapshotHeader("Violations"); - should = MethodMembers().That().Are(helper.MethodWithSingleDependency).Should(); - should.CallAny(helper.MethodWithoutDependencies).AssertOnlyViolations(helper); - should.CallAny([helper.MethodWithoutDependencies]).AssertOnlyViolations(helper); - should.CallAny(MethodMembers().That().Are(helper.MethodWithoutDependencies)).AssertOnlyViolations(helper); + should = MethodMembers().That().Are(helper.MethodWithoutDependencies).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should.CallAny(helper.CalledMethod).AssertOnlyViolations(helper); + should.CallAny([helper.CalledMethod]).AssertOnlyViolations(helper); + should.CallAny(MethodMembers().That().Are(helper.CalledMethod)).AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should.Be(MethodMembers().That().CallAny(helper.CalledMethod)).AssertOnlyViolations(helper); + should.Be(MethodMembers().That().CallAny([helper.CalledMethod])).AssertOnlyViolations(helper); + should.Be(MethodMembers().That().CallAny(MethodMembers().That().Are(helper.CalledMethod))).AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should.BeMethodMembersThat().CallAny(helper.CalledMethod).AssertOnlyViolations(helper); + should.BeMethodMembersThat().CallAny([helper.CalledMethod]).AssertOnlyViolations(helper); + should.BeMethodMembersThat().CallAny(MethodMembers().That().Are(helper.CalledMethod)).AssertOnlyViolations(helper); helper.AddSnapshotHeader("Empty arguments"); should = MethodMembers().That().Are(helper.MethodWithSingleDependency).Should(); + + helper.AddSnapshotSubHeader("Conditions"); should.CallAny(new List()).AssertOnlyViolations(helper); should.CallAny(MethodMembers().That().HaveFullName(helper.NonExistentObjectName)).AssertOnlyViolations(helper); + helper.AddSnapshotSubHeader("Predicates"); + should.Be(MethodMembers().That().CallAny(new List())).AssertOnlyViolations(helper); + should.Be(MethodMembers().That().CallAny(MethodMembers().That().HaveFullName(helper.NonExistentObjectName))).AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should.BeMethodMembersThat().CallAny(new List()).AssertOnlyViolations(helper); + should.BeMethodMembersThat().CallAny(MethodMembers().That().HaveFullName(helper.NonExistentObjectName)).AssertOnlyViolations(helper); + helper.AddSnapshotHeader("Multiple arguments"); should = MethodMembers().That().Are(helper.MethodWithMultipleDependencies).Should(); + + helper.AddSnapshotSubHeader("Conditions"); should.CallAny(helper.MethodWithoutDependencies, helper.MethodWithMultipleDependencies).AssertOnlyViolations(helper); should.CallAny([helper.MethodWithoutDependencies, helper.MethodWithMultipleDependencies]).AssertOnlyViolations(helper); should.CallAny(MethodMembers().That().Are(helper.MethodWithoutDependencies, helper.MethodWithMultipleDependencies)).AssertOnlyViolations(helper); + helper.AddSnapshotSubHeader("Predicates"); + should.Be(MethodMembers().That().CallAny(helper.MethodWithoutDependencies, helper.MethodWithMultipleDependencies)).AssertOnlyViolations(helper); + should.Be(MethodMembers().That().CallAny([helper.MethodWithoutDependencies, helper.MethodWithMultipleDependencies])).AssertOnlyViolations(helper); + should.Be(MethodMembers().That().CallAny(MethodMembers().That().Are(helper.MethodWithoutDependencies, helper.MethodWithMultipleDependencies))).AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should.BeMethodMembersThat().CallAny(helper.MethodWithoutDependencies, helper.MethodWithMultipleDependencies).AssertOnlyViolations(helper); + should.BeMethodMembersThat().CallAny([helper.MethodWithoutDependencies, helper.MethodWithMultipleDependencies]).AssertOnlyViolations(helper); + should.BeMethodMembersThat().CallAny(MethodMembers().That().Are(helper.MethodWithoutDependencies, helper.MethodWithMultipleDependencies)).AssertOnlyViolations(helper); + helper.AddSnapshotHeader("Input with multiple dependencies"); - MethodMembers().That().Are(helper.MethodWithMultipleDependencies).Should().CallAny(helper.CalledMethod1, helper.MethodWithoutDependencies).AssertNoViolations(helper); - MethodMembers().That().Are(helper.MethodWithMultipleDependencies).Should().CallAny(helper.MethodWithoutDependencies).AssertOnlyViolations(helper); + should = MethodMembers().That().Are(helper.MethodWithMultipleDependencies).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should.CallAny(helper.CalledMethod1, helper.MethodWithoutDependencies).AssertNoViolations(helper); + should.CallAny(helper.MethodWithoutDependencies).AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should.Be(MethodMembers().That().CallAny(helper.CalledMethod1, helper.MethodWithoutDependencies)).AssertNoViolations(helper); + should.Be(MethodMembers().That().CallAny(helper.MethodWithoutDependencies)).AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should.BeMethodMembersThat().CallAny(helper.CalledMethod1, helper.MethodWithoutDependencies).AssertNoViolations(helper); + should.BeMethodMembersThat().CallAny(helper.MethodWithoutDependencies).AssertOnlyViolations(helper); + await helper.AssertSnapshotMatches(); } @@ -222,46 +348,132 @@ public async Task CallAnyTest() public async Task DependOnAnyTest() { var helper = new DependencyAssemblyTestHelper(); + helper.AddSnapshotHeader("No violations"); var should = Types().That().Are(helper.ChildClass).Should(); + + helper.AddSnapshotSubHeader("Conditions"); should.DependOnAny(helper.BaseClass).AssertNoViolations(helper); should.DependOnAny(helper.BaseClassSystemType).AssertNoViolations(helper); should.DependOnAny(Classes().That().Are(helper.BaseClass)).AssertNoViolations(helper); should.DependOnAny([helper.BaseClass]).AssertNoViolations(helper); should.DependOnAny([helper.BaseClassSystemType]).AssertNoViolations(helper); + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().DependOnAny(helper.BaseClass)).AssertNoViolations(helper); + should.Be(Types().That().DependOnAny(helper.BaseClassSystemType)).AssertNoViolations(helper); + should.Be(Types().That().DependOnAny(Classes().That().Are(helper.BaseClass))).AssertNoViolations(helper); + should.Be(Types().That().DependOnAny([helper.BaseClass])).AssertNoViolations(helper); + should.Be(Types().That().DependOnAny([helper.BaseClassSystemType])).AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should.BeTypesThat().DependOnAny(helper.BaseClass).AssertNoViolations(helper); + should.BeTypesThat().DependOnAny(helper.BaseClassSystemType).AssertNoViolations(helper); + should.BeTypesThat().DependOnAny(Classes().That().Are(helper.BaseClass)).AssertNoViolations(helper); + should.BeTypesThat().DependOnAny([helper.BaseClass]).AssertNoViolations(helper); + should.BeTypesThat().DependOnAny([helper.BaseClassSystemType]).AssertNoViolations(helper); + helper.AddSnapshotHeader("Violations"); should = Types().That().HaveFullName(helper.ClassWithMultipleDependencies.FullName).Should(); + + helper.AddSnapshotSubHeader("Conditions"); should.DependOnAny(helper.ClassWithoutDependencies).AssertOnlyViolations(helper); should.DependOnAny(helper.ClassWithoutDependenciesSystemType).AssertOnlyViolations(helper); should.DependOnAny(Classes().That().Are(helper.ClassWithoutDependencies)).AssertOnlyViolations(helper); should.DependOnAny([helper.ClassWithoutDependencies]).AssertOnlyViolations(helper); should.DependOnAny([helper.ClassWithoutDependenciesSystemType]).AssertOnlyViolations(helper); + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().DependOnAny(helper.ClassWithoutDependencies)).AssertOnlyViolations(helper); + should.Be(Types().That().DependOnAny(helper.ClassWithoutDependenciesSystemType)).AssertOnlyViolations(helper); + should.Be(Types().That().DependOnAny(Classes().That().Are(helper.ClassWithoutDependencies))).AssertOnlyViolations(helper); + should.Be(Types().That().DependOnAny([helper.ClassWithoutDependencies])).AssertOnlyViolations(helper); + should.Be(Types().That().DependOnAny([helper.ClassWithoutDependenciesSystemType])).AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should.BeTypesThat().DependOnAny(helper.ClassWithoutDependencies).AssertOnlyViolations(helper); + should.BeTypesThat().DependOnAny(helper.ClassWithoutDependenciesSystemType).AssertOnlyViolations(helper); + should.BeTypesThat().DependOnAny(Classes().That().Are(helper.ClassWithoutDependencies)).AssertOnlyViolations(helper); + should.BeTypesThat().DependOnAny([helper.ClassWithoutDependencies]).AssertOnlyViolations(helper); + should.BeTypesThat().DependOnAny([helper.ClassWithoutDependenciesSystemType]).AssertOnlyViolations(helper); + helper.AddSnapshotHeader("Type outside of architecture"); should = Types().That().Are(helper.ClassWithMultipleDependencies).Should(); + + helper.AddSnapshotSubHeader("Conditions"); should.DependOnAny(typeof(AttributeNamespace.ClassWithoutAttributes)).AssertException(helper); + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().DependOnAny(typeof(AttributeNamespace.ClassWithoutAttributes))).AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should.BeTypesThat().DependOnAny(typeof(AttributeNamespace.ClassWithoutAttributes)).AssertOnlyViolations(helper); + helper.AddSnapshotHeader("Empty arguments"); should = Types().That().Are(helper.ClassWithMultipleDependencies).Should(); + + helper.AddSnapshotSubHeader("Conditions"); should.DependOnAny(new List()).AssertOnlyViolations(helper); should.DependOnAny(new List()).AssertOnlyViolations(helper); should.DependOnAny(Classes().That().HaveFullName(helper.NonExistentObjectName)).AssertOnlyViolations(helper); + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().DependOnAny(new List())).AssertOnlyViolations(helper); + should.Be(Types().That().DependOnAny(new List())).AssertOnlyViolations(helper); + should.Be(Types().That().DependOnAny(Classes().That().HaveFullName(helper.NonExistentObjectName))).AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should.BeTypesThat().DependOnAny(new List()).AssertOnlyViolations(helper); + should.BeTypesThat().DependOnAny(new List()).AssertOnlyViolations(helper); + should.BeTypesThat().DependOnAny(Classes().That().HaveFullName(helper.NonExistentObjectName)).AssertOnlyViolations(helper); + helper.AddSnapshotHeader("Multiple arguments"); should = Types().That().Are(helper.ClassWithMultipleDependencies).Should(); + + helper.AddSnapshotSubHeader("Conditions"); should.DependOnAny(helper.ClassWithoutDependencies, helper.BaseClass).AssertOnlyViolations(helper); should.DependOnAny([helper.ClassWithoutDependencies, helper.BaseClass]).AssertOnlyViolations(helper); should.DependOnAny(helper.ClassWithoutDependenciesSystemType, helper.BaseClassSystemType).AssertOnlyViolations(helper); should.DependOnAny([helper.ClassWithoutDependenciesSystemType, helper.BaseClassSystemType]).AssertOnlyViolations(helper); + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().DependOnAny(helper.ClassWithoutDependencies, helper.BaseClass)).AssertOnlyViolations(helper); + should.Be(Types().That().DependOnAny([helper.ClassWithoutDependencies, helper.BaseClass])).AssertOnlyViolations(helper); + should.Be(Types().That().DependOnAny(helper.ClassWithoutDependenciesSystemType, helper.BaseClassSystemType)).AssertOnlyViolations(helper); + should.Be(Types().That().DependOnAny([helper.ClassWithoutDependenciesSystemType, helper.BaseClassSystemType])).AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should.BeTypesThat().DependOnAny(helper.ClassWithoutDependencies, helper.BaseClass).AssertOnlyViolations(helper); + should.BeTypesThat().DependOnAny([helper.ClassWithoutDependencies, helper.BaseClass]).AssertOnlyViolations(helper); + should.BeTypesThat().DependOnAny(helper.ClassWithoutDependenciesSystemType, helper.BaseClassSystemType).AssertOnlyViolations(helper); + should.BeTypesThat().DependOnAny([helper.ClassWithoutDependenciesSystemType, helper.BaseClassSystemType]).AssertOnlyViolations(helper); + helper.AddSnapshotHeader("Input without dependencies"); should = Types().That().Are(helper.ClassWithoutDependencies).Should(); + + helper.AddSnapshotSubHeader("Conditions"); should.DependOnAny([helper.BaseClass, helper.ChildClass]).AssertOnlyViolations(helper); + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().DependOnAny([helper.BaseClass, helper.ChildClass])).AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should.BeTypesThat().DependOnAny([helper.BaseClass, helper.ChildClass]).AssertOnlyViolations(helper); + helper.AddSnapshotHeader("Multiple inputs"); + + helper.AddSnapshotSubHeader("Conditions"); Types().That().Are(helper.ChildClass1, helper.ChildClass2).Should().DependOnAny(helper.BaseClassWithMultipleDependenciesSystemType).AssertNoViolations(helper); Types().That().Are(helper.ChildClass, helper.BaseClass).Should().DependOnAny(helper.ClassWithoutDependencies).AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + Types().That().Are(helper.ChildClass1, helper.ChildClass2).Should().Be(Types().That().DependOnAny(helper.BaseClassWithMultipleDependenciesSystemType)).AssertNoViolations(helper); + Types().That().Are(helper.ChildClass, helper.BaseClass).Should().Be(Types().That().DependOnAny(helper.ClassWithoutDependencies)).AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + Types().That().Are(helper.ChildClass1, helper.ChildClass2).Should().BeTypesThat().DependOnAny(helper.BaseClassWithMultipleDependenciesSystemType).AssertNoViolations(helper); + Types().That().Are(helper.ChildClass, helper.BaseClass).Should().BeTypesThat().DependOnAny(helper.ClassWithoutDependencies).AssertOnlyViolations(helper); + await helper.AssertSnapshotMatches(); } @@ -316,6 +528,7 @@ public bool CheckEmpty() public async Task FollowCustomConditionTest() { var helper = new DependencyAssemblyTestHelper(); + helper.AddSnapshotHeader("No violations"); var should = Types().That().Are(helper.ChildClass).Should(); should.FollowCustomCondition(new CustomCondition()).AssertNoViolations(helper); @@ -327,6 +540,46 @@ public async Task FollowCustomConditionTest() should.FollowCustomCondition(new CustomCondition()).AssertOnlyViolations(helper); should.FollowCustomCondition(t => new ConditionResult(t, t.Name == "ChildClass", "does not follow custom condition"), "follow custom condition").AssertOnlyViolations(helper); should.FollowCustomCondition(t => t.Name == "ChildClass", "follow custom condition", "does not follow custom condition").AssertOnlyViolations(helper); + + await helper.AssertSnapshotMatches(); + } + + class CustomPredicate : IPredicate + { + public string Description => "follow custom predicate"; + + public IEnumerable GetMatchingObjects(IEnumerable objects, Architecture architecture) + { + return objects.Where(t => t.Name == "ChildClass"); + } + } + + [Fact] + public async Task FollowCustomPredicateTest() + { + var helper = new DependencyAssemblyTestHelper(); + + helper.AddSnapshotHeader("No violations"); + var should = Types().That().Are(helper.ChildClass).Should(); + helper.AddSnapshotSubHeader("Conditions"); + should.Be(Types().That().FollowCustomPredicate(new CustomPredicate())).AssertNoViolations(helper); + should.Be(Types().That().FollowCustomPredicate(t => t.Name == "ChildClass", "follow custom predicate")).AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should.BeTypesThat().FollowCustomPredicate(new CustomPredicate()).AssertNoViolations(helper); + should.BeTypesThat().FollowCustomPredicate(t => t.Name == "ChildClass", "follow custom predicate").AssertNoViolations(helper); + + helper.AddSnapshotHeader("Violations"); + should = Types().That().Are(helper.BaseClass).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should.Be(Types().That().FollowCustomPredicate(new CustomPredicate())).AssertOnlyViolations(helper); + should.Be(Types().That().FollowCustomPredicate(t => t.Name == "ChildClass", "follow custom predicate")).AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should.BeTypesThat().FollowCustomPredicate(new CustomPredicate()).AssertOnlyViolations(helper); + should.BeTypesThat().FollowCustomPredicate(t => t.Name == "ChildClass", "follow custom predicate").AssertOnlyViolations(helper); + await helper.AssertSnapshotMatches(); } @@ -334,39 +587,111 @@ public async Task FollowCustomConditionTest() public async Task HaveAnyAttributesTest() { var helper = new AttributeAssemblyTestHelpers(); + helper.AddSnapshotHeader("No violations"); var should = Types().That().Are(helper.ClassWithTwoAttributes).Should(); + + helper.AddSnapshotSubHeader("Conditions"); should.HaveAnyAttributes(helper.Attribute1).AssertNoViolations(helper); should.HaveAnyAttributes([helper.Attribute1]).AssertNoViolations(helper); should.HaveAnyAttributes(helper.Attribute1SystemType).AssertNoViolations(helper); should.HaveAnyAttributes([helper.Attribute1SystemType]).AssertNoViolations(helper); should.HaveAnyAttributes(Attributes().That().Are(helper.Attribute1)).AssertNoViolations(helper); + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().HaveAnyAttributes(helper.Attribute1)).AssertNoViolations(helper); + should.Be(Types().That().HaveAnyAttributes([helper.Attribute1])).AssertNoViolations(helper); + should.Be(Types().That().HaveAnyAttributes(helper.Attribute1SystemType)).AssertNoViolations(helper); + should.Be(Types().That().HaveAnyAttributes([helper.Attribute1SystemType])).AssertNoViolations(helper); + should.Be(Types().That().HaveAnyAttributes(Attributes().That().Are(helper.Attribute1))).AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should.BeTypesThat().HaveAnyAttributes(helper.Attribute1).AssertNoViolations(helper); + should.BeTypesThat().HaveAnyAttributes([helper.Attribute1]).AssertNoViolations(helper); + should.BeTypesThat().HaveAnyAttributes(helper.Attribute1SystemType).AssertNoViolations(helper); + should.BeTypesThat().HaveAnyAttributes([helper.Attribute1SystemType]).AssertNoViolations(helper); + should.BeTypesThat().HaveAnyAttributes(Attributes().That().Are(helper.Attribute1)).AssertNoViolations(helper); + helper.AddSnapshotHeader("Violations"); should = Types().That().Are(helper.ClassWithTwoAttributes).Should(); + + helper.AddSnapshotSubHeader("Conditions"); should.HaveAnyAttributes(helper.UnusedAttribute).AssertOnlyViolations(helper); should.HaveAnyAttributes([helper.UnusedAttribute]).AssertOnlyViolations(helper); should.HaveAnyAttributes(helper.UnusedAttributeSystemType).AssertOnlyViolations(helper); should.HaveAnyAttributes([helper.UnusedAttributeSystemType]).AssertOnlyViolations(helper); should.HaveAnyAttributes(Attributes().That().Are(helper.UnusedAttribute)).AssertOnlyViolations(helper); + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().HaveAnyAttributes(helper.UnusedAttribute)).AssertOnlyViolations(helper); + should.Be(Types().That().HaveAnyAttributes([helper.UnusedAttribute])).AssertOnlyViolations(helper); + should.Be(Types().That().HaveAnyAttributes(helper.UnusedAttributeSystemType)).AssertOnlyViolations(helper); + should.Be(Types().That().HaveAnyAttributes([helper.UnusedAttributeSystemType])).AssertOnlyViolations(helper); + should.Be(Types().That().HaveAnyAttributes(Attributes().That().Are(helper.UnusedAttribute))).AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should.BeTypesThat().HaveAnyAttributes(helper.UnusedAttribute).AssertOnlyViolations(helper); + should.BeTypesThat().HaveAnyAttributes([helper.UnusedAttribute]).AssertOnlyViolations(helper); + should.BeTypesThat().HaveAnyAttributes(helper.UnusedAttributeSystemType).AssertOnlyViolations(helper); + should.BeTypesThat().HaveAnyAttributes([helper.UnusedAttributeSystemType]).AssertOnlyViolations(helper); + should.BeTypesThat().HaveAnyAttributes(Attributes().That().Are(helper.UnusedAttribute)).AssertOnlyViolations(helper); + helper.AddSnapshotHeader("Empty arguments"); should = Types().That().Are(helper.ClassWithTwoAttributes).Should(); + + helper.AddSnapshotSubHeader("Conditions"); should.HaveAnyAttributes(new List()).AssertOnlyViolations(helper); should.HaveAnyAttributes(new List()).AssertOnlyViolations(helper); should.HaveAnyAttributes(Attributes().That().HaveFullName(helper.NonExistentObjectName)).AssertOnlyViolations(helper); + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().HaveAnyAttributes(new List())).AssertOnlyViolations(helper); + should.Be(Types().That().HaveAnyAttributes(new List())).AssertOnlyViolations(helper); + should.Be(Types().That().HaveAnyAttributes(Attributes().That().HaveFullName(helper.NonExistentObjectName))).AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should.BeTypesThat().HaveAnyAttributes(new List()).AssertOnlyViolations(helper); + should.BeTypesThat().HaveAnyAttributes(new List()).AssertOnlyViolations(helper); + should.BeTypesThat().HaveAnyAttributes(Attributes().That().HaveFullName(helper.NonExistentObjectName)).AssertOnlyViolations(helper); + helper.AddSnapshotHeader("Multiple arguments"); should = Types().That().Are(helper.ClassWithTwoAttributes).Should(); + + helper.AddSnapshotSubHeader("Conditions"); should.HaveAnyAttributes(helper.Attribute1, helper.UnusedAttribute).AssertNoViolations(helper); should.HaveAnyAttributes([helper.Attribute1, helper.UnusedAttribute]).AssertNoViolations(helper); should.HaveAnyAttributes(helper.Attribute1SystemType, helper.UnusedAttributeSystemType).AssertNoViolations(helper); should.HaveAnyAttributes([helper.Attribute1SystemType, helper.UnusedAttributeSystemType]).AssertNoViolations(helper); should.HaveAnyAttributes(Attributes().That().Are(helper.Attribute1, helper.UnusedAttribute)).AssertNoViolations(helper); + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().HaveAnyAttributes(helper.Attribute1, helper.UnusedAttribute)).AssertNoViolations(helper); + should.Be(Types().That().HaveAnyAttributes([helper.Attribute1, helper.UnusedAttribute])).AssertNoViolations(helper); + should.Be(Types().That().HaveAnyAttributes(helper.Attribute1SystemType, helper.UnusedAttributeSystemType)).AssertNoViolations(helper); + should.Be(Types().That().HaveAnyAttributes([helper.Attribute1SystemType, helper.UnusedAttributeSystemType])).AssertNoViolations(helper); + should.Be(Types().That().HaveAnyAttributes(Attributes().That().Are(helper.Attribute1, helper.UnusedAttribute))).AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should.BeTypesThat().HaveAnyAttributes(helper.Attribute1, helper.UnusedAttribute).AssertNoViolations(helper); + should.BeTypesThat().HaveAnyAttributes([helper.Attribute1, helper.UnusedAttribute]).AssertNoViolations(helper); + should.BeTypesThat().HaveAnyAttributes(helper.Attribute1SystemType, helper.UnusedAttributeSystemType).AssertNoViolations(helper); + should.BeTypesThat().HaveAnyAttributes([helper.Attribute1SystemType, helper.UnusedAttributeSystemType]).AssertNoViolations(helper); + should.BeTypesThat().HaveAnyAttributes(Attributes().That().Are(helper.Attribute1, helper.UnusedAttribute)).AssertNoViolations(helper); + helper.AddSnapshotHeader("Multiple inputs"); + + helper.AddSnapshotSubHeader("Conditions"); Types().That().Are(helper.ClassWithTwoAttributes, helper.ClassWithThreeAttributes).Should().HaveAnyAttributes(helper.Attribute1).AssertNoViolations(helper); Types().That().Are(helper.ClassWithTwoAttributes, helper.ClassWithoutAttributes).Should().HaveAnyAttributes(helper.Attribute1).AssertAnyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + Types().That().Are(helper.ClassWithTwoAttributes, helper.ClassWithThreeAttributes).Should().Be(Types().That().HaveAnyAttributes(helper.Attribute1)).AssertNoViolations(helper); + Types().That().Are(helper.ClassWithTwoAttributes, helper.ClassWithoutAttributes).Should().Be(Types().That().HaveAnyAttributes(helper.Attribute1)).AssertAnyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + Types().That().Are(helper.ClassWithTwoAttributes, helper.ClassWithThreeAttributes).Should().BeTypesThat().HaveAnyAttributes(helper.Attribute1).AssertNoViolations(helper); + Types().That().Are(helper.ClassWithTwoAttributes, helper.ClassWithoutAttributes).Should().BeTypesThat().HaveAnyAttributes(helper.Attribute1).AssertAnyViolations(helper); + await helper.AssertSnapshotMatches(); } @@ -388,42 +713,122 @@ public async Task HaveAnyAttributesThatTest() public async Task HaveAnyAttributesWithArgumentsTest() { var helper = new AttributeAssemblyTestHelpers(); + helper.AddSnapshotHeader("No violations with type arguments"); var should = Types().That().Are(helper.ClassWithSingleAttributeWithArguments).Should(); - should.HaveAnyAttributesWithArguments(helper.Attribute1StringArgument).AssertNoViolations(helper); - should.HaveAnyAttributesWithArguments([helper.Attribute1StringArgument]).AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Conditions"); + should.HaveAnyAttributesWithArguments(helper.Attribute1TypeArgumentSystemType).AssertNoViolations(helper); + should.HaveAnyAttributesWithArguments([helper.Attribute1TypeArgumentSystemType]).AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().HaveAnyAttributesWithArguments(helper.Attribute1TypeArgumentSystemType)).AssertNoViolations(helper); + should.Be(Types().That().HaveAnyAttributesWithArguments([helper.Attribute1TypeArgumentSystemType])).AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should.BeTypesThat().HaveAnyAttributesWithArguments(helper.Attribute1TypeArgumentSystemType).AssertNoViolations(helper); + should.BeTypesThat().HaveAnyAttributesWithArguments([helper.Attribute1TypeArgumentSystemType]).AssertNoViolations(helper); helper.AddSnapshotHeader("No violations with value arguments"); should = Types().That().Are(helper.ClassWithSingleAttributeWithArguments).Should(); + + helper.AddSnapshotSubHeader("Conditions"); should.HaveAnyAttributesWithArguments(helper.Attribute1IntegerArgument).AssertNoViolations(helper); should.HaveAnyAttributesWithArguments([helper.Attribute1IntegerArgument]).AssertNoViolations(helper); + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().HaveAnyAttributesWithArguments(helper.Attribute1IntegerArgument)).AssertNoViolations(helper); + should.Be(Types().That().HaveAnyAttributesWithArguments([helper.Attribute1IntegerArgument])).AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should.BeTypesThat().HaveAnyAttributesWithArguments(helper.Attribute1IntegerArgument).AssertNoViolations(helper); + should.BeTypesThat().HaveAnyAttributesWithArguments([helper.Attribute1IntegerArgument]).AssertNoViolations(helper); + helper.AddSnapshotHeader("Violations with type arguments"); should = Types().That().Are(helper.ClassWithSingleAttributeWithArguments).Should(); - should.HaveAnyAttributesWithArguments(helper.UnusedTypeArgument).AssertOnlyViolations(helper); - should.HaveAnyAttributesWithArguments([helper.UnusedTypeArgument]).AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Conditions"); + should.HaveAnyAttributesWithArguments(helper.UnusedTypeArgumentSystemType).AssertOnlyViolations(helper); + should.HaveAnyAttributesWithArguments([helper.UnusedTypeArgumentSystemType]).AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().HaveAnyAttributesWithArguments(helper.UnusedTypeArgumentSystemType)).AssertOnlyViolations(helper); + should.Be(Types().That().HaveAnyAttributesWithArguments([helper.UnusedTypeArgumentSystemType])).AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should.BeTypesThat().HaveAnyAttributesWithArguments(helper.UnusedTypeArgumentSystemType).AssertOnlyViolations(helper); + should.BeTypesThat().HaveAnyAttributesWithArguments([helper.UnusedTypeArgumentSystemType]).AssertOnlyViolations(helper); helper.AddSnapshotHeader("Violations with value arguments"); should = Types().That().Are(helper.ClassWithoutAttributes).Should(); + + helper.AddSnapshotSubHeader("Conditions"); should.HaveAnyAttributesWithArguments(helper.Attribute1IntegerArgument).AssertOnlyViolations(helper); should.HaveAnyAttributesWithArguments([helper.Attribute1IntegerArgument]).AssertOnlyViolations(helper); + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().HaveAnyAttributesWithArguments(helper.Attribute1IntegerArgument)).AssertOnlyViolations(helper); + should.Be(Types().That().HaveAnyAttributesWithArguments([helper.Attribute1IntegerArgument])).AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should.BeTypesThat().HaveAnyAttributesWithArguments(helper.Attribute1IntegerArgument).AssertOnlyViolations(helper); + should.BeTypesThat().HaveAnyAttributesWithArguments([helper.Attribute1IntegerArgument]).AssertOnlyViolations(helper); + helper.AddSnapshotHeader("Null argument"); should = Types().That().Are(helper.ClassWithSingleAttributeWithArguments).Should(); + + helper.AddSnapshotSubHeader("Conditions"); should.HaveAnyAttributesWithArguments(null).AssertOnlyViolations(helper); + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().HaveAnyAttributesWithArguments(null)).AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should.BeTypesThat().HaveAnyAttributesWithArguments(null).AssertOnlyViolations(helper); + helper.AddSnapshotHeader("Empty arguments"); + + helper.AddSnapshotSubHeader("Conditions"); Types().That().Are(helper.ClassWithSingleAttributeWithArguments).Should().HaveAnyAttributesWithArguments([]).AssertNoViolations(helper); Types().That().Are(helper.ClassWithTwoAttributesWithArguments).Should().HaveAnyAttributesWithArguments([]).AssertNoViolations(helper); + helper.AddSnapshotSubHeader("Predicates"); + Types().That().Are(helper.ClassWithSingleAttributeWithArguments).Should().Be(Types().That().HaveAnyAttributesWithArguments([])).AssertNoViolations(helper); + Types().That().Are(helper.ClassWithTwoAttributesWithArguments).Should().Be(Types().That().HaveAnyAttributesWithArguments([])).AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + Types().That().Are(helper.ClassWithSingleAttributeWithArguments).Should().BeTypesThat().HaveAnyAttributesWithArguments([]).AssertNoViolations(helper); + Types().That().Are(helper.ClassWithTwoAttributesWithArguments).Should().BeTypesThat().HaveAnyAttributesWithArguments([]).AssertNoViolations(helper); + helper.AddSnapshotHeader("Multiple arguments"); should = Types().That().Are(helper.ClassWithSingleAttributeWithArguments).Should(); + + helper.AddSnapshotSubHeader("Conditions"); should.HaveAnyAttributesWithArguments([helper.UnusedAttributeIntValue, helper.UnusedAttributeStringValue]).AssertOnlyViolations(helper); should.HaveAnyAttributesWithArguments(helper.UnusedAttributeIntValue, helper.UnusedAttributeStringValue).AssertOnlyViolations(helper); + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().HaveAnyAttributesWithArguments([helper.UnusedAttributeIntValue, helper.UnusedAttributeStringValue])).AssertOnlyViolations(helper); + should.Be(Types().That().HaveAnyAttributesWithArguments(helper.UnusedAttributeIntValue, helper.UnusedAttributeStringValue)).AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should.BeTypesThat().HaveAnyAttributesWithArguments([helper.UnusedAttributeIntValue, helper.UnusedAttributeStringValue]).AssertOnlyViolations(helper); + should.BeTypesThat().HaveAnyAttributesWithArguments(helper.UnusedAttributeIntValue, helper.UnusedAttributeStringValue).AssertOnlyViolations(helper); + helper.AddSnapshotHeader("Multiple inputs"); + + helper.AddSnapshotSubHeader("Conditions"); Types().That().Are(helper.ClassWithSingleAttributeWithArguments, helper.ClassWithTwoAttributesWithArguments).Should().HaveAnyAttributesWithArguments(helper.Attribute1StringArgument).AssertNoViolations(helper); Types().That().Are(helper.ClassWithSingleAttributeWithArguments, helper.ClassWithTwoAttributesWithArguments).Should().HaveAnyAttributesWithArguments(helper.Attribute2IntegerArgument).AssertAnyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + Types().That().Are(helper.ClassWithSingleAttributeWithArguments, helper.ClassWithTwoAttributesWithArguments).Should().Be(Types().That().HaveAnyAttributesWithArguments(helper.Attribute1StringArgument)).AssertNoViolations(helper); + Types().That().Are(helper.ClassWithSingleAttributeWithArguments, helper.ClassWithTwoAttributesWithArguments).Should().Be(Types().That().HaveAnyAttributesWithArguments(helper.Attribute2IntegerArgument)).AssertAnyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + Types().That().Are(helper.ClassWithSingleAttributeWithArguments, helper.ClassWithTwoAttributesWithArguments).Should().BeTypesThat().HaveAnyAttributesWithArguments(helper.Attribute1StringArgument).AssertNoViolations(helper); + Types().That().Are(helper.ClassWithSingleAttributeWithArguments, helper.ClassWithTwoAttributesWithArguments).Should().BeTypesThat().HaveAnyAttributesWithArguments(helper.Attribute2IntegerArgument).AssertAnyViolations(helper); + await helper.AssertSnapshotMatches(); } @@ -431,46 +836,148 @@ public async Task HaveAnyAttributesWithArgumentsTest() public async Task HaveAnyAttributesWithNamedArguments() { var helper = new AttributeAssemblyTestHelpers(); + helper.AddSnapshotHeader("No violations with type arguments"); var should = Types().That().Are(helper.ClassWithSingleAttributeWithNamedArguments).Should(); + + helper.AddSnapshotSubHeader("Conditions"); should.HaveAnyAttributesWithNamedArguments(("NamedParameter1", helper.Attribute1TypeArgumentSystemType)).AssertNoViolations(helper); should.HaveAnyAttributesWithNamedArguments([("NamedParameter1", helper.Attribute1TypeArgumentSystemType)]).AssertNoViolations(helper); + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().HaveAnyAttributesWithNamedArguments(("NamedParameter1", helper.Attribute1TypeArgumentSystemType))).AssertNoViolations(helper); + should.Be(Types().That().HaveAnyAttributesWithNamedArguments([("NamedParameter1", helper.Attribute1TypeArgumentSystemType)])).AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should.BeTypesThat().HaveAnyAttributesWithNamedArguments(("NamedParameter1", helper.Attribute1TypeArgumentSystemType)).AssertNoViolations(helper); + should.BeTypesThat().HaveAnyAttributesWithNamedArguments([("NamedParameter1", helper.Attribute1TypeArgumentSystemType)]).AssertNoViolations(helper); + helper.AddSnapshotHeader("No violations with value arguments"); should = Types().That().Are(helper.ClassWithSingleAttributeWithNamedArguments).Should(); + + helper.AddSnapshotSubHeader("Conditions"); should.HaveAnyAttributesWithNamedArguments(("NamedParameter2", helper.Attribute1StringArgument)).AssertNoViolations(helper); should.HaveAnyAttributesWithNamedArguments([("NamedParameter2", helper.Attribute1StringArgument)]).AssertNoViolations(helper); + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().HaveAnyAttributesWithNamedArguments(("NamedParameter2", helper.Attribute1StringArgument))).AssertNoViolations(helper); + should.Be(Types().That().HaveAnyAttributesWithNamedArguments([("NamedParameter2", helper.Attribute1StringArgument)])).AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should.BeTypesThat().HaveAnyAttributesWithNamedArguments(("NamedParameter2", helper.Attribute1StringArgument)).AssertNoViolations(helper); + should.BeTypesThat().HaveAnyAttributesWithNamedArguments([("NamedParameter2", helper.Attribute1StringArgument)]).AssertNoViolations(helper); + + helper.AddSnapshotHeader("Violations for attribute without named arguments"); + should = Types().That().Are(helper.ClassWithSingleAttribute).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should.HaveAnyAttributesWithNamedArguments(("NamedParameter1", helper.Attribute1TypeArgumentSystemType)).AssertOnlyViolations(helper); + should.HaveAnyAttributesWithNamedArguments([("NamedParameter1", helper.Attribute1TypeArgumentSystemType)]).AssertOnlyViolations(helper); + should.HaveAnyAttributesWithNamedArguments(("NamedParameter2", helper.Attribute1StringArgument)).AssertOnlyViolations(helper); + should.HaveAnyAttributesWithNamedArguments([("NamedParameter2", helper.Attribute1StringArgument)]).AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().HaveAnyAttributesWithNamedArguments(("NamedParameter1", helper.Attribute1TypeArgumentSystemType))).AssertOnlyViolations(helper); + should.Be(Types().That().HaveAnyAttributesWithNamedArguments([("NamedParameter1", helper.Attribute1TypeArgumentSystemType)])).AssertOnlyViolations(helper); + should.Be(Types().That().HaveAnyAttributesWithNamedArguments(("NamedParameter2", helper.Attribute1StringArgument))).AssertOnlyViolations(helper); + should.Be(Types().That().HaveAnyAttributesWithNamedArguments([("NamedParameter2", helper.Attribute1StringArgument)])).AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should.BeTypesThat().HaveAnyAttributesWithNamedArguments(("NamedParameter1", helper.Attribute1TypeArgumentSystemType)).AssertOnlyViolations(helper); + should.BeTypesThat().HaveAnyAttributesWithNamedArguments([("NamedParameter1", helper.Attribute1TypeArgumentSystemType)]).AssertOnlyViolations(helper); + should.BeTypesThat().HaveAnyAttributesWithNamedArguments(("NamedParameter2", helper.Attribute1StringArgument)).AssertOnlyViolations(helper); + should.BeTypesThat().HaveAnyAttributesWithNamedArguments([("NamedParameter2", helper.Attribute1StringArgument)]).AssertOnlyViolations(helper); + helper.AddSnapshotHeader("Violations with type arguments"); should = Types().That().Are(helper.ClassWithSingleAttributeWithNamedArguments).Should(); - should.HaveAnyAttributesWithNamedArguments(("InvalidName", helper.Attribute1TypeArgument)).AssertOnlyViolations(helper); - should.HaveAnyAttributesWithNamedArguments([("InvalidName", helper.Attribute1TypeArgument)]).AssertOnlyViolations(helper); - should.HaveAnyAttributesWithNamedArguments(("NamedParameter1", helper.UnusedTypeArgument)).AssertOnlyViolations(helper); - should.HaveAnyAttributesWithNamedArguments([("NamedParameter1", helper.UnusedTypeArgument)]).AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Conditions"); + should.HaveAnyAttributesWithNamedArguments(("InvalidName", helper.Attribute1TypeArgumentSystemType)).AssertOnlyViolations(helper); + should.HaveAnyAttributesWithNamedArguments([("InvalidName", helper.Attribute1TypeArgumentSystemType)]).AssertOnlyViolations(helper); + should.HaveAnyAttributesWithNamedArguments(("NamedParameter1", helper.UnusedTypeArgumentSystemType)).AssertOnlyViolations(helper); + should.HaveAnyAttributesWithNamedArguments([("NamedParameter1", helper.UnusedTypeArgumentSystemType)]).AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().HaveAnyAttributesWithNamedArguments(("InvalidName", helper.Attribute1TypeArgumentSystemType))).AssertOnlyViolations(helper); + should.Be(Types().That().HaveAnyAttributesWithNamedArguments([("InvalidName", helper.Attribute1TypeArgumentSystemType)])).AssertOnlyViolations(helper); + should.Be(Types().That().HaveAnyAttributesWithNamedArguments(("NamedParameter1", helper.UnusedTypeArgumentSystemType))).AssertOnlyViolations(helper); + should.Be(Types().That().HaveAnyAttributesWithNamedArguments([("NamedParameter1", helper.UnusedTypeArgumentSystemType)])).AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should.BeTypesThat().HaveAnyAttributesWithNamedArguments(("InvalidName", helper.Attribute1TypeArgumentSystemType)).AssertOnlyViolations(helper); + should.BeTypesThat().HaveAnyAttributesWithNamedArguments([("InvalidName", helper.Attribute1TypeArgumentSystemType)]).AssertOnlyViolations(helper); + should.BeTypesThat().HaveAnyAttributesWithNamedArguments(("NamedParameter1", helper.UnusedTypeArgumentSystemType)).AssertOnlyViolations(helper); + should.BeTypesThat().HaveAnyAttributesWithNamedArguments([("NamedParameter1", helper.UnusedTypeArgumentSystemType)]).AssertOnlyViolations(helper); helper.AddSnapshotHeader("Violations with value arguments"); should = Types().That().Are(helper.ClassWithSingleAttributeWithNamedArguments).Should(); + + helper.AddSnapshotSubHeader("Conditions"); should.HaveAnyAttributesWithNamedArguments(("InvalidName", helper.Attribute1StringArgument)).AssertOnlyViolations(helper); should.HaveAnyAttributesWithNamedArguments([("InvalidName", helper.Attribute1StringArgument)]).AssertOnlyViolations(helper); should.HaveAnyAttributesWithNamedArguments(("NamedParameter2", helper.UnusedAttributeStringValue)).AssertOnlyViolations(helper); should.HaveAnyAttributesWithNamedArguments([("NamedParameter2", helper.UnusedAttributeStringValue)]).AssertOnlyViolations(helper); + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().HaveAnyAttributesWithNamedArguments(("InvalidName", helper.Attribute1StringArgument))).AssertOnlyViolations(helper); + should.Be(Types().That().HaveAnyAttributesWithNamedArguments([("InvalidName", helper.Attribute1StringArgument)])).AssertOnlyViolations(helper); + should.Be(Types().That().HaveAnyAttributesWithNamedArguments(("NamedParameter2", helper.UnusedAttributeStringValue))).AssertOnlyViolations(helper); + should.Be(Types().That().HaveAnyAttributesWithNamedArguments([("NamedParameter2", helper.UnusedAttributeStringValue)])).AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should.BeTypesThat().HaveAnyAttributesWithNamedArguments(("InvalidName", helper.Attribute1StringArgument)).AssertOnlyViolations(helper); + should.BeTypesThat().HaveAnyAttributesWithNamedArguments([("InvalidName", helper.Attribute1StringArgument)]).AssertOnlyViolations(helper); + should.BeTypesThat().HaveAnyAttributesWithNamedArguments(("NamedParameter2", helper.UnusedAttributeStringValue)).AssertOnlyViolations(helper); + should.BeTypesThat().HaveAnyAttributesWithNamedArguments([("NamedParameter2", helper.UnusedAttributeStringValue)]).AssertOnlyViolations(helper); + helper.AddSnapshotHeader("Empty arguments"); should = Types().That().Are(helper.ClassWithSingleAttributeWithNamedArguments).Should(); + + helper.AddSnapshotSubHeader("Conditions"); should.HaveAnyAttributesWithNamedArguments([]).AssertNoViolations(helper); + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().HaveAnyAttributesWithNamedArguments([])).AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should.BeTypesThat().HaveAnyAttributesWithNamedArguments([]).AssertNoViolations(helper); + helper.AddSnapshotHeader("Multiple arguments"); should = Types().That().Are(helper.ClassWithSingleAttributeWithNamedArguments).Should(); + + helper.AddSnapshotSubHeader("Conditions"); should.HaveAnyAttributesWithNamedArguments(("NamedParameter1", helper.Attribute1TypeArgumentSystemType), ("NamedParameter2", helper.Attribute1StringArgument)).AssertNoViolations(helper); should.HaveAnyAttributesWithNamedArguments([("NamedParameter1", helper.Attribute1TypeArgumentSystemType), ("NamedParameter2", helper.Attribute1StringArgument),]).AssertNoViolations(helper); should.HaveAnyAttributesWithNamedArguments(("NamedParameter1", helper.Attribute1TypeArgumentSystemType), ("NamedParameter2", helper.UnusedAttributeStringValue)).AssertOnlyViolations(helper); should.HaveAnyAttributesWithNamedArguments([("NamedParameter1", helper.Attribute1TypeArgumentSystemType), ("NamedParameter2", helper.UnusedAttributeStringValue),]).AssertOnlyViolations(helper); + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().HaveAnyAttributesWithNamedArguments(("NamedParameter1", helper.Attribute1TypeArgumentSystemType), ("NamedParameter2", helper.Attribute1StringArgument))).AssertNoViolations(helper); + should.Be(Types().That().HaveAnyAttributesWithNamedArguments([("NamedParameter1", helper.Attribute1TypeArgumentSystemType), ("NamedParameter2", helper.Attribute1StringArgument),])).AssertNoViolations(helper); + should.Be(Types().That().HaveAnyAttributesWithNamedArguments(("NamedParameter1", helper.Attribute1TypeArgumentSystemType), ("NamedParameter2", helper.UnusedAttributeStringValue))).AssertOnlyViolations(helper); + should.Be(Types().That().HaveAnyAttributesWithNamedArguments([("NamedParameter1", helper.Attribute1TypeArgumentSystemType), ("NamedParameter2", helper.UnusedAttributeStringValue),])).AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should.BeTypesThat().HaveAnyAttributesWithNamedArguments(("NamedParameter1", helper.Attribute1TypeArgumentSystemType), ("NamedParameter2", helper.Attribute1StringArgument)).AssertNoViolations(helper); + should.BeTypesThat().HaveAnyAttributesWithNamedArguments([("NamedParameter1", helper.Attribute1TypeArgumentSystemType), ("NamedParameter2", helper.Attribute1StringArgument),]).AssertNoViolations(helper); + should.BeTypesThat().HaveAnyAttributesWithNamedArguments(("NamedParameter1", helper.Attribute1TypeArgumentSystemType), ("NamedParameter2", helper.UnusedAttributeStringValue)).AssertOnlyViolations(helper); + should.BeTypesThat().HaveAnyAttributesWithNamedArguments([("NamedParameter1", helper.Attribute1TypeArgumentSystemType), ("NamedParameter2", helper.UnusedAttributeStringValue),]).AssertOnlyViolations(helper); + helper.AddSnapshotHeader("Multiple inputs"); should = Types().That().Are(helper.ClassWithSingleAttributeWithNamedArguments, helper.ClassWithTwoAttributesWithNamedArguments).Should(); + + helper.AddSnapshotSubHeader("Conditions"); should.HaveAnyAttributesWithNamedArguments(("NamedParameter1", helper.Attribute1TypeArgumentSystemType)).AssertNoViolations(helper); should.HaveAnyAttributesWithNamedArguments([("NamedParameter3", helper.Attribute2TypeArgumentSystemType)]).AssertAnyViolations(helper); + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().HaveAnyAttributesWithNamedArguments(("NamedParameter1", helper.Attribute1TypeArgumentSystemType))).AssertNoViolations(helper); + should.Be(Types().That().HaveAnyAttributesWithNamedArguments([("NamedParameter3", helper.Attribute2TypeArgumentSystemType)])).AssertAnyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should.BeTypesThat().HaveAnyAttributesWithNamedArguments(("NamedParameter1", helper.Attribute1TypeArgumentSystemType)).AssertNoViolations(helper); + should.BeTypesThat().HaveAnyAttributesWithNamedArguments([("NamedParameter3", helper.Attribute2TypeArgumentSystemType)]).AssertAnyViolations(helper); + await helper.AssertSnapshotMatches(); } @@ -478,58 +985,190 @@ public async Task HaveAnyAttributesWithNamedArguments() public async Task HaveAttributeWithArgumentsTest() { var helper = new AttributeAssemblyTestHelpers(); + helper.AddSnapshotHeader("No violations with type arguments"); var should = Types().That().Are(helper.ClassWithSingleAttributeWithArguments).Should(); + + helper.AddSnapshotSubHeader("Conditions"); should.HaveAttributeWithArguments(helper.Attribute1, helper.Attribute1TypeArgumentSystemType).AssertNoViolations(helper); should.HaveAttributeWithArguments(helper.Attribute1, [helper.Attribute1TypeArgumentSystemType]).AssertNoViolations(helper); should.HaveAttributeWithArguments(helper.Attribute1SystemType, helper.Attribute1TypeArgumentSystemType).AssertNoViolations(helper); should.HaveAttributeWithArguments(helper.Attribute1SystemType, [helper.Attribute1TypeArgumentSystemType]).AssertNoViolations(helper); + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().HaveAttributeWithArguments(helper.Attribute1, helper.Attribute1TypeArgumentSystemType)).AssertNoViolations(helper); + should.Be(Types().That().HaveAttributeWithArguments(helper.Attribute1, helper.Attribute1TypeArgumentSystemType)).AssertNoViolations(helper); + should.Be(Types().That().HaveAttributeWithArguments(helper.Attribute1SystemType, helper.Attribute1TypeArgumentSystemType)).AssertNoViolations(helper); + should.Be(Types().That().HaveAttributeWithArguments(helper.Attribute1SystemType, [helper.Attribute1TypeArgumentSystemType])).AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should.BeTypesThat().HaveAttributeWithArguments(helper.Attribute1, helper.Attribute1TypeArgumentSystemType).AssertNoViolations(helper); + should.BeTypesThat().HaveAttributeWithArguments(helper.Attribute1, [helper.Attribute1TypeArgumentSystemType]).AssertNoViolations(helper); + should.BeTypesThat().HaveAttributeWithArguments(helper.Attribute1SystemType, helper.Attribute1TypeArgumentSystemType).AssertNoViolations(helper); + should.BeTypesThat().HaveAttributeWithArguments(helper.Attribute1SystemType, [helper.Attribute1TypeArgumentSystemType]).AssertNoViolations(helper); + helper.AddSnapshotHeader("No violations with value arguments"); should = Types().That().Are(helper.ClassWithSingleAttributeWithArguments).Should(); + + helper.AddSnapshotSubHeader("Conditions"); should.HaveAttributeWithArguments(helper.Attribute1, helper.Attribute1StringArgument).AssertNoViolations(helper); should.HaveAttributeWithArguments(helper.Attribute1, [helper.Attribute1StringArgument]).AssertNoViolations(helper); should.HaveAttributeWithArguments(helper.Attribute1SystemType, helper.Attribute1StringArgument).AssertNoViolations(helper); should.HaveAttributeWithArguments(helper.Attribute1SystemType, [helper.Attribute1StringArgument]).AssertNoViolations(helper); + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().HaveAttributeWithArguments(helper.Attribute1, helper.Attribute1StringArgument)).AssertNoViolations(helper); + should.Be(Types().That().HaveAttributeWithArguments(helper.Attribute1, [helper.Attribute1StringArgument])).AssertNoViolations(helper); + should.Be(Types().That().HaveAttributeWithArguments(helper.Attribute1SystemType, helper.Attribute1StringArgument)).AssertNoViolations(helper); + should.Be(Types().That().HaveAttributeWithArguments(helper.Attribute1SystemType, [helper.Attribute1StringArgument])).AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should.BeTypesThat().HaveAttributeWithArguments(helper.Attribute1, helper.Attribute1StringArgument).AssertNoViolations(helper); + should.BeTypesThat().HaveAttributeWithArguments(helper.Attribute1, [helper.Attribute1StringArgument]).AssertNoViolations(helper); + should.BeTypesThat().HaveAttributeWithArguments(helper.Attribute1SystemType, helper.Attribute1StringArgument).AssertNoViolations(helper); + should.BeTypesThat().HaveAttributeWithArguments(helper.Attribute1SystemType, [helper.Attribute1StringArgument]).AssertNoViolations(helper); + + helper.AddSnapshotHeader("Violations for wrong attribute"); + should = Types().That().Are(helper.ClassWithSingleAttributeWithArguments).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should.HaveAttributeWithArguments(helper.UnusedAttribute, helper.Attribute1TypeArgumentSystemType).AssertOnlyViolations(helper); + should.HaveAttributeWithArguments(helper.UnusedAttribute, [helper.Attribute1TypeArgumentSystemType]).AssertOnlyViolations(helper); + should.HaveAttributeWithArguments(helper.UnusedAttributeSystemType, helper.Attribute1TypeArgumentSystemType).AssertOnlyViolations(helper); + should.HaveAttributeWithArguments(helper.UnusedAttributeSystemType, [helper.Attribute1TypeArgumentSystemType]).AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().HaveAttributeWithArguments(helper.UnusedAttribute, helper.Attribute1TypeArgumentSystemType)).AssertOnlyViolations(helper); + should.Be(Types().That().HaveAttributeWithArguments(helper.UnusedAttribute, [helper.Attribute1TypeArgumentSystemType])).AssertOnlyViolations(helper); + should.Be(Types().That().HaveAttributeWithArguments(helper.UnusedAttributeSystemType, helper.Attribute1TypeArgumentSystemType)).AssertOnlyViolations(helper); + should.Be(Types().That().HaveAttributeWithArguments(helper.UnusedAttributeSystemType, [helper.Attribute1TypeArgumentSystemType])).AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should.BeTypesThat().HaveAttributeWithArguments(helper.UnusedAttribute, helper.Attribute1TypeArgumentSystemType).AssertOnlyViolations(helper); + should.BeTypesThat().HaveAttributeWithArguments(helper.UnusedAttribute, [helper.Attribute1TypeArgumentSystemType]).AssertOnlyViolations(helper); + should.BeTypesThat().HaveAttributeWithArguments(helper.UnusedAttributeSystemType, helper.Attribute1TypeArgumentSystemType).AssertOnlyViolations(helper); + should.BeTypesThat().HaveAttributeWithArguments(helper.UnusedAttributeSystemType, [helper.Attribute1TypeArgumentSystemType]).AssertOnlyViolations(helper); + helper.AddSnapshotHeader("Violations with type arguments"); should = Types().That().Are(helper.ClassWithSingleAttributeWithArguments).Should(); - should.HaveAttributeWithArguments(helper.Attribute1, helper.UnusedTypeArgument).AssertOnlyViolations(helper); - should.HaveAttributeWithArguments(helper.Attribute1, [helper.UnusedTypeArgument]).AssertOnlyViolations(helper); - should.HaveAttributeWithArguments(helper.Attribute1SystemType, helper.UnusedTypeArgument).AssertOnlyViolations(helper); - should.HaveAttributeWithArguments(helper.Attribute1SystemType, [helper.UnusedTypeArgument]).AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Conditions"); + should.HaveAttributeWithArguments(helper.Attribute1, helper.UnusedTypeArgumentSystemType).AssertOnlyViolations(helper); + should.HaveAttributeWithArguments(helper.Attribute1, [helper.UnusedTypeArgumentSystemType]).AssertOnlyViolations(helper); + should.HaveAttributeWithArguments(helper.Attribute1SystemType, helper.UnusedTypeArgumentSystemType).AssertOnlyViolations(helper); + should.HaveAttributeWithArguments(helper.Attribute1SystemType, [helper.UnusedTypeArgumentSystemType]).AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().HaveAttributeWithArguments(helper.Attribute1, helper.UnusedTypeArgumentSystemType)).AssertOnlyViolations(helper); + should.Be(Types().That().HaveAttributeWithArguments(helper.Attribute1, [helper.UnusedTypeArgumentSystemType])).AssertOnlyViolations(helper); + should.Be(Types().That().HaveAttributeWithArguments(helper.Attribute1SystemType, helper.UnusedTypeArgumentSystemType)).AssertOnlyViolations(helper); + should.Be(Types().That().HaveAttributeWithArguments(helper.Attribute1SystemType, [helper.UnusedTypeArgumentSystemType])).AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should.BeTypesThat().HaveAttributeWithArguments(helper.Attribute1, helper.UnusedTypeArgumentSystemType).AssertOnlyViolations(helper); + should.BeTypesThat().HaveAttributeWithArguments(helper.Attribute1, [helper.UnusedTypeArgumentSystemType]).AssertOnlyViolations(helper); + should.BeTypesThat().HaveAttributeWithArguments(helper.Attribute1SystemType, helper.UnusedTypeArgumentSystemType).AssertOnlyViolations(helper); + should.BeTypesThat().HaveAttributeWithArguments(helper.Attribute1SystemType, [helper.UnusedTypeArgumentSystemType]).AssertOnlyViolations(helper); helper.AddSnapshotHeader("Violations with value arguments"); should = Types().That().Are(helper.ClassWithSingleAttributeWithArguments).Should(); + + helper.AddSnapshotSubHeader("Conditions"); should.HaveAttributeWithArguments(helper.Attribute1, helper.Attribute2StringArgument).AssertOnlyViolations(helper); should.HaveAttributeWithArguments(helper.Attribute1, [helper.Attribute2StringArgument]).AssertOnlyViolations(helper); should.HaveAttributeWithArguments(helper.Attribute1SystemType, helper.Attribute2StringArgument).AssertOnlyViolations(helper); should.HaveAttributeWithArguments(helper.Attribute1SystemType, [helper.Attribute2StringArgument]).AssertOnlyViolations(helper); + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().HaveAttributeWithArguments(helper.Attribute1, helper.Attribute2StringArgument)).AssertOnlyViolations(helper); + should.Be(Types().That().HaveAttributeWithArguments(helper.Attribute1, [helper.Attribute2StringArgument])).AssertOnlyViolations(helper); + should.Be(Types().That().HaveAttributeWithArguments(helper.Attribute1SystemType, helper.Attribute2StringArgument)).AssertOnlyViolations(helper); + should.Be(Types().That().HaveAttributeWithArguments(helper.Attribute1SystemType, [helper.Attribute2StringArgument])).AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should.BeTypesThat().HaveAttributeWithArguments(helper.Attribute1, helper.Attribute2StringArgument).AssertOnlyViolations(helper); + should.BeTypesThat().HaveAttributeWithArguments(helper.Attribute1, [helper.Attribute2StringArgument]).AssertOnlyViolations(helper); + should.BeTypesThat().HaveAttributeWithArguments(helper.Attribute1SystemType, helper.Attribute2StringArgument).AssertOnlyViolations(helper); + should.BeTypesThat().HaveAttributeWithArguments(helper.Attribute1SystemType, [helper.Attribute2StringArgument]).AssertOnlyViolations(helper); + helper.AddSnapshotHeader("Type outside of architecture"); should = Types().That().Are(helper.ClassWithSingleAttributeWithArguments).Should(); + + helper.AddSnapshotSubHeader("Conditions"); should.HaveAttributeWithArguments(typeof(TypeDependencyNamespace.BaseClass), helper.Attribute1StringArgument).AssertOnlyViolations(helper); + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().HaveAttributeWithArguments(typeof(TypeDependencyNamespace.BaseClass), helper.Attribute1StringArgument)).AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should.BeTypesThat().HaveAttributeWithArguments(typeof(TypeDependencyNamespace.BaseClass), helper.Attribute1StringArgument).AssertOnlyViolations(helper); + helper.AddSnapshotHeader("Null argument"); should = Types().That().Are(helper.ClassWithSingleAttributeWithArguments).Should(); + + helper.AddSnapshotSubHeader("Conditions"); should.HaveAttributeWithArguments(helper.Attribute1, null).AssertOnlyViolations(helper); should.HaveAttributeWithArguments(helper.Attribute1SystemType, null).AssertOnlyViolations(helper); + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().HaveAttributeWithArguments(helper.Attribute1, null)).AssertOnlyViolations(helper); + should.Be(Types().That().HaveAttributeWithArguments(helper.Attribute1SystemType, null)).AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should.BeTypesThat().HaveAttributeWithArguments(helper.Attribute1, null).AssertOnlyViolations(helper); + should.BeTypesThat().HaveAttributeWithArguments(helper.Attribute1SystemType, null).AssertOnlyViolations(helper); + helper.AddSnapshotHeader("Empty arguments"); should = Types().That().Are(helper.ClassWithSingleAttributeWithArguments).Should(); + + helper.AddSnapshotSubHeader("Conditions"); should.HaveAttributeWithArguments(helper.Attribute1, new List()).AssertNoViolations(helper); should.HaveAttributeWithArguments(helper.Attribute1SystemType, new List()).AssertNoViolations(helper); + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().HaveAttributeWithArguments(helper.Attribute1, new List())).AssertNoViolations(helper); + should.Be(Types().That().HaveAttributeWithArguments(helper.Attribute1SystemType, new List())).AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should.BeTypesThat().HaveAttributeWithArguments(helper.Attribute1, new List()).AssertNoViolations(helper); + should.BeTypesThat().HaveAttributeWithArguments(helper.Attribute1SystemType, new List()).AssertNoViolations(helper); + helper.AddSnapshotHeader("Multiple arguments"); should = Types().That().Are(helper.ClassWithSingleAttributeWithArguments).Should(); + + helper.AddSnapshotSubHeader("Conditions"); should.HaveAttributeWithArguments(helper.Attribute1, helper.Attribute1StringArgument, helper.Attribute1IntegerArgument).AssertNoViolations(helper); should.HaveAttributeWithArguments(helper.Attribute1, [helper.Attribute1StringArgument, helper.Attribute1IntegerArgument]).AssertNoViolations(helper); should.HaveAttributeWithArguments(helper.Attribute1SystemType, helper.Attribute1StringArgument, helper.Attribute1IntegerArgument).AssertNoViolations(helper); should.HaveAttributeWithArguments(helper.Attribute1SystemType, [helper.Attribute1StringArgument, helper.Attribute1IntegerArgument]).AssertNoViolations(helper); + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().HaveAttributeWithArguments(helper.Attribute1, helper.Attribute1StringArgument, helper.Attribute1IntegerArgument)).AssertNoViolations(helper); + should.Be(Types().That().HaveAttributeWithArguments(helper.Attribute1, [helper.Attribute1StringArgument, helper.Attribute1IntegerArgument])).AssertNoViolations(helper); + should.Be(Types().That().HaveAttributeWithArguments(helper.Attribute1SystemType, helper.Attribute1StringArgument, helper.Attribute1IntegerArgument)).AssertNoViolations(helper); + should.Be(Types().That().HaveAttributeWithArguments(helper.Attribute1SystemType, [helper.Attribute1StringArgument, helper.Attribute1IntegerArgument])).AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should.BeTypesThat().HaveAttributeWithArguments(helper.Attribute1, helper.Attribute1StringArgument, helper.Attribute1IntegerArgument).AssertNoViolations(helper); + should.BeTypesThat().HaveAttributeWithArguments(helper.Attribute1, [helper.Attribute1StringArgument, helper.Attribute1IntegerArgument]).AssertNoViolations(helper); + should.BeTypesThat().HaveAttributeWithArguments(helper.Attribute1SystemType, helper.Attribute1StringArgument, helper.Attribute1IntegerArgument).AssertNoViolations(helper); + should.BeTypesThat().HaveAttributeWithArguments(helper.Attribute1SystemType, [helper.Attribute1StringArgument, helper.Attribute1IntegerArgument]).AssertNoViolations(helper); + helper.AddSnapshotHeader("Multiple inputs"); - Types().That().Are(helper.ClassWithSingleAttributeWithArguments, helper.ClassWithTwoAttributesWithArguments).Should().HaveAttributeWithArguments(helper.Attribute1, helper.Attribute1StringArgument).AssertNoViolations(helper); - Types().That().Are(helper.ClassWithSingleAttributeWithArguments, helper.ClassWithTwoAttributesWithArguments).Should().HaveAttributeWithArguments(helper.Attribute2, helper.Attribute2IntegerArgument).AssertAnyViolations(helper); + should = Types().That().Are(helper.ClassWithSingleAttributeWithArguments, helper.ClassWithTwoAttributesWithArguments).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should.HaveAttributeWithArguments(helper.Attribute1, helper.Attribute1StringArgument).AssertNoViolations(helper); + should.HaveAttributeWithArguments(helper.Attribute2, helper.Attribute2IntegerArgument).AssertAnyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().HaveAttributeWithArguments(helper.Attribute1, helper.Attribute1StringArgument)).AssertNoViolations(helper); + should.Be(Types().That().HaveAttributeWithArguments(helper.Attribute2, helper.Attribute2IntegerArgument)).AssertAnyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should.BeTypesThat().HaveAttributeWithArguments(helper.Attribute1, helper.Attribute1StringArgument).AssertNoViolations(helper); + should.BeTypesThat().HaveAttributeWithArguments(helper.Attribute2, helper.Attribute2IntegerArgument).AssertAnyViolations(helper); + await helper.AssertSnapshotMatches(); } @@ -537,65 +1176,208 @@ public async Task HaveAttributeWithArgumentsTest() public async Task HaveAttributeWithNamedArguments() { var helper = new AttributeAssemblyTestHelpers(); + helper.AddSnapshotHeader("No violations with type arguments"); var should = Types().That().Are(helper.ClassWithSingleAttributeWithNamedArguments).Should(); + + helper.AddSnapshotSubHeader("Conditions"); should.HaveAttributeWithNamedArguments(helper.Attribute1, ("NamedParameter1", helper.Attribute1TypeArgumentSystemType)).AssertNoViolations(helper); should.HaveAttributeWithNamedArguments(helper.Attribute1, [("NamedParameter1", helper.Attribute1TypeArgumentSystemType)]).AssertNoViolations(helper); should.HaveAttributeWithNamedArguments(helper.Attribute1SystemType, ("NamedParameter1", helper.Attribute1TypeArgumentSystemType)).AssertNoViolations(helper); should.HaveAttributeWithNamedArguments(helper.Attribute1SystemType, [("NamedParameter1", helper.Attribute1TypeArgumentSystemType)]).AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().HaveAttributeWithNamedArguments(helper.Attribute1, ("NamedParameter1", helper.Attribute1TypeArgumentSystemType))).AssertNoViolations(helper); + should.Be(Types().That().HaveAttributeWithNamedArguments(helper.Attribute1, [("NamedParameter1", helper.Attribute1TypeArgumentSystemType)])).AssertNoViolations(helper); + should.Be(Types().That().HaveAttributeWithNamedArguments(helper.Attribute1SystemType, ("NamedParameter1", helper.Attribute1TypeArgumentSystemType))).AssertNoViolations(helper); + should.Be(Types().That().HaveAttributeWithNamedArguments(helper.Attribute1SystemType, [("NamedParameter1", helper.Attribute1TypeArgumentSystemType)])).AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should.BeTypesThat().HaveAttributeWithNamedArguments(helper.Attribute1, ("NamedParameter1", helper.Attribute1TypeArgumentSystemType)).AssertNoViolations(helper); + should.BeTypesThat().HaveAttributeWithNamedArguments(helper.Attribute1, [("NamedParameter1", helper.Attribute1TypeArgumentSystemType)]).AssertNoViolations(helper); + should.BeTypesThat().HaveAttributeWithNamedArguments(helper.Attribute1SystemType, ("NamedParameter1", helper.Attribute1TypeArgumentSystemType)).AssertNoViolations(helper); + should.BeTypesThat().HaveAttributeWithNamedArguments(helper.Attribute1SystemType, [("NamedParameter1", helper.Attribute1TypeArgumentSystemType)]).AssertNoViolations(helper); helper.AddSnapshotHeader("No violations with value arguments"); should = Types().That().Are(helper.ClassWithSingleAttributeWithNamedArguments).Should(); + + helper.AddSnapshotSubHeader("Conditions"); should.HaveAttributeWithNamedArguments(helper.Attribute1, ("NamedParameter2", helper.Attribute1StringArgument)).AssertNoViolations(helper); should.HaveAttributeWithNamedArguments(helper.Attribute1, [("NamedParameter2", helper.Attribute1StringArgument)]).AssertNoViolations(helper); should.HaveAttributeWithNamedArguments(helper.Attribute1SystemType, ("NamedParameter2", helper.Attribute1StringArgument)).AssertNoViolations(helper); should.HaveAttributeWithNamedArguments(helper.Attribute1SystemType, [("NamedParameter2", helper.Attribute1StringArgument)]).AssertNoViolations(helper); + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().HaveAttributeWithNamedArguments(helper.Attribute1, ("NamedParameter2", helper.Attribute1StringArgument))).AssertNoViolations(helper); + should.Be(Types().That().HaveAttributeWithNamedArguments(helper.Attribute1, [("NamedParameter2", helper.Attribute1StringArgument)])).AssertNoViolations(helper); + should.Be(Types().That().HaveAttributeWithNamedArguments(helper.Attribute1SystemType, ("NamedParameter2", helper.Attribute1StringArgument))).AssertNoViolations(helper); + should.Be(Types().That().HaveAttributeWithNamedArguments(helper.Attribute1SystemType, [("NamedParameter2", helper.Attribute1StringArgument)])).AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should.BeTypesThat().HaveAttributeWithNamedArguments(helper.Attribute1, ("NamedParameter2", helper.Attribute1StringArgument)).AssertNoViolations(helper); + should.BeTypesThat().HaveAttributeWithNamedArguments(helper.Attribute1, [("NamedParameter2", helper.Attribute1StringArgument)]).AssertNoViolations(helper); + should.BeTypesThat().HaveAttributeWithNamedArguments(helper.Attribute1SystemType, ("NamedParameter2", helper.Attribute1StringArgument)).AssertNoViolations(helper); + should.BeTypesThat().HaveAttributeWithNamedArguments(helper.Attribute1SystemType, [("NamedParameter2", helper.Attribute1StringArgument)]).AssertNoViolations(helper); + + helper.AddSnapshotHeader("Violations for attribute without named arguments"); + should = Types().That().Are(helper.ClassWithSingleAttribute).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should.HaveAttributeWithNamedArguments(helper.Attribute1, ("NamedParameter1", helper.Attribute1TypeArgumentSystemType)).AssertOnlyViolations(helper); + should.HaveAttributeWithNamedArguments(helper.Attribute1, [("NamedParameter1", helper.Attribute1TypeArgumentSystemType)]).AssertOnlyViolations(helper); + should.HaveAttributeWithNamedArguments(helper.Attribute1SystemType, ("NamedParameter1", helper.Attribute1TypeArgumentSystemType)).AssertOnlyViolations(helper); + should.HaveAttributeWithNamedArguments(helper.Attribute1SystemType, [("NamedParameter1", helper.Attribute1TypeArgumentSystemType)]).AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().HaveAttributeWithNamedArguments(helper.Attribute1, ("NamedParameter1", helper.Attribute1TypeArgumentSystemType))).AssertOnlyViolations(helper); + should.Be(Types().That().HaveAttributeWithNamedArguments(helper.Attribute1, [("NamedParameter1", helper.Attribute1TypeArgumentSystemType)])).AssertOnlyViolations(helper); + should.Be(Types().That().HaveAttributeWithNamedArguments(helper.Attribute1SystemType, ("NamedParameter1", helper.Attribute1TypeArgumentSystemType))).AssertOnlyViolations(helper); + should.Be(Types().That().HaveAttributeWithNamedArguments(helper.Attribute1SystemType, [("NamedParameter1", helper.Attribute1TypeArgumentSystemType)])).AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should.BeTypesThat().HaveAttributeWithNamedArguments(helper.Attribute1, ("NamedParameter1", helper.Attribute1TypeArgumentSystemType)).AssertOnlyViolations(helper); + should.BeTypesThat().HaveAttributeWithNamedArguments(helper.Attribute1, [("NamedParameter1", helper.Attribute1TypeArgumentSystemType)]).AssertOnlyViolations(helper); + should.BeTypesThat().HaveAttributeWithNamedArguments(helper.Attribute1SystemType, ("NamedParameter1", helper.Attribute1TypeArgumentSystemType)).AssertOnlyViolations(helper); + should.BeTypesThat().HaveAttributeWithNamedArguments(helper.Attribute1SystemType, [("NamedParameter1", helper.Attribute1TypeArgumentSystemType)]).AssertOnlyViolations(helper); + helper.AddSnapshotHeader("Violations with type arguments"); should = Types().That().Are(helper.ClassWithSingleAttributeWithNamedArguments).Should(); - should.HaveAttributeWithNamedArguments(helper.Attribute1, ("InvalidName", helper.Attribute1TypeArgument)).AssertOnlyViolations(helper); - should.HaveAttributeWithNamedArguments(helper.Attribute1, [("InvalidName", helper.Attribute1TypeArgument)]).AssertOnlyViolations(helper); - should.HaveAttributeWithNamedArguments(helper.Attribute1, ("NamedParameter1", helper.UnusedTypeArgument)).AssertOnlyViolations(helper); - should.HaveAttributeWithNamedArguments(helper.Attribute1, [("NamedParameter1", helper.UnusedTypeArgument)]).AssertOnlyViolations(helper); - should.HaveAttributeWithNamedArguments(helper.Attribute1SystemType, ("NamedParameter1", helper.UnusedTypeArgument)).AssertOnlyViolations(helper); - should.HaveAttributeWithNamedArguments(helper.Attribute1SystemType, [("NamedParameter1", helper.UnusedTypeArgument)]).AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Conditions"); + should.HaveAttributeWithNamedArguments(helper.Attribute1, ("InvalidName", helper.Attribute1TypeArgumentSystemType)).AssertOnlyViolations(helper); + should.HaveAttributeWithNamedArguments(helper.Attribute1, [("InvalidName", helper.Attribute1TypeArgumentSystemType)]).AssertOnlyViolations(helper); + should.HaveAttributeWithNamedArguments(helper.Attribute1, ("NamedParameter1", helper.UnusedTypeArgumentSystemType)).AssertOnlyViolations(helper); + should.HaveAttributeWithNamedArguments(helper.Attribute1, [("NamedParameter1", helper.UnusedTypeArgumentSystemType)]).AssertOnlyViolations(helper); + should.HaveAttributeWithNamedArguments(helper.Attribute1SystemType, ("NamedParameter1", helper.UnusedTypeArgumentSystemType)).AssertOnlyViolations(helper); + should.HaveAttributeWithNamedArguments(helper.Attribute1SystemType, [("NamedParameter1", helper.UnusedTypeArgumentSystemType)]).AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().HaveAttributeWithNamedArguments(helper.Attribute1, ("InvalidName", helper.Attribute1TypeArgumentSystemType))).AssertOnlyViolations(helper); + should.Be(Types().That().HaveAttributeWithNamedArguments(helper.Attribute1, [("InvalidName", helper.Attribute1TypeArgumentSystemType)])).AssertOnlyViolations(helper); + should.Be(Types().That().HaveAttributeWithNamedArguments(helper.Attribute1, ("NamedParameter1", helper.UnusedTypeArgumentSystemType))).AssertOnlyViolations(helper); + should.Be(Types().That().HaveAttributeWithNamedArguments(helper.Attribute1, [("NamedParameter1", helper.UnusedTypeArgumentSystemType)])).AssertOnlyViolations(helper); + should.Be(Types().That().HaveAttributeWithNamedArguments(helper.Attribute1SystemType, ("NamedParameter1", helper.UnusedTypeArgumentSystemType))).AssertOnlyViolations(helper); + should.Be(Types().That().HaveAttributeWithNamedArguments(helper.Attribute1SystemType, [("NamedParameter1", helper.UnusedTypeArgumentSystemType)])).AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should.BeTypesThat().HaveAttributeWithNamedArguments(helper.Attribute1, ("InvalidName", helper.Attribute1TypeArgumentSystemType)).AssertOnlyViolations(helper); + should.BeTypesThat().HaveAttributeWithNamedArguments(helper.Attribute1, [("InvalidName", helper.Attribute1TypeArgumentSystemType)]).AssertOnlyViolations(helper); + should.BeTypesThat().HaveAttributeWithNamedArguments(helper.Attribute1, ("NamedParameter1", helper.UnusedTypeArgumentSystemType)).AssertOnlyViolations(helper); + should.BeTypesThat().HaveAttributeWithNamedArguments(helper.Attribute1, [("NamedParameter1", helper.UnusedTypeArgumentSystemType)]).AssertOnlyViolations(helper); + should.BeTypesThat().HaveAttributeWithNamedArguments(helper.Attribute1SystemType, ("NamedParameter1", helper.UnusedTypeArgumentSystemType)).AssertOnlyViolations(helper); + should.BeTypesThat().HaveAttributeWithNamedArguments(helper.Attribute1SystemType, [("NamedParameter1", helper.UnusedTypeArgumentSystemType)]).AssertOnlyViolations(helper); helper.AddSnapshotHeader("Violations with value arguments"); should = Types().That().Are(helper.ClassWithSingleAttributeWithNamedArguments).Should(); + + helper.AddSnapshotSubHeader("Conditions"); should.HaveAttributeWithNamedArguments(helper.Attribute1, ("InvalidName", helper.Attribute1StringArgument)).AssertOnlyViolations(helper); should.HaveAttributeWithNamedArguments(helper.Attribute1, [("InvalidName", helper.Attribute1StringArgument)]).AssertOnlyViolations(helper); should.HaveAttributeWithNamedArguments(helper.Attribute1, ("NamedParameter2", helper.UnusedAttributeStringValue)).AssertOnlyViolations(helper); should.HaveAttributeWithNamedArguments(helper.Attribute1, [("NamedParameter2", helper.UnusedAttributeStringValue)]).AssertOnlyViolations(helper); + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().HaveAttributeWithNamedArguments(helper.Attribute1, ("InvalidName", helper.Attribute1StringArgument))).AssertOnlyViolations(helper); + should.Be(Types().That().HaveAttributeWithNamedArguments(helper.Attribute1, [("InvalidName", helper.Attribute1StringArgument)])).AssertOnlyViolations(helper); + should.Be(Types().That().HaveAttributeWithNamedArguments(helper.Attribute1, ("NamedParameter2", helper.UnusedAttributeStringValue))).AssertOnlyViolations(helper); + should.Be(Types().That().HaveAttributeWithNamedArguments(helper.Attribute1, [("NamedParameter2", helper.UnusedAttributeStringValue)])).AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should.BeTypesThat().HaveAttributeWithNamedArguments(helper.Attribute1, ("InvalidName", helper.Attribute1StringArgument)).AssertOnlyViolations(helper); + should.BeTypesThat().HaveAttributeWithNamedArguments(helper.Attribute1, [("InvalidName", helper.Attribute1StringArgument)]).AssertOnlyViolations(helper); + should.BeTypesThat().HaveAttributeWithNamedArguments(helper.Attribute1, ("NamedParameter2", helper.UnusedAttributeStringValue)).AssertOnlyViolations(helper); + should.BeTypesThat().HaveAttributeWithNamedArguments(helper.Attribute1, [("NamedParameter2", helper.UnusedAttributeStringValue)]).AssertOnlyViolations(helper); + helper.AddSnapshotHeader("Unused attribute"); should = Types().That().Are(helper.ClassWithSingleAttributeWithNamedArguments).Should(); + + helper.AddSnapshotSubHeader("Conditions"); should.HaveAttributeWithNamedArguments(helper.UnusedAttribute, ("NamedParameter1", helper.Attribute1TypeArgument)).AssertOnlyViolations(helper); should.HaveAttributeWithNamedArguments(helper.UnusedAttribute, [("NamedParameter1", helper.Attribute1TypeArgument)]).AssertOnlyViolations(helper); should.HaveAttributeWithNamedArguments(helper.UnusedAttributeSystemType, ("NamedParameter1", helper.Attribute1TypeArgument)).AssertOnlyViolations(helper); should.HaveAttributeWithNamedArguments(helper.UnusedAttributeSystemType, [("NamedParameter1", helper.Attribute1TypeArgument)]).AssertOnlyViolations(helper); + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().HaveAttributeWithNamedArguments(helper.UnusedAttribute, ("NamedParameter1", helper.Attribute1TypeArgument))).AssertOnlyViolations(helper); + should.Be(Types().That().HaveAttributeWithNamedArguments(helper.UnusedAttribute, [("NamedParameter1", helper.Attribute1TypeArgument)])).AssertOnlyViolations(helper); + should.Be(Types().That().HaveAttributeWithNamedArguments(helper.UnusedAttributeSystemType, ("NamedParameter1", helper.Attribute1TypeArgument))).AssertOnlyViolations(helper); + should.Be(Types().That().HaveAttributeWithNamedArguments(helper.UnusedAttributeSystemType, [("NamedParameter1", helper.Attribute1TypeArgument)])).AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should.BeTypesThat().HaveAttributeWithNamedArguments(helper.UnusedAttribute, ("NamedParameter1", helper.Attribute1TypeArgument)).AssertOnlyViolations(helper); + should.BeTypesThat().HaveAttributeWithNamedArguments(helper.UnusedAttribute, [("NamedParameter1", helper.Attribute1TypeArgument)]).AssertOnlyViolations(helper); + should.BeTypesThat().HaveAttributeWithNamedArguments(helper.UnusedAttributeSystemType, ("NamedParameter1", helper.Attribute1TypeArgument)).AssertOnlyViolations(helper); + should.BeTypesThat().HaveAttributeWithNamedArguments(helper.UnusedAttributeSystemType, [("NamedParameter1", helper.Attribute1TypeArgument)]).AssertOnlyViolations(helper); + helper.AddSnapshotHeader("Type outside of architecture"); should = Types().That().Are(helper.ClassWithSingleAttributeWithNamedArguments).Should(); + + helper.AddSnapshotSubHeader("Conditions"); should.HaveAttributeWithNamedArguments(typeof(TypeDependencyNamespace.BaseClass), ("NamedParameter1", helper.Attribute1TypeArgument)).AssertOnlyViolations(helper); - helper.AddSnapshotHeader("Emtpy arguments"); + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().HaveAttributeWithNamedArguments(typeof(TypeDependencyNamespace.BaseClass), ("NamedParameter1", helper.Attribute1TypeArgument))).AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should.BeTypesThat().HaveAttributeWithNamedArguments(typeof(TypeDependencyNamespace.BaseClass), ("NamedParameter1", helper.Attribute1TypeArgument)).AssertOnlyViolations(helper); + + helper.AddSnapshotHeader("Empty arguments"); should = Types().That().Are(helper.ClassWithSingleAttributeWithNamedArguments).Should(); + + helper.AddSnapshotSubHeader("Conditions"); should.HaveAttributeWithNamedArguments(helper.Attribute1, []).AssertNoViolations(helper); should.HaveAttributeWithNamedArguments(helper.Attribute1SystemType, []).AssertNoViolations(helper); + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().HaveAttributeWithNamedArguments(helper.Attribute1, [])).AssertNoViolations(helper); + should.Be(Types().That().HaveAttributeWithNamedArguments(helper.Attribute1SystemType, [])).AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should.BeTypesThat().HaveAttributeWithNamedArguments(helper.Attribute1, []).AssertNoViolations(helper); + should.BeTypesThat().HaveAttributeWithNamedArguments(helper.Attribute1SystemType, []).AssertNoViolations(helper); + helper.AddSnapshotHeader("Multiple arguments"); should = Types().That().Are(helper.ClassWithSingleAttributeWithNamedArguments).Should(); + + helper.AddSnapshotSubHeader("Conditions"); should.HaveAttributeWithNamedArguments(helper.Attribute1, ("NamedParameter1", helper.Attribute1TypeArgument), ("NamedParameter2", helper.Attribute1StringArgument)).AssertOnlyViolations(helper); should.HaveAttributeWithNamedArguments(helper.Attribute1, [("NamedParameter1", helper.Attribute1TypeArgument), ("NamedParameter2", helper.Attribute1StringArgument),]).AssertOnlyViolations(helper); should.HaveAttributeWithNamedArguments(helper.Attribute1SystemType, ("NamedParameter1", helper.Attribute1TypeArgument), ("NamedParameter2", helper.Attribute1StringArgument)).AssertOnlyViolations(helper); should.HaveAttributeWithNamedArguments(helper.Attribute1SystemType, [("NamedParameter1", helper.Attribute1TypeArgument), ("NamedParameter2", helper.Attribute1StringArgument),]).AssertOnlyViolations(helper); + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().HaveAttributeWithNamedArguments(helper.Attribute1, ("NamedParameter1", helper.Attribute1TypeArgument), ("NamedParameter2", helper.Attribute1StringArgument))).AssertOnlyViolations(helper); + should.Be(Types().That().HaveAttributeWithNamedArguments(helper.Attribute1, [("NamedParameter1", helper.Attribute1TypeArgument), ("NamedParameter2", helper.Attribute1StringArgument),])).AssertOnlyViolations(helper); + should.Be(Types().That().HaveAttributeWithNamedArguments(helper.Attribute1SystemType, ("NamedParameter1", helper.Attribute1TypeArgument), ("NamedParameter2", helper.Attribute1StringArgument))).AssertOnlyViolations(helper); + should.Be(Types().That().HaveAttributeWithNamedArguments(helper.Attribute1SystemType, [("NamedParameter1", helper.Attribute1TypeArgument), ("NamedParameter2", helper.Attribute1StringArgument),])).AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should.BeTypesThat().HaveAttributeWithNamedArguments(helper.Attribute1, ("NamedParameter1", helper.Attribute1TypeArgument), ("NamedParameter2", helper.Attribute1StringArgument)).AssertOnlyViolations(helper); + should.BeTypesThat().HaveAttributeWithNamedArguments(helper.Attribute1, [("NamedParameter1", helper.Attribute1TypeArgument), ("NamedParameter2", helper.Attribute1StringArgument),]).AssertOnlyViolations(helper); + should.BeTypesThat().HaveAttributeWithNamedArguments(helper.Attribute1SystemType, ("NamedParameter1", helper.Attribute1TypeArgument), ("NamedParameter2", helper.Attribute1StringArgument)).AssertOnlyViolations(helper); + should.BeTypesThat().HaveAttributeWithNamedArguments(helper.Attribute1SystemType, [("NamedParameter1", helper.Attribute1TypeArgument), ("NamedParameter2", helper.Attribute1StringArgument),]).AssertOnlyViolations(helper); + helper.AddSnapshotHeader("Multiple inputs"); should = Types().That().Are(helper.ClassWithSingleAttributeWithNamedArguments, helper.ClassWithTwoAttributesWithNamedArguments).Should(); + + helper.AddSnapshotSubHeader("Conditions"); should.HaveAttributeWithNamedArguments(helper.Attribute2, ("NamedParameter3", helper.Attribute2TypeArgumentSystemType)).AssertAnyViolations(helper); should.HaveAttributeWithNamedArguments(helper.Attribute2, [("NamedParameter3", helper.Attribute2TypeArgumentSystemType)]).AssertAnyViolations(helper); should.HaveAttributeWithNamedArguments(helper.Attribute2SystemType, ("NamedParameter3", helper.Attribute2TypeArgumentSystemType)).AssertAnyViolations(helper); should.HaveAttributeWithNamedArguments(helper.Attribute2SystemType, [("NamedParameter3", helper.Attribute2TypeArgumentSystemType)]).AssertAnyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().HaveAttributeWithNamedArguments(helper.Attribute2, ("NamedParameter3", helper.Attribute2TypeArgumentSystemType))).AssertAnyViolations(helper); + should.Be(Types().That().HaveAttributeWithNamedArguments(helper.Attribute2, [("NamedParameter3", helper.Attribute2TypeArgumentSystemType)])).AssertAnyViolations(helper); + should.Be(Types().That().HaveAttributeWithNamedArguments(helper.Attribute2SystemType, ("NamedParameter3", helper.Attribute2TypeArgumentSystemType))).AssertAnyViolations(helper); + should.Be(Types().That().HaveAttributeWithNamedArguments(helper.Attribute2SystemType, [("NamedParameter3", helper.Attribute2TypeArgumentSystemType)])).AssertAnyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should.BeTypesThat().HaveAttributeWithNamedArguments(helper.Attribute2, ("NamedParameter3", helper.Attribute2TypeArgumentSystemType)).AssertAnyViolations(helper); + should.BeTypesThat().HaveAttributeWithNamedArguments(helper.Attribute2, [("NamedParameter3", helper.Attribute2TypeArgumentSystemType)]).AssertAnyViolations(helper); + should.BeTypesThat().HaveAttributeWithNamedArguments(helper.Attribute2SystemType, ("NamedParameter3", helper.Attribute2TypeArgumentSystemType)).AssertAnyViolations(helper); + should.BeTypesThat().HaveAttributeWithNamedArguments(helper.Attribute2SystemType, [("NamedParameter3", helper.Attribute2TypeArgumentSystemType)]).AssertAnyViolations(helper); + await helper.AssertSnapshotMatches(); } @@ -605,6 +1387,8 @@ public async Task HaveNameTest() var helper = new DependencyAssemblyTestHelper(); helper.AddSnapshotHeader("No violations"); var should = Types().That().Are(helper.BaseClass).Should(); + + helper.AddSnapshotSubHeader("Conditions"); should.HaveName(helper.BaseClass.Name).AssertNoViolations(helper); should.HaveNameMatching("^Base.*$").AssertNoViolations(helper); should.HaveFullName(helper.BaseClass.FullName).AssertNoViolations(helper); @@ -614,8 +1398,30 @@ public async Task HaveNameTest() should.HaveNameStartingWith("Base").AssertNoViolations(helper); should.HaveNameEndingWith("Class").AssertNoViolations(helper); + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().HaveName(helper.BaseClass.Name)).AssertNoViolations(helper); + should.Be(Types().That().HaveNameMatching("^Base.*$")).AssertNoViolations(helper); + should.Be(Types().That().HaveFullName(helper.BaseClass.FullName)).AssertNoViolations(helper); + should.Be(Types().That().HaveFullNameMatching("^.*\\.Base.*$")).AssertNoViolations(helper); + should.Be(Types().That().HaveNameContaining("Base")).AssertNoViolations(helper); + should.Be(Types().That().HaveFullNameContaining(helper.BaseClass.Namespace.Name)).AssertNoViolations(helper); + should.Be(Types().That().HaveNameStartingWith("Base")).AssertNoViolations(helper); + should.Be(Types().That().HaveNameEndingWith("Class")).AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should.BeTypesThat().HaveName(helper.BaseClass.Name).AssertNoViolations(helper); + should.BeTypesThat().HaveNameMatching("^Base.*$").AssertNoViolations(helper); + should.BeTypesThat().HaveFullName(helper.BaseClass.FullName).AssertNoViolations(helper); + should.BeTypesThat().HaveFullNameMatching("^.*\\.Base.*$").AssertNoViolations(helper); + should.BeTypesThat().HaveNameContaining("Base").AssertNoViolations(helper); + should.BeTypesThat().HaveFullNameContaining(helper.BaseClass.Namespace.Name).AssertNoViolations(helper); + should.BeTypesThat().HaveNameStartingWith("Base").AssertNoViolations(helper); + should.BeTypesThat().HaveNameEndingWith("Class").AssertNoViolations(helper); + helper.AddSnapshotHeader("Violations"); should = Types().That().Are(helper.BaseClass).Should(); + + helper.AddSnapshotSubHeader("Conditions"); should.HaveName(helper.BaseClass.FullName).AssertOnlyViolations(helper); should.HaveName("^.*\\.Base.*$").AssertOnlyViolations(helper); should.HaveFullName(helper.BaseClass.Name).AssertOnlyViolations(helper); @@ -624,6 +1430,27 @@ public async Task HaveNameTest() should.HaveFullNameContaining(helper.NonExistentObjectName).AssertOnlyViolations(helper); should.HaveNameStartingWith(helper.BaseClass.Namespace.Name).AssertOnlyViolations(helper); should.HaveNameEndingWith("Base").AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().HaveName(helper.BaseClass.Name)).AssertNoViolations(helper); + should.Be(Types().That().HaveNameMatching("^Base.*$")).AssertNoViolations(helper); + should.Be(Types().That().HaveFullName(helper.BaseClass.FullName)).AssertNoViolations(helper); + should.Be(Types().That().HaveFullNameMatching("^.*\\.Base.*$")).AssertNoViolations(helper); + should.Be(Types().That().HaveNameContaining("Base")).AssertNoViolations(helper); + should.Be(Types().That().HaveFullNameContaining(helper.BaseClass.Namespace.Name)).AssertNoViolations(helper); + should.Be(Types().That().HaveNameStartingWith("Base")).AssertNoViolations(helper); + should.Be(Types().That().HaveNameEndingWith("Class")).AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should.BeTypesThat().HaveName(helper.BaseClass.Name).AssertNoViolations(helper); + should.BeTypesThat().HaveNameMatching("^Base.*$").AssertNoViolations(helper); + should.BeTypesThat().HaveFullName(helper.BaseClass.FullName).AssertNoViolations(helper); + should.BeTypesThat().HaveFullNameMatching("^.*\\.Base.*$").AssertNoViolations(helper); + should.BeTypesThat().HaveNameContaining("Base").AssertNoViolations(helper); + should.BeTypesThat().HaveFullNameContaining(helper.BaseClass.Namespace.Name).AssertNoViolations(helper); + should.BeTypesThat().HaveNameStartingWith("Base").AssertNoViolations(helper); + should.BeTypesThat().HaveNameEndingWith("Class").AssertNoViolations(helper); + await helper.AssertSnapshotMatches(); } @@ -631,34 +1458,94 @@ public async Task HaveNameTest() public async Task NotBeTest() { var helper = new DependencyAssemblyTestHelper(); + helper.AddSnapshotHeader("No violations"); var should = Types().That().DependOnAny(helper.BaseClass).Should(); + + helper.AddSnapshotSubHeader("Conditions"); should.NotBe(helper.ClassWithoutDependencies).AssertNoViolations(helper); should.NotBe(helper.ClassWithoutDependenciesSystemType).AssertNoViolations(helper); should.NotBe(Classes().That().Are(helper.ClassWithoutDependencies)).AssertNoViolations(helper); should.NotBe([helper.ClassWithoutDependencies]).AssertNoViolations(helper); should.NotBe([helper.ClassWithoutDependenciesSystemType]).AssertNoViolations(helper); + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().AreNot(helper.ClassWithoutDependencies)).AssertNoViolations(helper); + should.Be(Types().That().AreNot(helper.ClassWithoutDependenciesSystemType)).AssertNoViolations(helper); + should.Be(Types().That().AreNot(helper.ClassWithoutDependencies)).AssertNoViolations(helper); + should.Be(Types().That().AreNot([helper.ClassWithoutDependencies])).AssertNoViolations(helper); + should.Be(Types().That().AreNot([helper.ClassWithoutDependenciesSystemType])).AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should.BeTypesThat().AreNot(helper.ClassWithoutDependencies).AssertNoViolations(helper); + should.BeTypesThat().AreNot(helper.ClassWithoutDependenciesSystemType).AssertNoViolations(helper); + should.BeTypesThat().AreNot(Classes().That().Are(helper.ClassWithoutDependencies)).AssertNoViolations(helper); + should.BeTypesThat().AreNot([helper.ClassWithoutDependencies]).AssertNoViolations(helper); + should.BeTypesThat().AreNot([helper.ClassWithoutDependenciesSystemType]).AssertNoViolations(helper); + helper.AddSnapshotHeader("Violations"); should = Types().That().DependOnAny(helper.BaseClass).Should(); + + helper.AddSnapshotSubHeader("Conditions"); should.NotBe(helper.ChildClass).AssertAnyViolations(helper); should.NotBe(helper.ChildClassSystemType).AssertAnyViolations(helper); should.NotBe(Classes().That().Are(helper.ChildClass)).AssertAnyViolations(helper); should.NotBe([helper.ChildClass]).AssertAnyViolations(helper); should.NotBe([helper.ChildClassSystemType]).AssertAnyViolations(helper); + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().AreNot(helper.ChildClass)).AssertAnyViolations(helper); + should.Be(Types().That().AreNot(helper.ChildClassSystemType)).AssertAnyViolations(helper); + should.Be(Types().That().AreNot(Classes().That().Are(helper.ChildClass))).AssertAnyViolations(helper); + should.Be(Types().That().AreNot([helper.ChildClass])).AssertAnyViolations(helper); + should.Be(Types().That().AreNot([helper.ChildClassSystemType])).AssertAnyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should.BeTypesThat().AreNot(helper.ChildClass).AssertAnyViolations(helper); + should.BeTypesThat().AreNot(helper.ChildClassSystemType).AssertAnyViolations(helper); + should.BeTypesThat().AreNot(Classes().That().Are(helper.ChildClass)).AssertAnyViolations(helper); + should.BeTypesThat().AreNot([helper.ChildClass]).AssertAnyViolations(helper); + should.BeTypesThat().AreNot([helper.ChildClassSystemType]).AssertAnyViolations(helper); + helper.AddSnapshotHeader("Empty arguments"); should = Types().That().DependOnAny(helper.BaseClass).Should(); + + helper.AddSnapshotSubHeader("Conditions"); should.NotBe(new List()).AssertNoViolations(helper); should.NotBe(new List()).AssertNoViolations(helper); should.NotBe(Classes().That().HaveFullName(helper.NonExistentObjectName)).AssertNoViolations(helper); + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().AreNot(new List())).AssertNoViolations(helper); + should.Be(Types().That().AreNot(new List())).AssertNoViolations(helper); + should.Be(Types().That().AreNot(Classes().That().HaveFullName(helper.NonExistentObjectName))).AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should.BeTypesThat().AreNot(new List()).AssertNoViolations(helper); + should.BeTypesThat().AreNot(new List()).AssertNoViolations(helper); + should.BeTypesThat().AreNot(Classes().That().HaveFullName(helper.NonExistentObjectName)).AssertNoViolations(helper); + helper.AddSnapshotHeader("Multiple arguments"); should = Types().That().DependOnAny(helper.BaseClass).Should(); + + helper.AddSnapshotSubHeader("Conditions"); should.NotBe(helper.ClassWithoutDependencies, helper.BaseClass).AssertNoViolations(helper); should.NotBe([helper.ClassWithoutDependencies, helper.BaseClass]).AssertNoViolations(helper); should.NotBe(helper.ClassWithoutDependenciesSystemType, helper.BaseClassSystemType).AssertNoViolations(helper); should.NotBe([helper.ClassWithoutDependenciesSystemType, helper.BaseClassSystemType]).AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().AreNot(helper.ClassWithoutDependencies, helper.BaseClass)).AssertNoViolations(helper); + should.Be(Types().That().AreNot([helper.ClassWithoutDependencies, helper.BaseClass])).AssertNoViolations(helper); + should.Be(Types().That().AreNot(helper.ClassWithoutDependenciesSystemType, helper.BaseClassSystemType)).AssertNoViolations(helper); + should.Be(Types().That().AreNot([helper.ClassWithoutDependenciesSystemType, helper.BaseClassSystemType])).AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should.BeTypesThat().AreNot(helper.ClassWithoutDependencies, helper.BaseClass).AssertNoViolations(helper); + should.BeTypesThat().AreNot([helper.ClassWithoutDependencies, helper.BaseClass]).AssertNoViolations(helper); + should.BeTypesThat().AreNot(helper.ClassWithoutDependenciesSystemType, helper.BaseClassSystemType).AssertNoViolations(helper); + should.BeTypesThat().AreNot([helper.ClassWithoutDependenciesSystemType, helper.BaseClassSystemType]).AssertNoViolations(helper); + await helper.AssertSnapshotMatches(); } @@ -666,31 +1553,88 @@ public async Task NotBeTest() public async Task NotCallAnyTest() { var helper = new DependencyAssemblyTestHelper(); + helper.AddSnapshotHeader("No violations"); var should = MethodMembers().That().Are(helper.MethodWithSingleDependency).Should(); + + helper.AddSnapshotSubHeader("Conditions"); should.NotCallAny(helper.MethodWithoutDependencies).AssertNoViolations(helper); should.NotCallAny([helper.MethodWithoutDependencies]).AssertNoViolations(helper); should.NotCallAny(MethodMembers().That().Are(helper.MethodWithoutDependencies)).AssertNoViolations(helper); + helper.AddSnapshotSubHeader("Predicates"); + should.Be(MethodMembers().That().DoNotCallAny(helper.MethodWithoutDependencies)).AssertNoViolations(helper); + should.Be(MethodMembers().That().DoNotCallAny([helper.MethodWithoutDependencies])).AssertNoViolations(helper); + should.Be(MethodMembers().That().DoNotCallAny(MethodMembers().That().Are(helper.MethodWithoutDependencies))).AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should.BeMethodMembersThat().DoNotCallAny(helper.MethodWithoutDependencies).AssertNoViolations(helper); + should.BeMethodMembersThat().DoNotCallAny([helper.MethodWithoutDependencies]).AssertNoViolations(helper); + should.BeMethodMembersThat().DoNotCallAny(MethodMembers().That().Are(helper.MethodWithoutDependencies)).AssertNoViolations(helper); + helper.AddSnapshotHeader("Violations"); should = MethodMembers().That().Are(helper.MethodWithSingleDependency).Should(); + + helper.AddSnapshotSubHeader("Conditions"); should.NotCallAny(helper.CalledMethod).AssertOnlyViolations(helper); should.NotCallAny([helper.CalledMethod]).AssertOnlyViolations(helper); should.NotCallAny(MethodMembers().That().Are(helper.CalledMethod)).AssertOnlyViolations(helper); + helper.AddSnapshotSubHeader("Predicates"); + should.Be(MethodMembers().That().DoNotCallAny(helper.CalledMethod)).AssertOnlyViolations(helper); + should.Be(MethodMembers().That().DoNotCallAny([helper.CalledMethod])).AssertOnlyViolations(helper); + should.Be(MethodMembers().That().DoNotCallAny(MethodMembers().That().Are(helper.CalledMethod))).AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should.BeMethodMembersThat().DoNotCallAny(helper.CalledMethod).AssertOnlyViolations(helper); + should.BeMethodMembersThat().DoNotCallAny([helper.CalledMethod]).AssertOnlyViolations(helper); + should.BeMethodMembersThat().DoNotCallAny(MethodMembers().That().Are(helper.CalledMethod)).AssertOnlyViolations(helper); + helper.AddSnapshotHeader("Empty arguments"); should = MethodMembers().That().Are(helper.MethodWithSingleDependency).Should(); + + helper.AddSnapshotSubHeader("Conditions"); should.NotCallAny(new List()).AssertNoViolations(helper); + helper.AddSnapshotSubHeader("Predicates"); + should.Be(MethodMembers().That().DoNotCallAny(new List())).AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should.BeMethodMembersThat().DoNotCallAny(new List()).AssertNoViolations(helper); + helper.AddSnapshotHeader("Multiple arguments"); should = MethodMembers().That().Are(helper.MethodWithMultipleDependencies).Should(); + + helper.AddSnapshotSubHeader("Conditions"); should.NotCallAny(helper.MethodWithoutDependencies, helper.CalledMethod1, helper.CalledMethod2).AssertOnlyViolations(helper); should.NotCallAny([helper.MethodWithoutDependencies, helper.CalledMethod1, helper.CalledMethod2]).AssertOnlyViolations(helper); should.NotCallAny(MethodMembers().That().Are(helper.MethodWithoutDependencies, helper.CalledMethod1, helper.CalledMethod2)).AssertOnlyViolations(helper); + helper.AddSnapshotSubHeader("Predicates"); + should.Be(MethodMembers().That().DoNotCallAny(helper.MethodWithoutDependencies, helper.CalledMethod1, helper.CalledMethod2)).AssertOnlyViolations(helper); + should.Be(MethodMembers().That().DoNotCallAny([helper.MethodWithoutDependencies, helper.CalledMethod1, helper.CalledMethod2])).AssertOnlyViolations(helper); + should.Be(MethodMembers().That().DoNotCallAny(MethodMembers().That().Are(helper.MethodWithoutDependencies, helper.CalledMethod1, helper.CalledMethod2))).AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should.BeMethodMembersThat().DoNotCallAny(helper.MethodWithoutDependencies, helper.CalledMethod1, helper.CalledMethod2).AssertOnlyViolations(helper); + should.BeMethodMembersThat().DoNotCallAny([helper.MethodWithoutDependencies, helper.CalledMethod1, helper.CalledMethod2]).AssertOnlyViolations(helper); + should.BeMethodMembersThat().DoNotCallAny(MethodMembers().That().Are(helper.MethodWithoutDependencies, helper.CalledMethod1, helper.CalledMethod2)).AssertOnlyViolations(helper); + helper.AddSnapshotHeader("Multiple inputs"); - MethodMembers().That().Are(helper.MethodWithSingleDependency, helper.MethodWithMultipleDependencies).Should().NotCallAny(helper.MethodWithoutDependencies).AssertNoViolations(helper); - MethodMembers().That().Are(helper.MethodWithSingleDependency, helper.MethodWithMultipleDependencies).Should().NotCallAny(helper.CalledMethod, helper.CalledMethod1, helper.CalledMethod2).AssertOnlyViolations(helper); + should = MethodMembers().That().Are(helper.MethodWithSingleDependency, helper.MethodWithMultipleDependencies).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should.NotCallAny(helper.MethodWithoutDependencies).AssertNoViolations(helper); + should.NotCallAny(helper.CalledMethod, helper.CalledMethod1, helper.CalledMethod2).AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should.Be(MethodMembers().That().DoNotCallAny(helper.MethodWithoutDependencies)).AssertNoViolations(helper); + should.Be(MethodMembers().That().DoNotCallAny(helper.CalledMethod, helper.CalledMethod1, helper.CalledMethod2)).AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should.BeMethodMembersThat().DoNotCallAny(helper.MethodWithoutDependencies).AssertNoViolations(helper); + should.BeMethodMembersThat().DoNotCallAny(helper.CalledMethod, helper.CalledMethod1, helper.CalledMethod2).AssertOnlyViolations(helper); + await helper.AssertSnapshotMatches(); } @@ -710,46 +1654,125 @@ public async Task NotDependOnAnyTypesThatTest() public async Task NotDependOnAnyTest() { var helper = new DependencyAssemblyTestHelper(); + helper.AddSnapshotHeader("No violations"); var should = Types().That().Are(helper.ChildClass).Should(); + + helper.AddSnapshotSubHeader("Conditions"); should.NotDependOnAny(helper.ClassWithoutDependencies).AssertNoViolations(helper); should.NotDependOnAny(helper.ClassWithoutDependenciesSystemType).AssertNoViolations(helper); should.NotDependOnAny(Classes().That().Are(helper.ClassWithoutDependencies)).AssertNoViolations(helper); should.NotDependOnAny([helper.ClassWithoutDependencies]).AssertNoViolations(helper); should.NotDependOnAny([helper.ClassWithoutDependenciesSystemType]).AssertNoViolations(helper); + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().DoNotDependOnAny(helper.ClassWithoutDependencies)).AssertNoViolations(helper); + should.Be(Types().That().DoNotDependOnAny(helper.ClassWithoutDependenciesSystemType)).AssertNoViolations(helper); + should.Be(Types().That().DoNotDependOnAny(helper.ClassWithoutDependencies)).AssertNoViolations(helper); + should.Be(Types().That().DoNotDependOnAny([helper.ClassWithoutDependencies])).AssertNoViolations(helper); + should.Be(Types().That().DoNotDependOnAny([helper.ClassWithoutDependenciesSystemType])).AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should.BeTypesThat().DoNotDependOnAny(helper.ClassWithoutDependencies).AssertNoViolations(helper); + should.BeTypesThat().DoNotDependOnAny(helper.ClassWithoutDependenciesSystemType).AssertNoViolations(helper); + should.BeTypesThat().DoNotDependOnAny(Classes().That().Are(helper.ClassWithoutDependencies)).AssertNoViolations(helper); + should.BeTypesThat().DoNotDependOnAny([helper.ClassWithoutDependencies]).AssertNoViolations(helper); + should.BeTypesThat().DoNotDependOnAny([helper.ClassWithoutDependenciesSystemType]).AssertNoViolations(helper); + helper.AddSnapshotHeader("Violations"); should = Types().That().Are(helper.ChildClass).Should(); + + helper.AddSnapshotSubHeader("Conditions"); should.NotDependOnAny(helper.BaseClass).AssertOnlyViolations(helper); should.NotDependOnAny(helper.BaseClassSystemType).AssertOnlyViolations(helper); should.NotDependOnAny(Classes().That().Are(helper.BaseClass)).AssertOnlyViolations(helper); should.NotDependOnAny([helper.BaseClass]).AssertOnlyViolations(helper); should.NotDependOnAny([helper.BaseClassSystemType]).AssertOnlyViolations(helper); + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().DoNotDependOnAny(helper.BaseClass)).AssertOnlyViolations(helper); + should.Be(Types().That().DoNotDependOnAny(helper.BaseClassSystemType)).AssertOnlyViolations(helper); + should.Be(Types().That().DoNotDependOnAny(Classes().That().Are(helper.BaseClass))).AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should.BeTypesThat().DoNotDependOnAny(helper.BaseClass).AssertOnlyViolations(helper); + should.BeTypesThat().DoNotDependOnAny(helper.BaseClassSystemType).AssertOnlyViolations(helper); + should.BeTypesThat().DoNotDependOnAny(Classes().That().Are(helper.BaseClass)).AssertOnlyViolations(helper); + should.BeTypesThat().DoNotDependOnAny([helper.BaseClass]).AssertOnlyViolations(helper); + should.BeTypesThat().DoNotDependOnAny([helper.BaseClassSystemType]).AssertOnlyViolations(helper); + helper.AddSnapshotHeader("Type outside of architecture"); should = Types().That().Are(helper.ChildClass).Should(); + + helper.AddSnapshotSubHeader("Conditions"); should.NotDependOnAny(typeof(AttributeNamespace.ClassWithoutAttributes)).AssertException(helper); + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().DoNotDependOnAny(typeof(AttributeNamespace.ClassWithoutAttributes))).AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should.BeTypesThat().DoNotDependOnAny(typeof(AttributeNamespace.ClassWithoutAttributes)).AssertNoViolations(helper); + helper.AddSnapshotHeader("Empty arguments"); should = Types().That().Are(helper.ChildClass).Should(); + + helper.AddSnapshotSubHeader("Conditions"); should.NotDependOnAny(new List()).AssertNoViolations(helper); should.NotDependOnAny(new List()).AssertNoViolations(helper); + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().DoNotDependOnAny(new List())).AssertNoViolations(helper); + should.Be(Types().That().DoNotDependOnAny(new List())).AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should.BeTypesThat().DoNotDependOnAny(new List()).AssertNoViolations(helper); + should.BeTypesThat().DoNotDependOnAny(new List()).AssertNoViolations(helper); + helper.AddSnapshotHeader("Multiple arguments"); should = Types().That().Are(helper.ChildClass).Should(); + + helper.AddSnapshotSubHeader("Conditions"); should.NotDependOnAny(helper.ClassWithoutDependencies, helper.BaseClass).AssertOnlyViolations(helper); should.NotDependOnAny([helper.ClassWithoutDependencies, helper.BaseClass]).AssertOnlyViolations(helper); should.NotDependOnAny(helper.ClassWithoutDependenciesSystemType, helper.BaseClassSystemType).AssertOnlyViolations(helper); should.NotDependOnAny([helper.ClassWithoutDependenciesSystemType, helper.BaseClassSystemType]).AssertOnlyViolations(helper); + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().DoNotDependOnAny(helper.ClassWithoutDependencies, helper.BaseClass)).AssertOnlyViolations(helper); + should.Be(Types().That().DoNotDependOnAny([helper.ClassWithoutDependencies, helper.BaseClass])).AssertOnlyViolations(helper); + should.Be(Types().That().DoNotDependOnAny(helper.ClassWithoutDependenciesSystemType, helper.BaseClassSystemType)).AssertOnlyViolations(helper); + should.Be(Types().That().DoNotDependOnAny([helper.ClassWithoutDependenciesSystemType, helper.BaseClassSystemType])).AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should.BeTypesThat().DoNotDependOnAny(helper.ClassWithoutDependencies, helper.BaseClass).AssertOnlyViolations(helper); + should.BeTypesThat().DoNotDependOnAny([helper.ClassWithoutDependencies, helper.BaseClass]).AssertOnlyViolations(helper); + should.BeTypesThat().DoNotDependOnAny(helper.ClassWithoutDependenciesSystemType, helper.BaseClassSystemType).AssertOnlyViolations(helper); + should.BeTypesThat().DoNotDependOnAny([helper.ClassWithoutDependenciesSystemType, helper.BaseClassSystemType]).AssertOnlyViolations(helper); + helper.AddSnapshotHeader("Input with multiple dependencies"); should = Types().That().Are(helper.ClassWithMultipleDependencies).Should(); + + helper.AddSnapshotSubHeader("Conditions"); should.NotDependOnAny(helper.BaseClassWithMember, helper.OtherBaseClass).AssertOnlyViolations(helper); should.NotDependOnAny([helper.BaseClassWithMember, helper.OtherBaseClass]).AssertOnlyViolations(helper); should.NotDependOnAny(helper.BaseClassWithMemberSystemType, helper.OtherBaseClassSystemType).AssertOnlyViolations(helper); should.NotDependOnAny([helper.BaseClassWithMemberSystemType, helper.OtherBaseClassSystemType]).AssertOnlyViolations(helper); should.NotDependOnAny(Classes().That().Are(helper.BaseClassWithMember, helper.OtherBaseClass)).AssertOnlyViolations(helper); + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().DoNotDependOnAny(helper.BaseClassWithMember, helper.OtherBaseClass)).AssertOnlyViolations(helper); + should.Be(Types().That().DoNotDependOnAny([helper.BaseClassWithMember, helper.OtherBaseClass])).AssertOnlyViolations(helper); + should.Be(Types().That().DoNotDependOnAny(helper.BaseClassWithMemberSystemType, helper.OtherBaseClassSystemType)).AssertOnlyViolations(helper); + should.Be(Types().That().DoNotDependOnAny([helper.BaseClassWithMemberSystemType, helper.OtherBaseClassSystemType])).AssertOnlyViolations(helper); + should.Be(Classes().That().DoNotDependOnAny(helper.BaseClassWithMember, helper.OtherBaseClass)).AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should.BeTypesThat().DoNotDependOnAny(helper.BaseClassWithMember, helper.OtherBaseClass).AssertOnlyViolations(helper); + should.BeTypesThat().DoNotDependOnAny([helper.BaseClassWithMember, helper.OtherBaseClass]).AssertOnlyViolations(helper); + should.BeTypesThat().DoNotDependOnAny(helper.BaseClassWithMemberSystemType, helper.OtherBaseClassSystemType).AssertOnlyViolations(helper); + should.BeTypesThat().DoNotDependOnAny([helper.BaseClassWithMemberSystemType, helper.OtherBaseClassSystemType]).AssertOnlyViolations(helper); + should.BeTypesThat().DoNotDependOnAny(Classes().That().Are(helper.BaseClassWithMember, helper.OtherBaseClass)).AssertOnlyViolations(helper); + await helper.AssertSnapshotMatches(); } @@ -771,47 +1794,124 @@ public async Task NotExistTest() public async Task NotHaveAnyAttributesTest() { var helper = new AttributeAssemblyTestHelpers(); + helper.AddSnapshotHeader("No violations"); var should = Types().That().Are(helper.ClassWithSingleAttribute).Should(); + + helper.AddSnapshotSubHeader("Conditions"); should.NotHaveAnyAttributes(helper.UnusedAttribute).AssertNoViolations(helper); should.NotHaveAnyAttributes([helper.UnusedAttribute]).AssertNoViolations(helper); should.NotHaveAnyAttributes(helper.UnusedAttributeSystemType).AssertNoViolations(helper); should.NotHaveAnyAttributes([helper.UnusedAttributeSystemType]).AssertNoViolations(helper); should.NotHaveAnyAttributes(Attributes().That().Are(helper.UnusedAttribute)).AssertNoViolations(helper); + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().DoNotHaveAnyAttributes(helper.UnusedAttribute)).AssertNoViolations(helper); + should.Be(Types().That().DoNotHaveAnyAttributes([helper.UnusedAttribute])).AssertNoViolations(helper); + should.Be(Types().That().DoNotHaveAnyAttributes(helper.UnusedAttributeSystemType)).AssertNoViolations(helper); + should.Be(Types().That().DoNotHaveAnyAttributes([helper.UnusedAttributeSystemType])).AssertNoViolations(helper); + should.Be(Types().That().DoNotHaveAnyAttributes(Attributes().That().Are(helper.UnusedAttribute))).AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should.BeTypesThat().DoNotHaveAnyAttributes(helper.UnusedAttribute).AssertNoViolations(helper); + should.BeTypesThat().DoNotHaveAnyAttributes([helper.UnusedAttribute]).AssertNoViolations(helper); + should.BeTypesThat().DoNotHaveAnyAttributes(helper.UnusedAttributeSystemType).AssertNoViolations(helper); + should.BeTypesThat().DoNotHaveAnyAttributes([helper.UnusedAttributeSystemType]).AssertNoViolations(helper); + should.BeTypesThat().DoNotHaveAnyAttributes(Attributes().That().Are(helper.UnusedAttribute)).AssertNoViolations(helper); + helper.AddSnapshotHeader("Violations"); should = Types().That().Are(helper.ClassWithSingleAttribute).Should(); + + helper.AddSnapshotSubHeader("Conditions"); should.NotHaveAnyAttributes(helper.Attribute1).AssertOnlyViolations(helper); should.NotHaveAnyAttributes([helper.Attribute1]).AssertOnlyViolations(helper); should.NotHaveAnyAttributes(helper.Attribute1SystemType).AssertOnlyViolations(helper); should.NotHaveAnyAttributes([helper.Attribute1SystemType]).AssertOnlyViolations(helper); should.NotHaveAnyAttributes(Attributes().That().Are(helper.Attribute1)).AssertOnlyViolations(helper); + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().DoNotHaveAnyAttributes(helper.Attribute1)).AssertOnlyViolations(helper); + should.Be(Types().That().DoNotHaveAnyAttributes([helper.Attribute1])).AssertOnlyViolations(helper); + should.Be(Types().That().DoNotHaveAnyAttributes(helper.Attribute1SystemType)).AssertOnlyViolations(helper); + should.Be(Types().That().DoNotHaveAnyAttributes([helper.Attribute1SystemType])).AssertOnlyViolations(helper); + should.Be(Types().That().DoNotHaveAnyAttributes(Attributes().That().Are(helper.Attribute1))).AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should.BeTypesThat().DoNotHaveAnyAttributes(helper.Attribute1).AssertOnlyViolations(helper); + should.BeTypesThat().DoNotHaveAnyAttributes([helper.Attribute1]).AssertOnlyViolations(helper); + should.BeTypesThat().DoNotHaveAnyAttributes(helper.Attribute1SystemType).AssertOnlyViolations(helper); + should.BeTypesThat().DoNotHaveAnyAttributes([helper.Attribute1SystemType]).AssertOnlyViolations(helper); + should.BeTypesThat().DoNotHaveAnyAttributes(Attributes().That().Are(helper.Attribute1)).AssertOnlyViolations(helper); + helper.AddSnapshotHeader("Type outside of architecture"); should = Types().That().Are(helper.ClassWithTwoAttributes).Should(); + + helper.AddSnapshotSubHeader("Conditions"); should.NotHaveAnyAttributes(typeof(TypeDependencyNamespace.BaseClass)).AssertException(helper); + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().DoNotHaveAnyAttributes(typeof(TypeDependencyNamespace.BaseClass))).AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should.BeTypesThat().DoNotHaveAnyAttributes(typeof(TypeDependencyNamespace.BaseClass)).AssertNoViolations(helper); + helper.AddSnapshotHeader("Empty arguments"); should = Types().That().Are(helper.ClassWithoutAttributes).Should(); + + helper.AddSnapshotSubHeader("Conditions"); should.NotHaveAnyAttributes(new List()).AssertNoViolations(helper); should.NotHaveAnyAttributes(new List()).AssertNoViolations(helper); should.NotHaveAnyAttributes(Attributes().That().HaveFullName(helper.NonExistentObjectName)).AssertNoViolations(helper); - should = Types().That().HaveFullName(helper.NonExistentObjectName).Should(); - should.NotHaveAnyAttributes(new List()).WithoutRequiringPositiveResults().AssertNoViolations(helper); - should.NotHaveAnyAttributes(new List()).WithoutRequiringPositiveResults().AssertNoViolations(helper); - should.NotHaveAnyAttributes(Attributes().That().HaveFullName(helper.NonExistentObjectName)).WithoutRequiringPositiveResults().AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().DoNotHaveAnyAttributes(new List())).AssertNoViolations(helper); + should.Be(Types().That().DoNotHaveAnyAttributes(new List())).AssertNoViolations(helper); + should.Be(Types().That().DoNotHaveAnyAttributes(Attributes().That().HaveFullName(helper.NonExistentObjectName))).AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should.BeTypesThat().DoNotHaveAnyAttributes(new List()).AssertNoViolations(helper); + should.BeTypesThat().DoNotHaveAnyAttributes(new List()).AssertNoViolations(helper); + should.BeTypesThat().DoNotHaveAnyAttributes(Attributes().That().HaveFullName(helper.NonExistentObjectName)).AssertNoViolations(helper); helper.AddSnapshotHeader("Multiple arguments"); should = Types().That().Are(helper.ClassWithTwoAttributes).Should(); + + helper.AddSnapshotSubHeader("Conditions"); should.NotHaveAnyAttributes(helper.Attribute1, helper.Attribute2).AssertOnlyViolations(helper); should.NotHaveAnyAttributes([helper.Attribute1, helper.Attribute2]).AssertOnlyViolations(helper); should.NotHaveAnyAttributes(helper.Attribute1SystemType, helper.Attribute2SystemType).AssertOnlyViolations(helper); should.NotHaveAnyAttributes([helper.Attribute1SystemType, helper.Attribute2SystemType]).AssertOnlyViolations(helper); should.NotHaveAnyAttributes(Attributes().That().Are(helper.Attribute1, helper.Attribute2)).AssertOnlyViolations(helper); + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().DoNotHaveAnyAttributes(helper.Attribute1, helper.Attribute2)).AssertOnlyViolations(helper); + should.Be(Types().That().DoNotHaveAnyAttributes([helper.Attribute1, helper.Attribute2])).AssertOnlyViolations(helper); + should.Be(Types().That().DoNotHaveAnyAttributes(helper.Attribute1SystemType, helper.Attribute2SystemType)).AssertOnlyViolations(helper); + should.Be(Types().That().DoNotHaveAnyAttributes([helper.Attribute1SystemType, helper.Attribute2SystemType])).AssertOnlyViolations(helper); + should.Be(Types().That().DoNotHaveAnyAttributes(Attributes().That().Are(helper.Attribute1, helper.Attribute2))).AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should.BeTypesThat().DoNotHaveAnyAttributes(helper.Attribute1, helper.Attribute2).AssertOnlyViolations(helper); + should.BeTypesThat().DoNotHaveAnyAttributes([helper.Attribute1, helper.Attribute2]).AssertOnlyViolations(helper); + should.BeTypesThat().DoNotHaveAnyAttributes(helper.Attribute1SystemType, helper.Attribute2SystemType).AssertOnlyViolations(helper); + should.BeTypesThat().DoNotHaveAnyAttributes([helper.Attribute1SystemType, helper.Attribute2SystemType]).AssertOnlyViolations(helper); + should.BeTypesThat().DoNotHaveAnyAttributes(Attributes().That().Are(helper.Attribute1, helper.Attribute2)).AssertOnlyViolations(helper); + helper.AddSnapshotHeader("Multiple inputs"); - Types().That().Are(helper.ClassWithoutAttributes, helper.ClassWithSingleAttribute).Should().NotHaveAnyAttributes(helper.Attribute2).AssertNoViolations(helper); - Types().That().Are(helper.ClassWithoutAttributes, helper.ClassWithSingleAttribute).Should().NotHaveAnyAttributes(helper.Attribute1).AssertAnyViolations(helper); + should = Types().That().Are(helper.ClassWithoutAttributes, helper.ClassWithSingleAttribute).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should.NotHaveAnyAttributes(helper.Attribute2).AssertNoViolations(helper); + should.NotHaveAnyAttributes(helper.Attribute1).AssertAnyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().DoNotHaveAnyAttributes(helper.Attribute2)).AssertNoViolations(helper); + should.Be(Types().That().DoNotHaveAnyAttributes(helper.Attribute1)).AssertAnyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should.BeTypesThat().DoNotHaveAnyAttributes(helper.Attribute2).AssertNoViolations(helper); + should.BeTypesThat().DoNotHaveAnyAttributes(helper.Attribute1).AssertAnyViolations(helper); + await helper.AssertSnapshotMatches(); } @@ -833,47 +1933,133 @@ public async Task NotHaveAnyAttributesThatTest() public async Task NotHaveAnyAttributesWithArgumentsTest() { var helper = new AttributeAssemblyTestHelpers(); + helper.AddSnapshotHeader("No violations with type arguments"); var should = Types().That().Are(helper.ClassWithSingleAttributeWithArguments).Should(); - should.NotHaveAnyAttributesWithArguments(helper.UnusedTypeArgument).AssertNoViolations(helper); - should.NotHaveAnyAttributesWithArguments([helper.UnusedTypeArgument]).AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Conditions"); + should.NotHaveAnyAttributesWithArguments(helper.UnusedTypeArgumentSystemType).AssertNoViolations(helper); + should.NotHaveAnyAttributesWithArguments([helper.UnusedTypeArgumentSystemType]).AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().DoNotHaveAnyAttributesWithArguments(helper.UnusedTypeArgumentSystemType)).AssertNoViolations(helper); + should.Be(Types().That().DoNotHaveAnyAttributesWithArguments([helper.UnusedTypeArgumentSystemType])).AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should.BeTypesThat().DoNotHaveAnyAttributesWithArguments(helper.UnusedTypeArgumentSystemType).AssertNoViolations(helper); + should.BeTypesThat().DoNotHaveAnyAttributesWithArguments([helper.UnusedTypeArgumentSystemType]).AssertNoViolations(helper); helper.AddSnapshotHeader("No violations with value arguments"); should = Types().That().Are(helper.ClassWithSingleAttributeWithArguments).Should(); + + helper.AddSnapshotSubHeader("Conditions"); should.NotHaveAnyAttributesWithArguments(helper.UnusedAttributeStringValue).AssertNoViolations(helper); should.NotHaveAnyAttributesWithArguments([helper.UnusedAttributeStringValue]).AssertNoViolations(helper); + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().DoNotHaveAnyAttributesWithArguments(helper.UnusedAttributeStringValue)).AssertNoViolations(helper); + should.Be(Types().That().DoNotHaveAnyAttributesWithArguments([helper.UnusedAttributeStringValue])).AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should.BeTypesThat().DoNotHaveAnyAttributesWithArguments(helper.UnusedAttributeStringValue).AssertNoViolations(helper); + should.BeTypesThat().DoNotHaveAnyAttributesWithArguments([helper.UnusedAttributeStringValue]).AssertNoViolations(helper); + helper.AddSnapshotHeader("Violations with type arguments"); should = Types().That().Are(helper.ClassWithSingleAttributeWithArguments).Should(); + + helper.AddSnapshotSubHeader("Conditions"); should.NotHaveAnyAttributesWithArguments(helper.Attribute1TypeArgumentSystemType).AssertOnlyViolations(helper); should.NotHaveAnyAttributesWithArguments([helper.Attribute1TypeArgumentSystemType]).AssertOnlyViolations(helper); + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().DoNotHaveAnyAttributesWithArguments(helper.Attribute1TypeArgumentSystemType)).AssertOnlyViolations(helper); + should.Be(Types().That().DoNotHaveAnyAttributesWithArguments([helper.Attribute1TypeArgumentSystemType])).AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should.BeTypesThat().DoNotHaveAnyAttributesWithArguments(helper.Attribute1TypeArgumentSystemType).AssertOnlyViolations(helper); + should.BeTypesThat().DoNotHaveAnyAttributesWithArguments([helper.Attribute1TypeArgumentSystemType]).AssertOnlyViolations(helper); + helper.AddSnapshotHeader("Violations with value arguments"); should = Types().That().Are(helper.ClassWithSingleAttributeWithArguments).Should(); + + helper.AddSnapshotSubHeader("Conditions"); should.NotHaveAnyAttributesWithArguments(helper.Attribute1IntegerArgument).AssertOnlyViolations(helper); should.NotHaveAnyAttributesWithArguments([helper.Attribute1IntegerArgument]).AssertOnlyViolations(helper); + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().DoNotHaveAnyAttributesWithArguments(helper.Attribute1IntegerArgument)).AssertOnlyViolations(helper); + should.Be(Types().That().DoNotHaveAnyAttributesWithArguments([helper.Attribute1IntegerArgument])).AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should.BeTypesThat().DoNotHaveAnyAttributesWithArguments(helper.Attribute1IntegerArgument).AssertOnlyViolations(helper); + should.BeTypesThat().DoNotHaveAnyAttributesWithArguments([helper.Attribute1IntegerArgument]).AssertOnlyViolations(helper); + helper.AddSnapshotHeader("Type without attributes"); should = Types().That().Are(helper.ClassWithoutAttributes).Should(); + + helper.AddSnapshotSubHeader("Conditions"); should.NotHaveAnyAttributesWithArguments(helper.Attribute1StringArgument).AssertNoViolations(helper); + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().DoNotHaveAnyAttributesWithArguments(helper.Attribute1StringArgument)).AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should.BeTypesThat().DoNotHaveAnyAttributesWithArguments(helper.Attribute1StringArgument).AssertNoViolations(helper); + helper.AddSnapshotHeader("Null argument"); should = Types().That().Are(helper.ClassWithSingleAttributeWithArguments).Should(); + + helper.AddSnapshotSubHeader("Conditions"); should.NotHaveAnyAttributesWithArguments(null).AssertNoViolations(helper); + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().DoNotHaveAnyAttributesWithArguments(null)).AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should.BeTypesThat().DoNotHaveAnyAttributesWithArguments(null).AssertNoViolations(helper); + helper.AddSnapshotHeader("Empty arguments"); should = Types().That().Are(helper.ClassWithSingleAttributeWithArguments).Should(); + + helper.AddSnapshotSubHeader("Conditions"); should.NotHaveAnyAttributesWithArguments([]).AssertNoViolations(helper); + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().DoNotHaveAnyAttributesWithArguments([])).AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should.BeTypesThat().DoNotHaveAnyAttributesWithArguments([]).AssertNoViolations(helper); + helper.AddSnapshotHeader("Multiple arguments"); should = Types().That().Are(helper.ClassWithSingleAttributeWithArguments).Should(); + + helper.AddSnapshotSubHeader("Conditions"); should.NotHaveAnyAttributesWithArguments([helper.UnusedTypeArgument, helper.Attribute1StringArgument]).AssertOnlyViolations(helper); should.NotHaveAnyAttributesWithArguments(helper.UnusedTypeArgument, helper.Attribute1StringArgument).AssertOnlyViolations(helper); + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().DoNotHaveAnyAttributesWithArguments([helper.UnusedTypeArgument, helper.Attribute1StringArgument])).AssertOnlyViolations(helper); + should.Be(Types().That().DoNotHaveAnyAttributesWithArguments(helper.UnusedTypeArgument, helper.Attribute1StringArgument)).AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should.BeTypesThat().DoNotHaveAnyAttributesWithArguments([helper.UnusedTypeArgument, helper.Attribute1StringArgument]).AssertOnlyViolations(helper); + should.BeTypesThat().DoNotHaveAnyAttributesWithArguments(helper.UnusedTypeArgument, helper.Attribute1StringArgument).AssertOnlyViolations(helper); + helper.AddSnapshotHeader("Multiple inputs"); should = Types().That().Are(helper.ClassWithSingleAttributeWithArguments, helper.ClassWithTwoAttributesWithArguments).Should(); + + helper.AddSnapshotSubHeader("Conditions"); should.NotHaveAnyAttributesWithArguments(helper.Attribute1StringArgument).AssertOnlyViolations(helper); should.NotHaveAnyAttributesWithArguments([helper.Attribute1StringArgument]).AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().DoNotHaveAnyAttributesWithArguments(helper.Attribute1StringArgument)).AssertOnlyViolations(helper); + should.Be(Types().That().DoNotHaveAnyAttributesWithArguments([helper.Attribute1StringArgument])).AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should.BeTypesThat().DoNotHaveAnyAttributesWithArguments(helper.Attribute1StringArgument).AssertOnlyViolations(helper); + should.BeTypesThat().DoNotHaveAnyAttributesWithArguments([helper.Attribute1StringArgument]).AssertOnlyViolations(helper); + await helper.AssertSnapshotMatches(); } @@ -881,43 +2067,117 @@ public async Task NotHaveAnyAttributesWithArgumentsTest() public async Task NotHaveAnyAttributesWithNamedArgumentsTest() { var helper = new AttributeAssemblyTestHelpers(); + helper.AddSnapshotHeader("No violations with type arguments"); var should = Types().That().Are(helper.ClassWithSingleAttributeWithNamedArguments).Should(); - should.NotHaveAnyAttributesWithNamedArguments(("InvalidName", helper.Attribute1TypeArgument)).AssertNoViolations(helper); - should.NotHaveAnyAttributesWithNamedArguments([("InvalidName", helper.Attribute1TypeArgument)]).AssertNoViolations(helper); - should.NotHaveAnyAttributesWithNamedArguments(("NamedParameter1", helper.UnusedTypeArgument)).AssertNoViolations(helper); - should.NotHaveAnyAttributesWithNamedArguments([("NamedParameter1", helper.UnusedTypeArgument)]).AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Conditions"); + should.NotHaveAnyAttributesWithNamedArguments(("InvalidName", helper.Attribute1TypeArgumentSystemType)).AssertNoViolations(helper); + should.NotHaveAnyAttributesWithNamedArguments([("InvalidName", helper.Attribute1TypeArgumentSystemType)]).AssertNoViolations(helper); + should.NotHaveAnyAttributesWithNamedArguments(("NamedParameter1", helper.UnusedTypeArgumentSystemType)).AssertNoViolations(helper); + should.NotHaveAnyAttributesWithNamedArguments([("NamedParameter1", helper.UnusedTypeArgumentSystemType)]).AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().DoNotHaveAnyAttributesWithNamedArguments(("InvalidName", helper.Attribute1TypeArgumentSystemType))).AssertNoViolations(helper); + should.Be(Types().That().DoNotHaveAnyAttributesWithNamedArguments([("InvalidName", helper.Attribute1TypeArgumentSystemType)])).AssertNoViolations(helper); + should.Be(Types().That().DoNotHaveAnyAttributesWithNamedArguments(("NamedParameter1", helper.UnusedTypeArgumentSystemType))).AssertNoViolations(helper); + should.Be(Types().That().DoNotHaveAnyAttributesWithNamedArguments([("NamedParameter1", helper.UnusedTypeArgumentSystemType)])).AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should.BeTypesThat().DoNotHaveAnyAttributesWithNamedArguments(("InvalidName", helper.Attribute1TypeArgumentSystemType)).AssertNoViolations(helper); + should.BeTypesThat().DoNotHaveAnyAttributesWithNamedArguments([("InvalidName", helper.Attribute1TypeArgumentSystemType)]).AssertNoViolations(helper); + should.BeTypesThat().DoNotHaveAnyAttributesWithNamedArguments(("NamedParameter1", helper.UnusedTypeArgumentSystemType)).AssertNoViolations(helper); + should.BeTypesThat().DoNotHaveAnyAttributesWithNamedArguments([("NamedParameter1", helper.UnusedTypeArgumentSystemType)]).AssertNoViolations(helper); helper.AddSnapshotHeader("No violations with value arguments"); should = Types().That().Are(helper.ClassWithSingleAttributeWithNamedArguments).Should(); + + helper.AddSnapshotSubHeader("Conditions"); should.NotHaveAnyAttributesWithNamedArguments(("InvalidName", helper.Attribute1StringArgument)).AssertNoViolations(helper); should.NotHaveAnyAttributesWithNamedArguments([("InvalidName", helper.Attribute1StringArgument)]).AssertNoViolations(helper); should.NotHaveAnyAttributesWithNamedArguments(("NamedParameter2", helper.UnusedAttributeStringValue)).AssertNoViolations(helper); should.NotHaveAnyAttributesWithNamedArguments([("NamedParameter2", helper.UnusedAttributeStringValue)]).AssertNoViolations(helper); + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().DoNotHaveAnyAttributesWithNamedArguments(("InvalidName", helper.Attribute1StringArgument))).AssertNoViolations(helper); + should.Be(Types().That().DoNotHaveAnyAttributesWithNamedArguments([("InvalidName", helper.Attribute1StringArgument)])).AssertNoViolations(helper); + should.Be(Types().That().DoNotHaveAnyAttributesWithNamedArguments(("NamedParameter2", helper.UnusedAttributeStringValue))).AssertNoViolations(helper); + should.Be(Types().That().DoNotHaveAnyAttributesWithNamedArguments([("NamedParameter2", helper.UnusedAttributeStringValue)])).AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should.BeTypesThat().DoNotHaveAnyAttributesWithNamedArguments(("InvalidName", helper.Attribute1StringArgument)).AssertNoViolations(helper); + should.BeTypesThat().DoNotHaveAnyAttributesWithNamedArguments([("InvalidName", helper.Attribute1StringArgument)]).AssertNoViolations(helper); + should.BeTypesThat().DoNotHaveAnyAttributesWithNamedArguments(("NamedParameter2", helper.UnusedAttributeStringValue)).AssertNoViolations(helper); + should.BeTypesThat().DoNotHaveAnyAttributesWithNamedArguments([("NamedParameter2", helper.UnusedAttributeStringValue)]).AssertNoViolations(helper); + helper.AddSnapshotHeader("Violations with type arguments"); should = Types().That().Are(helper.ClassWithSingleAttributeWithNamedArguments).Should(); + + helper.AddSnapshotSubHeader("Conditions"); should.NotHaveAnyAttributesWithNamedArguments(("NamedParameter1", helper.Attribute1TypeArgumentSystemType)).AssertOnlyViolations(helper); should.NotHaveAnyAttributesWithNamedArguments([("NamedParameter1", helper.Attribute1TypeArgumentSystemType)]).AssertOnlyViolations(helper); + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().DoNotHaveAnyAttributesWithNamedArguments(("NamedParameter1", helper.Attribute1TypeArgumentSystemType))).AssertOnlyViolations(helper); + should.Be(Types().That().DoNotHaveAnyAttributesWithNamedArguments([("NamedParameter1", helper.Attribute1TypeArgumentSystemType)])).AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should.BeTypesThat().DoNotHaveAnyAttributesWithNamedArguments(("NamedParameter1", helper.Attribute1TypeArgumentSystemType)).AssertOnlyViolations(helper); + should.BeTypesThat().DoNotHaveAnyAttributesWithNamedArguments([("NamedParameter1", helper.Attribute1TypeArgumentSystemType)]).AssertOnlyViolations(helper); + helper.AddSnapshotHeader("Violations with value arguments"); should = Types().That().Are(helper.ClassWithSingleAttributeWithNamedArguments).Should(); + + helper.AddSnapshotSubHeader("Conditions"); should.NotHaveAnyAttributesWithNamedArguments(("NamedParameter2", helper.Attribute1StringArgument)).AssertOnlyViolations(helper); should.NotHaveAnyAttributesWithNamedArguments([("NamedParameter2", helper.Attribute1StringArgument)]).AssertOnlyViolations(helper); + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().DoNotHaveAnyAttributesWithNamedArguments(("NamedParameter2", helper.Attribute1StringArgument))).AssertOnlyViolations(helper); + should.Be(Types().That().DoNotHaveAnyAttributesWithNamedArguments([("NamedParameter2", helper.Attribute1StringArgument)])).AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should.BeTypesThat().DoNotHaveAnyAttributesWithNamedArguments(("NamedParameter2", helper.Attribute1StringArgument)).AssertOnlyViolations(helper); + should.BeTypesThat().DoNotHaveAnyAttributesWithNamedArguments([("NamedParameter2", helper.Attribute1StringArgument)]).AssertOnlyViolations(helper); + helper.AddSnapshotHeader("Empty arguments"); should = Types().That().Are(helper.ClassWithSingleAttributeWithNamedArguments).Should(); + + helper.AddSnapshotSubHeader("Conditions"); should.NotHaveAnyAttributesWithNamedArguments([]).AssertNoViolations(helper); + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().DoNotHaveAnyAttributesWithNamedArguments([])).AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should.BeTypesThat().DoNotHaveAnyAttributesWithNamedArguments([]).AssertNoViolations(helper); + helper.AddSnapshotHeader("Multiple arguments"); should = Types().That().Are(helper.ClassWithSingleAttributeWithNamedArguments).Should(); + + helper.AddSnapshotSubHeader("Conditions"); should.NotHaveAnyAttributesWithNamedArguments(("NamedParameter1", helper.Attribute1TypeArgument), ("NamedParameter2", helper.Attribute1StringArgument)).AssertOnlyViolations(helper); should.NotHaveAnyAttributesWithNamedArguments([("NamedParameter1", helper.Attribute1TypeArgument), ("NamedParameter2", helper.Attribute1StringArgument),]).AssertOnlyViolations(helper); + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().DoNotHaveAnyAttributesWithNamedArguments(("NamedParameter1", helper.Attribute1TypeArgument), ("NamedParameter2", helper.Attribute1StringArgument))).AssertOnlyViolations(helper); + should.Be(Types().That().DoNotHaveAnyAttributesWithNamedArguments([("NamedParameter1", helper.Attribute1TypeArgument), ("NamedParameter2", helper.Attribute1StringArgument)])).AssertOnlyViolations(helper); + helper.AddSnapshotHeader("Multiple inputs"); should = Types().That().Are(helper.ClassWithSingleAttributeWithNamedArguments, helper.ClassWithTwoAttributesWithNamedArguments).Should(); + + helper.AddSnapshotSubHeader("Conditions"); should.NotHaveAnyAttributesWithNamedArguments(("NamedParameter1", helper.Attribute1TypeArgumentSystemType)).AssertOnlyViolations(helper); should.NotHaveAnyAttributesWithNamedArguments([("NamedParameter1", helper.Attribute1TypeArgumentSystemType)]).AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().DoNotHaveAnyAttributesWithNamedArguments(("NamedParameter1", helper.Attribute1TypeArgumentSystemType))).AssertOnlyViolations(helper); + should.Be(Types().That().DoNotHaveAnyAttributesWithNamedArguments([("NamedParameter1", helper.Attribute1TypeArgumentSystemType)])).AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should.BeTypesThat().DoNotHaveAnyAttributesWithNamedArguments(("NamedParameter1", helper.Attribute1TypeArgumentSystemType)).AssertOnlyViolations(helper); + should.BeTypesThat().DoNotHaveAnyAttributesWithNamedArguments([("NamedParameter1", helper.Attribute1TypeArgumentSystemType)]).AssertOnlyViolations(helper); + await helper.AssertSnapshotMatches(); } @@ -925,50 +2185,139 @@ public async Task NotHaveAnyAttributesWithNamedArgumentsTest() public async Task NotHaveAttributeWithArgumentsTest() { var helper = new AttributeAssemblyTestHelpers(); + helper.AddSnapshotHeader("No violations with type arguments"); var should = Types().That().Are(helper.ClassWithSingleAttributeWithArguments).Should(); - should.NotHaveAttributeWithArguments(helper.Attribute1, helper.Attribute2TypeArgument).AssertNoViolations(helper); - should.NotHaveAttributeWithArguments(helper.Attribute1, [helper.Attribute2TypeArgument]).AssertNoViolations(helper); - should.NotHaveAttributeWithArguments(helper.Attribute1SystemType, helper.Attribute2TypeArgument).AssertNoViolations(helper); - should.NotHaveAttributeWithArguments(helper.Attribute1SystemType, [helper.Attribute2TypeArgument]).AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Conditions"); + should.NotHaveAttributeWithArguments(helper.Attribute1, helper.Attribute2TypeArgumentSystemType).AssertNoViolations(helper); + should.NotHaveAttributeWithArguments(helper.Attribute1, [helper.Attribute2TypeArgumentSystemType]).AssertNoViolations(helper); + should.NotHaveAttributeWithArguments(helper.Attribute1SystemType, helper.Attribute2TypeArgumentSystemType).AssertNoViolations(helper); + should.NotHaveAttributeWithArguments(helper.Attribute1SystemType, [helper.Attribute2TypeArgumentSystemType]).AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().DoNotHaveAttributeWithArguments(helper.Attribute1, helper.Attribute2TypeArgumentSystemType)).AssertNoViolations(helper); + should.Be(Types().That().DoNotHaveAttributeWithArguments(helper.Attribute1, [helper.Attribute2TypeArgumentSystemType])).AssertNoViolations(helper); + should.Be(Types().That().DoNotHaveAttributeWithArguments(helper.Attribute1SystemType, helper.Attribute2TypeArgumentSystemType)).AssertNoViolations(helper); + should.Be(Types().That().DoNotHaveAttributeWithArguments(helper.Attribute1SystemType, [helper.Attribute2TypeArgumentSystemType])).AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should.BeTypesThat().DoNotHaveAttributeWithArguments(helper.Attribute1, helper.Attribute2TypeArgumentSystemType).AssertNoViolations(helper); + should.BeTypesThat().DoNotHaveAttributeWithArguments(helper.Attribute1, [helper.Attribute2TypeArgumentSystemType]).AssertNoViolations(helper); + should.BeTypesThat().DoNotHaveAttributeWithArguments(helper.Attribute1SystemType, helper.Attribute2TypeArgumentSystemType).AssertNoViolations(helper); + should.BeTypesThat().DoNotHaveAttributeWithArguments(helper.Attribute1SystemType, [helper.Attribute2TypeArgumentSystemType]).AssertNoViolations(helper); helper.AddSnapshotHeader("No violations with value arguments"); should = Types().That().Are(helper.ClassWithSingleAttributeWithArguments).Should(); + + helper.AddSnapshotSubHeader("Conditions"); should.NotHaveAttributeWithArguments(helper.Attribute1, helper.Attribute2StringArgument).AssertNoViolations(helper); should.NotHaveAttributeWithArguments(helper.Attribute1, [helper.Attribute2StringArgument]).AssertNoViolations(helper); should.NotHaveAttributeWithArguments(helper.Attribute1SystemType, helper.Attribute2StringArgument).AssertNoViolations(helper); should.NotHaveAttributeWithArguments(helper.Attribute1SystemType, [helper.Attribute2StringArgument]).AssertNoViolations(helper); + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().DoNotHaveAttributeWithArguments(helper.Attribute1, helper.Attribute2StringArgument)).AssertNoViolations(helper); + should.Be(Types().That().DoNotHaveAttributeWithArguments(helper.Attribute1, [helper.Attribute2StringArgument])).AssertNoViolations(helper); + should.Be(Types().That().DoNotHaveAttributeWithArguments(helper.Attribute1SystemType, helper.Attribute2StringArgument)).AssertNoViolations(helper); + should.Be(Types().That().DoNotHaveAttributeWithArguments(helper.Attribute1SystemType, [helper.Attribute2StringArgument])).AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should.BeTypesThat().DoNotHaveAttributeWithArguments(helper.Attribute1, helper.Attribute2StringArgument).AssertNoViolations(helper); + should.BeTypesThat().DoNotHaveAttributeWithArguments(helper.Attribute1, [helper.Attribute2StringArgument]).AssertNoViolations(helper); + should.BeTypesThat().DoNotHaveAttributeWithArguments(helper.Attribute1SystemType, helper.Attribute2StringArgument).AssertNoViolations(helper); + should.BeTypesThat().DoNotHaveAttributeWithArguments(helper.Attribute1SystemType, [helper.Attribute2StringArgument]).AssertNoViolations(helper); + helper.AddSnapshotHeader("Violations with type arguments"); should = Types().That().Are(helper.ClassWithSingleAttributeWithArguments).Should(); - should.NotHaveAttributeWithArguments(helper.Attribute1, helper.Attribute1StringArgument).AssertOnlyViolations(helper); - should.NotHaveAttributeWithArguments(helper.Attribute1, [helper.Attribute1StringArgument]).AssertOnlyViolations(helper); - should.NotHaveAttributeWithArguments(helper.Attribute1SystemType, helper.Attribute1StringArgument).AssertOnlyViolations(helper); - should.NotHaveAttributeWithArguments(helper.Attribute1SystemType, [helper.Attribute1StringArgument]).AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Conditions"); + should.NotHaveAttributeWithArguments(helper.Attribute1, helper.Attribute1TypeArgumentSystemType).AssertOnlyViolations(helper); + should.NotHaveAttributeWithArguments(helper.Attribute1, [helper.Attribute1TypeArgumentSystemType]).AssertOnlyViolations(helper); + should.NotHaveAttributeWithArguments(helper.Attribute1SystemType, helper.Attribute1TypeArgumentSystemType).AssertOnlyViolations(helper); + should.NotHaveAttributeWithArguments(helper.Attribute1SystemType, [helper.Attribute1TypeArgumentSystemType]).AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().DoNotHaveAttributeWithArguments(helper.Attribute1, helper.Attribute1TypeArgumentSystemType)).AssertOnlyViolations(helper); + should.Be(Types().That().DoNotHaveAttributeWithArguments(helper.Attribute1, [helper.Attribute1TypeArgumentSystemType])).AssertOnlyViolations(helper); + should.Be(Types().That().DoNotHaveAttributeWithArguments(helper.Attribute1SystemType, helper.Attribute1TypeArgumentSystemType)).AssertOnlyViolations(helper); + should.Be(Types().That().DoNotHaveAttributeWithArguments(helper.Attribute1SystemType, [helper.Attribute1TypeArgumentSystemType])).AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should.BeTypesThat().DoNotHaveAttributeWithArguments(helper.Attribute1, helper.Attribute1TypeArgumentSystemType).AssertOnlyViolations(helper); + should.BeTypesThat().DoNotHaveAttributeWithArguments(helper.Attribute1, [helper.Attribute1TypeArgumentSystemType]).AssertOnlyViolations(helper); + should.BeTypesThat().DoNotHaveAttributeWithArguments(helper.Attribute1SystemType, helper.Attribute1TypeArgumentSystemType).AssertOnlyViolations(helper); + should.BeTypesThat().DoNotHaveAttributeWithArguments(helper.Attribute1SystemType, [helper.Attribute1TypeArgumentSystemType]).AssertOnlyViolations(helper); helper.AddSnapshotHeader("Violations with value arguments"); should = Types().That().Are(helper.ClassWithSingleAttributeWithArguments).Should(); + + helper.AddSnapshotSubHeader("Conditions"); should.NotHaveAttributeWithArguments(helper.Attribute1, helper.Attribute1IntegerArgument).AssertOnlyViolations(helper); should.NotHaveAttributeWithArguments(helper.Attribute1, [helper.Attribute1IntegerArgument]).AssertOnlyViolations(helper); should.NotHaveAttributeWithArguments(helper.Attribute1SystemType, helper.Attribute1IntegerArgument).AssertOnlyViolations(helper); should.NotHaveAttributeWithArguments(helper.Attribute1SystemType, [helper.Attribute1IntegerArgument]).AssertOnlyViolations(helper); + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().DoNotHaveAttributeWithArguments(helper.Attribute1, helper.Attribute1IntegerArgument)).AssertOnlyViolations(helper); + should.Be(Types().That().DoNotHaveAttributeWithArguments(helper.Attribute1, [helper.Attribute1IntegerArgument])).AssertOnlyViolations(helper); + should.Be(Types().That().DoNotHaveAttributeWithArguments(helper.Attribute1SystemType, helper.Attribute1IntegerArgument)).AssertOnlyViolations(helper); + should.Be(Types().That().DoNotHaveAttributeWithArguments(helper.Attribute1SystemType, [helper.Attribute1IntegerArgument])).AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should.BeTypesThat().DoNotHaveAttributeWithArguments(helper.Attribute1, helper.Attribute1IntegerArgument).AssertOnlyViolations(helper); + should.BeTypesThat().DoNotHaveAttributeWithArguments(helper.Attribute1, [helper.Attribute1IntegerArgument]).AssertOnlyViolations(helper); + should.BeTypesThat().DoNotHaveAttributeWithArguments(helper.Attribute1SystemType, helper.Attribute1IntegerArgument).AssertOnlyViolations(helper); + should.BeTypesThat().DoNotHaveAttributeWithArguments(helper.Attribute1SystemType, [helper.Attribute1IntegerArgument]).AssertOnlyViolations(helper); + helper.AddSnapshotHeader("Unused attribute"); should = Types().That().Are(helper.ClassWithSingleAttributeWithArguments).Should(); + + helper.AddSnapshotSubHeader("Conditions"); should.NotHaveAttributeWithArguments(helper.UnusedAttribute, helper.Attribute1StringArgument).AssertNoViolations(helper); should.NotHaveAttributeWithArguments(helper.UnusedAttribute, [helper.Attribute1StringArgument]).AssertNoViolations(helper); should.NotHaveAttributeWithArguments(helper.UnusedAttributeSystemType, helper.Attribute1StringArgument).AssertNoViolations(helper); should.NotHaveAttributeWithArguments(helper.UnusedAttributeSystemType, [helper.Attribute1StringArgument]).AssertNoViolations(helper); + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().DoNotHaveAttributeWithArguments(helper.UnusedAttribute, helper.Attribute1StringArgument)).AssertNoViolations(helper); + should.Be(Types().That().DoNotHaveAttributeWithArguments(helper.UnusedAttribute, [helper.Attribute1StringArgument])).AssertNoViolations(helper); + should.Be(Types().That().DoNotHaveAttributeWithArguments(helper.UnusedAttributeSystemType, helper.Attribute1StringArgument)).AssertNoViolations(helper); + should.Be(Types().That().DoNotHaveAttributeWithArguments(helper.UnusedAttributeSystemType, [helper.Attribute1StringArgument])).AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should.BeTypesThat().DoNotHaveAttributeWithArguments(helper.UnusedAttribute, helper.Attribute1StringArgument).AssertNoViolations(helper); + should.BeTypesThat().DoNotHaveAttributeWithArguments(helper.UnusedAttribute, [helper.Attribute1StringArgument]).AssertNoViolations(helper); + should.BeTypesThat().DoNotHaveAttributeWithArguments(helper.UnusedAttributeSystemType, helper.Attribute1StringArgument).AssertNoViolations(helper); + should.BeTypesThat().DoNotHaveAttributeWithArguments(helper.UnusedAttributeSystemType, [helper.Attribute1StringArgument]).AssertNoViolations(helper); + helper.AddSnapshotHeader("Type outside of architecture"); should = Types().That().Are(helper.ClassWithSingleAttributeWithArguments).Should(); + + helper.AddSnapshotSubHeader("Conditions"); should.NotHaveAttributeWithArguments(typeof(TypeDependencyNamespace.BaseClass),1).AssertNoViolations(helper); + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().DoNotHaveAttributeWithArguments(typeof(TypeDependencyNamespace.BaseClass),1)).AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should.BeTypesThat().DoNotHaveAttributeWithArguments(typeof(TypeDependencyNamespace.BaseClass),1).AssertNoViolations(helper); + helper.AddSnapshotHeader("Null argument"); should = Types().That().Are(helper.ClassWithSingleAttributeWithArguments).Should(); + + helper.AddSnapshotSubHeader("Conditions"); should.NotHaveAttributeWithArguments(helper.UnusedAttribute, null).AssertNoViolations(helper); should.NotHaveAttributeWithArguments(helper.UnusedAttributeSystemType, null).AssertNoViolations(helper); + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().DoNotHaveAttributeWithArguments(helper.UnusedAttribute, null)).AssertNoViolations(helper); + should.Be(Types().That().DoNotHaveAttributeWithArguments(helper.UnusedAttributeSystemType, null)).AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should.BeTypesThat().DoNotHaveAttributeWithArguments(helper.UnusedAttribute, null).AssertNoViolations(helper); + should.BeTypesThat().DoNotHaveAttributeWithArguments(helper.UnusedAttributeSystemType, null).AssertNoViolations(helper); + helper.AddSnapshotHeader("Empty arguments"); should = Types().That().Are(helper.ClassWithSingleAttributeWithArguments).Should(); should.NotHaveAttributeWithArguments(helper.Attribute1, []).AssertOnlyViolations(helper); @@ -976,18 +2325,46 @@ public async Task NotHaveAttributeWithArgumentsTest() helper.AddSnapshotHeader("Multiple arguments"); should = Types().That().Are(helper.ClassWithSingleAttributeWithArguments).Should(); + + helper.AddSnapshotSubHeader("Conditions"); should.NotHaveAttributeWithArguments(helper.Attribute1, helper.Attribute1TypeArgumentSystemType, helper.Attribute1IntegerArgument).AssertOnlyViolations(helper); should.NotHaveAttributeWithArguments(helper.Attribute1, [helper.Attribute1TypeArgumentSystemType, helper.Attribute1IntegerArgument]).AssertOnlyViolations(helper); should.NotHaveAttributeWithArguments(helper.Attribute1SystemType, helper.Attribute1TypeArgumentSystemType, helper.Attribute1IntegerArgument).AssertOnlyViolations(helper); should.NotHaveAttributeWithArguments(helper.Attribute1SystemType, [helper.Attribute1TypeArgumentSystemType, helper.Attribute1IntegerArgument]).AssertOnlyViolations(helper); + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().DoNotHaveAttributeWithArguments(helper.Attribute1, helper.Attribute1TypeArgumentSystemType, helper.Attribute1IntegerArgument)).AssertOnlyViolations(helper); + should.Be(Types().That().DoNotHaveAttributeWithArguments(helper.Attribute1, [helper.Attribute1TypeArgumentSystemType, helper.Attribute1IntegerArgument])).AssertOnlyViolations(helper); + should.Be(Types().That().DoNotHaveAttributeWithArguments(helper.Attribute1SystemType, helper.Attribute1TypeArgumentSystemType, helper.Attribute1IntegerArgument)).AssertOnlyViolations(helper); + should.Be(Types().That().DoNotHaveAttributeWithArguments(helper.Attribute1SystemType, [helper.Attribute1TypeArgumentSystemType, helper.Attribute1IntegerArgument])).AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should.BeTypesThat().DoNotHaveAttributeWithArguments(helper.Attribute1, helper.Attribute1TypeArgumentSystemType, helper.Attribute1IntegerArgument).AssertOnlyViolations(helper); + should.BeTypesThat().DoNotHaveAttributeWithArguments(helper.Attribute1, [helper.Attribute1TypeArgumentSystemType, helper.Attribute1IntegerArgument]).AssertOnlyViolations(helper); + should.BeTypesThat().DoNotHaveAttributeWithArguments(helper.Attribute1SystemType, helper.Attribute1TypeArgumentSystemType, helper.Attribute1IntegerArgument).AssertOnlyViolations(helper); + should.BeTypesThat().DoNotHaveAttributeWithArguments(helper.Attribute1SystemType, [helper.Attribute1TypeArgumentSystemType, helper.Attribute1IntegerArgument]).AssertOnlyViolations(helper); + helper.AddSnapshotHeader("Multiple inputs"); should = Types().That().Are(helper.ClassWithSingleAttributeWithArguments, helper.ClassWithTwoAttributesWithNamedArguments).Should(); + + helper.AddSnapshotSubHeader("Conditions"); should.NotHaveAttributeWithArguments(helper.Attribute1, helper.Attribute1StringArgument).AssertOnlyViolations(helper); should.NotHaveAttributeWithArguments(helper.Attribute1, [helper.Attribute1StringArgument]).AssertOnlyViolations(helper); should.NotHaveAttributeWithArguments(helper.Attribute1SystemType, helper.Attribute1StringArgument).AssertOnlyViolations(helper); should.NotHaveAttributeWithArguments(helper.Attribute1SystemType, [helper.Attribute1StringArgument]).AssertOnlyViolations(helper); + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().DoNotHaveAttributeWithArguments(helper.Attribute1, helper.Attribute1StringArgument)).AssertOnlyViolations(helper); + should.Be(Types().That().DoNotHaveAttributeWithArguments(helper.Attribute1, [helper.Attribute1StringArgument])).AssertOnlyViolations(helper); + should.Be(Types().That().DoNotHaveAttributeWithArguments(helper.Attribute1SystemType, helper.Attribute1StringArgument)).AssertOnlyViolations(helper); + should.Be(Types().That().DoNotHaveAttributeWithArguments(helper.Attribute1SystemType, [helper.Attribute1StringArgument])).AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should.BeTypesThat().DoNotHaveAttributeWithArguments(helper.Attribute1, helper.Attribute1StringArgument).AssertOnlyViolations(helper); + should.BeTypesThat().DoNotHaveAttributeWithArguments(helper.Attribute1, [helper.Attribute1StringArgument]).AssertOnlyViolations(helper); + should.BeTypesThat().DoNotHaveAttributeWithArguments(helper.Attribute1SystemType, helper.Attribute1StringArgument).AssertOnlyViolations(helper); + should.BeTypesThat().DoNotHaveAttributeWithArguments(helper.Attribute1SystemType, [helper.Attribute1StringArgument]).AssertOnlyViolations(helper); + await helper.AssertSnapshotMatches(); } @@ -995,64 +2372,181 @@ public async Task NotHaveAttributeWithArgumentsTest() public async Task NotHaveAttributeWithNamedArgumentsTest() { var helper = new AttributeAssemblyTestHelpers(); + helper.AddSnapshotHeader("No violations with type arguments"); var should = Types().That().Are(helper.ClassWithSingleAttributeWithNamedArguments).Should(); - should.NotHaveAttributeWithNamedArguments(helper.Attribute1, ("NamedParameter1", helper.Attribute2TypeArgument)).AssertNoViolations(helper); - should.NotHaveAttributeWithNamedArguments(helper.Attribute1, [("NamedParameter1", helper.Attribute2TypeArgument)]).AssertNoViolations(helper); - should.NotHaveAttributeWithNamedArguments(helper.Attribute1SystemType, ("NamedParameter1", helper.Attribute2TypeArgument)).AssertNoViolations(helper); - should.NotHaveAttributeWithNamedArguments(helper.Attribute1SystemType, [("NamedParameter1", helper.Attribute2TypeArgument)]).AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Conditions"); + should.NotHaveAttributeWithNamedArguments(helper.Attribute1, ("NamedParameter1", helper.Attribute2TypeArgumentSystemType)).AssertNoViolations(helper); + should.NotHaveAttributeWithNamedArguments(helper.Attribute1, [("NamedParameter1", helper.Attribute2TypeArgumentSystemType)]).AssertNoViolations(helper); + should.NotHaveAttributeWithNamedArguments(helper.Attribute1SystemType, ("NamedParameter1", helper.Attribute2TypeArgumentSystemType)).AssertNoViolations(helper); + should.NotHaveAttributeWithNamedArguments(helper.Attribute1SystemType, [("NamedParameter1", helper.Attribute2TypeArgumentSystemType)]).AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().DoNotHaveAttributeWithNamedArguments(helper.Attribute1, ("NamedParameter1", helper.Attribute2TypeArgumentSystemType))).AssertNoViolations(helper); + should.Be(Types().That().DoNotHaveAttributeWithNamedArguments(helper.Attribute1, [("NamedParameter1", helper.Attribute2TypeArgumentSystemType)])).AssertNoViolations(helper); + should.Be(Types().That().DoNotHaveAttributeWithNamedArguments(helper.Attribute1SystemType, ("NamedParameter1", helper.Attribute2TypeArgumentSystemType))).AssertNoViolations(helper); + should.Be(Types().That().DoNotHaveAttributeWithNamedArguments(helper.Attribute1SystemType, [("NamedParameter1", helper.Attribute2TypeArgumentSystemType)])).AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should.BeTypesThat().DoNotHaveAttributeWithNamedArguments(helper.Attribute1, ("NamedParameter1", helper.Attribute2TypeArgumentSystemType)).AssertNoViolations(helper); + should.BeTypesThat().DoNotHaveAttributeWithNamedArguments(helper.Attribute1, [("NamedParameter1", helper.Attribute2TypeArgumentSystemType)]).AssertNoViolations(helper); + should.BeTypesThat().DoNotHaveAttributeWithNamedArguments(helper.Attribute1SystemType, ("NamedParameter1", helper.Attribute2TypeArgumentSystemType)).AssertNoViolations(helper); + should.BeTypesThat().DoNotHaveAttributeWithNamedArguments(helper.Attribute1SystemType, [("NamedParameter1", helper.Attribute2TypeArgumentSystemType)]).AssertNoViolations(helper); helper.AddSnapshotHeader("No violations with value arguments"); should = Types().That().Are(helper.ClassWithSingleAttributeWithNamedArguments).Should(); + + helper.AddSnapshotSubHeader("Conditions"); should.NotHaveAttributeWithNamedArguments(helper.Attribute1, ("NamedParameter2", helper.Attribute2StringArgument)).AssertNoViolations(helper); should.NotHaveAttributeWithNamedArguments(helper.Attribute1, [("NamedParameter2", helper.Attribute2StringArgument)]).AssertNoViolations(helper); should.NotHaveAttributeWithNamedArguments(helper.Attribute1SystemType, ("NamedParameter2", helper.Attribute2StringArgument)).AssertNoViolations(helper); should.NotHaveAttributeWithNamedArguments(helper.Attribute1SystemType, [("NamedParameter2", helper.Attribute2StringArgument)]).AssertNoViolations(helper); + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().DoNotHaveAttributeWithNamedArguments(helper.Attribute1, ("NamedParameter2", helper.Attribute2StringArgument))).AssertNoViolations(helper); + should.Be(Types().That().DoNotHaveAttributeWithNamedArguments(helper.Attribute1, [("NamedParameter2", helper.Attribute2StringArgument)])).AssertNoViolations(helper); + should.Be(Types().That().DoNotHaveAttributeWithNamedArguments(helper.Attribute1SystemType, ("NamedParameter2", helper.Attribute2StringArgument))).AssertNoViolations(helper); + should.Be(Types().That().DoNotHaveAttributeWithNamedArguments(helper.Attribute1SystemType, [("NamedParameter2", helper.Attribute2StringArgument)])).AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should.BeTypesThat().DoNotHaveAttributeWithNamedArguments(helper.Attribute1, ("NamedParameter2", helper.Attribute2StringArgument)).AssertNoViolations(helper); + should.BeTypesThat().DoNotHaveAttributeWithNamedArguments(helper.Attribute1, [("NamedParameter2", helper.Attribute2StringArgument)]).AssertNoViolations(helper); + should.BeTypesThat().DoNotHaveAttributeWithNamedArguments(helper.Attribute1SystemType, ("NamedParameter2", helper.Attribute2StringArgument)).AssertNoViolations(helper); + should.BeTypesThat().DoNotHaveAttributeWithNamedArguments(helper.Attribute1SystemType, [("NamedParameter2", helper.Attribute2StringArgument)]).AssertNoViolations(helper); + helper.AddSnapshotHeader("Violations with type arguments"); should = Types().That().Are(helper.ClassWithSingleAttributeWithNamedArguments).Should(); + + helper.AddSnapshotSubHeader("Conditions"); should.NotHaveAttributeWithNamedArguments(helper.Attribute1, ("NamedParameter1", helper.Attribute1TypeArgumentSystemType)).AssertOnlyViolations(helper); should.NotHaveAttributeWithNamedArguments(helper.Attribute1, [("NamedParameter1", helper.Attribute1TypeArgumentSystemType)]).AssertOnlyViolations(helper); should.NotHaveAttributeWithNamedArguments(helper.Attribute1SystemType, ("NamedParameter1", helper.Attribute1TypeArgumentSystemType)).AssertOnlyViolations(helper); should.NotHaveAttributeWithNamedArguments(helper.Attribute1SystemType, [("NamedParameter1", helper.Attribute1TypeArgumentSystemType)]).AssertOnlyViolations(helper); + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().DoNotHaveAttributeWithNamedArguments(helper.Attribute1, ("NamedParameter1", helper.Attribute1TypeArgumentSystemType))).AssertOnlyViolations(helper); + should.Be(Types().That().DoNotHaveAttributeWithNamedArguments(helper.Attribute1, [("NamedParameter1", helper.Attribute1TypeArgumentSystemType)])).AssertOnlyViolations(helper); + should.Be(Types().That().DoNotHaveAttributeWithNamedArguments(helper.Attribute1SystemType, ("NamedParameter1", helper.Attribute1TypeArgumentSystemType))).AssertOnlyViolations(helper); + should.Be(Types().That().DoNotHaveAttributeWithNamedArguments(helper.Attribute1SystemType, [("NamedParameter1", helper.Attribute1TypeArgumentSystemType)])).AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should.BeTypesThat().DoNotHaveAttributeWithNamedArguments(helper.Attribute1, ("NamedParameter1", helper.Attribute1TypeArgumentSystemType)).AssertOnlyViolations(helper); + should.BeTypesThat().DoNotHaveAttributeWithNamedArguments(helper.Attribute1, [("NamedParameter1", helper.Attribute1TypeArgumentSystemType)]).AssertOnlyViolations(helper); + should.BeTypesThat().DoNotHaveAttributeWithNamedArguments(helper.Attribute1SystemType, ("NamedParameter1", helper.Attribute1TypeArgumentSystemType)).AssertOnlyViolations(helper); + should.BeTypesThat().DoNotHaveAttributeWithNamedArguments(helper.Attribute1SystemType, [("NamedParameter1", helper.Attribute1TypeArgumentSystemType)]).AssertOnlyViolations(helper); + helper.AddSnapshotHeader("Violations with value arguments"); should = Types().That().Are(helper.ClassWithSingleAttributeWithNamedArguments).Should(); + + helper.AddSnapshotSubHeader("Conditions"); should.NotHaveAttributeWithNamedArguments(helper.Attribute1, ("NamedParameter2", helper.Attribute1StringArgument)).AssertOnlyViolations(helper); should.NotHaveAttributeWithNamedArguments(helper.Attribute1, [("NamedParameter2", helper.Attribute1StringArgument)]).AssertOnlyViolations(helper); should.NotHaveAttributeWithNamedArguments(helper.Attribute1SystemType, ("NamedParameter2", helper.Attribute1StringArgument)).AssertOnlyViolations(helper); should.NotHaveAttributeWithNamedArguments(helper.Attribute1SystemType, [("NamedParameter2", helper.Attribute1StringArgument)]).AssertOnlyViolations(helper); + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().DoNotHaveAttributeWithNamedArguments(helper.Attribute1, ("NamedParameter2", helper.Attribute1StringArgument))).AssertOnlyViolations(helper); + should.Be(Types().That().DoNotHaveAttributeWithNamedArguments(helper.Attribute1, [("NamedParameter2", helper.Attribute1StringArgument)])).AssertOnlyViolations(helper); + should.Be(Types().That().DoNotHaveAttributeWithNamedArguments(helper.Attribute1SystemType, ("NamedParameter2", helper.Attribute1StringArgument))).AssertOnlyViolations(helper); + should.Be(Types().That().DoNotHaveAttributeWithNamedArguments(helper.Attribute1SystemType, [("NamedParameter2", helper.Attribute1StringArgument)])).AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should.BeTypesThat().DoNotHaveAttributeWithNamedArguments(helper.Attribute1, ("NamedParameter2", helper.Attribute1StringArgument)).AssertOnlyViolations(helper); + should.BeTypesThat().DoNotHaveAttributeWithNamedArguments(helper.Attribute1, [("NamedParameter2", helper.Attribute1StringArgument)]).AssertOnlyViolations(helper); + should.BeTypesThat().DoNotHaveAttributeWithNamedArguments(helper.Attribute1SystemType, ("NamedParameter2", helper.Attribute1StringArgument)).AssertOnlyViolations(helper); + should.BeTypesThat().DoNotHaveAttributeWithNamedArguments(helper.Attribute1SystemType, [("NamedParameter2", helper.Attribute1StringArgument)]).AssertOnlyViolations(helper); + helper.AddSnapshotHeader("Unused attribute"); should = Types().That().Are(helper.ClassWithSingleAttributeWithNamedArguments).Should(); + + helper.AddSnapshotSubHeader("Conditions"); should.NotHaveAttributeWithNamedArguments(helper.UnusedAttribute, ("NamedParameter1", helper.Attribute1TypeArgument)).AssertNoViolations(helper); should.NotHaveAttributeWithNamedArguments(helper.UnusedAttribute, [("NamedParameter1", helper.Attribute1TypeArgument)]).AssertNoViolations(helper); should.NotHaveAttributeWithNamedArguments(helper.UnusedAttributeSystemType, ("NamedParameter1", helper.Attribute1TypeArgument)).AssertNoViolations(helper); should.NotHaveAttributeWithNamedArguments(helper.UnusedAttributeSystemType, [("NamedParameter1", helper.Attribute1TypeArgument)]).AssertNoViolations(helper); + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().DoNotHaveAttributeWithNamedArguments(helper.UnusedAttribute, ("NamedParameter1", helper.Attribute1TypeArgument))).AssertNoViolations(helper); + should.Be(Types().That().DoNotHaveAttributeWithNamedArguments(helper.UnusedAttribute, [("NamedParameter1", helper.Attribute1TypeArgument)])).AssertNoViolations(helper); + should.Be(Types().That().DoNotHaveAttributeWithNamedArguments(helper.UnusedAttributeSystemType, ("NamedParameter1", helper.Attribute1TypeArgument))).AssertNoViolations(helper); + should.Be(Types().That().DoNotHaveAttributeWithNamedArguments(helper.UnusedAttributeSystemType, [("NamedParameter1", helper.Attribute1TypeArgument)])).AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should.BeTypesThat().DoNotHaveAttributeWithNamedArguments(helper.UnusedAttribute, ("NamedParameter1", helper.Attribute1TypeArgument)).AssertNoViolations(helper); + should.BeTypesThat().DoNotHaveAttributeWithNamedArguments(helper.UnusedAttribute, [("NamedParameter1", helper.Attribute1TypeArgument)]).AssertNoViolations(helper); + should.BeTypesThat().DoNotHaveAttributeWithNamedArguments(helper.UnusedAttributeSystemType, ("NamedParameter1", helper.Attribute1TypeArgument)).AssertNoViolations(helper); + should.BeTypesThat().DoNotHaveAttributeWithNamedArguments(helper.UnusedAttributeSystemType, [("NamedParameter1", helper.Attribute1TypeArgument)]).AssertNoViolations(helper); + helper.AddSnapshotHeader("Type outside of architecture"); should = Types().That().Are(helper.ClassWithSingleAttributeWithNamedArguments).Should(); + + helper.AddSnapshotSubHeader("Conditions"); should.NotHaveAttributeWithNamedArguments(typeof(TypeDependencyNamespace.BaseClass), ("NamedParameter1", helper.Attribute1TypeArgument)).AssertNoViolations(helper); + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().DoNotHaveAttributeWithNamedArguments(typeof(TypeDependencyNamespace.BaseClass), ("NamedParameter1", helper.Attribute1TypeArgument))).AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should.BeTypesThat().DoNotHaveAttributeWithNamedArguments(typeof(TypeDependencyNamespace.BaseClass), ("NamedParameter1", helper.Attribute1TypeArgument)).AssertNoViolations(helper); + helper.AddSnapshotHeader("Empty arguments"); should = Types().That().Are(helper.ClassWithSingleAttributeWithNamedArguments).Should(); + + helper.AddSnapshotSubHeader("Conditions"); should.NotHaveAttributeWithNamedArguments(helper.Attribute1, []).AssertOnlyViolations(helper); should.NotHaveAttributeWithNamedArguments(helper.Attribute1SystemType, []).AssertOnlyViolations(helper); + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().DoNotHaveAttributeWithNamedArguments(helper.Attribute1, [])).AssertOnlyViolations(helper); + should.Be(Types().That().DoNotHaveAttributeWithNamedArguments(helper.Attribute1SystemType, [])).AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should.BeTypesThat().DoNotHaveAttributeWithNamedArguments(helper.Attribute1, []).AssertOnlyViolations(helper); + should.BeTypesThat().DoNotHaveAttributeWithNamedArguments(helper.Attribute1SystemType, []).AssertOnlyViolations(helper); + helper.AddSnapshotHeader("Multiple arguments"); should = Types().That().Are(helper.ClassWithSingleAttributeWithNamedArguments).Should(); + + helper.AddSnapshotSubHeader("Conditions"); should.NotHaveAttributeWithNamedArguments(helper.Attribute1, ("NamedParameter1", helper.Attribute1TypeArgumentSystemType), ("NamedParameter2", helper.Attribute1StringArgument)).AssertOnlyViolations(helper); should.NotHaveAttributeWithNamedArguments(helper.Attribute1, [("NamedParameter1", helper.Attribute1TypeArgumentSystemType), ("NamedParameter2", helper.Attribute1StringArgument),]).AssertOnlyViolations(helper); should.NotHaveAttributeWithNamedArguments(helper.Attribute1SystemType, ("NamedParameter1", helper.Attribute1TypeArgumentSystemType), ("NamedParameter2", helper.Attribute1StringArgument)).AssertOnlyViolations(helper); should.NotHaveAttributeWithNamedArguments(helper.Attribute1SystemType, [("NamedParameter1", helper.Attribute1TypeArgumentSystemType), ("NamedParameter2", helper.Attribute1StringArgument),]).AssertOnlyViolations(helper); + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().DoNotHaveAttributeWithNamedArguments(helper.Attribute1, ("NamedParameter1", helper.Attribute1TypeArgumentSystemType), ("NamedParameter2", helper.Attribute1StringArgument))).AssertOnlyViolations(helper); + should.Be(Types().That().DoNotHaveAttributeWithNamedArguments(helper.Attribute1, [("NamedParameter1", helper.Attribute1TypeArgumentSystemType), ("NamedParameter2", helper.Attribute1StringArgument)])).AssertOnlyViolations(helper); + should.Be(Types().That().DoNotHaveAttributeWithNamedArguments(helper.Attribute1SystemType, ("NamedParameter1", helper.Attribute1TypeArgumentSystemType), ("NamedParameter2", helper.Attribute1StringArgument))).AssertOnlyViolations(helper); + should.Be(Types().That().DoNotHaveAttributeWithNamedArguments(helper.Attribute1SystemType, [("NamedParameter1", helper.Attribute1TypeArgumentSystemType), ("NamedParameter2", helper.Attribute1StringArgument)])).AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should.BeTypesThat().DoNotHaveAttributeWithNamedArguments(helper.Attribute1, ("NamedParameter1", helper.Attribute1TypeArgumentSystemType), ("NamedParameter2", helper.Attribute1StringArgument)).AssertOnlyViolations(helper); + should.BeTypesThat().DoNotHaveAttributeWithNamedArguments(helper.Attribute1, [("NamedParameter1", helper.Attribute1TypeArgumentSystemType), ("NamedParameter2", helper.Attribute1StringArgument)]).AssertOnlyViolations(helper); + should.BeTypesThat().DoNotHaveAttributeWithNamedArguments(helper.Attribute1SystemType, ("NamedParameter1", helper.Attribute1TypeArgumentSystemType), ("NamedParameter2", helper.Attribute1StringArgument)).AssertOnlyViolations(helper); + should.BeTypesThat().DoNotHaveAttributeWithNamedArguments(helper.Attribute1SystemType, [("NamedParameter1", helper.Attribute1TypeArgumentSystemType), ("NamedParameter2", helper.Attribute1StringArgument)]).AssertOnlyViolations(helper); + helper.AddSnapshotHeader("Multiple inputs"); should = Types().That().Are(helper.ClassWithSingleAttributeWithNamedArguments, helper.ClassWithTwoAttributesWithNamedArguments).Should(); + + helper.AddSnapshotSubHeader("Conditions"); should.NotHaveAttributeWithNamedArguments(helper.Attribute1, ("NamedParameter1", helper.Attribute1TypeArgumentSystemType)).AssertOnlyViolations(helper); should.NotHaveAttributeWithNamedArguments(helper.Attribute1, [("NamedParameter1", helper.Attribute1TypeArgumentSystemType)]).AssertOnlyViolations(helper); should.NotHaveAttributeWithNamedArguments(helper.Attribute1SystemType, ("NamedParameter1", helper.Attribute1TypeArgumentSystemType)).AssertOnlyViolations(helper); should.NotHaveAttributeWithNamedArguments(helper.Attribute1SystemType, [("NamedParameter1", helper.Attribute1TypeArgumentSystemType)]).AssertOnlyViolations(helper); + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().DoNotHaveAttributeWithNamedArguments(helper.Attribute1, ("NamedParameter1", helper.Attribute1TypeArgumentSystemType))).AssertOnlyViolations(helper); + should.Be(Types().That().DoNotHaveAttributeWithNamedArguments(helper.Attribute1, [("NamedParameter1", helper.Attribute1TypeArgumentSystemType)])).AssertOnlyViolations(helper); + should.Be(Types().That().DoNotHaveAttributeWithNamedArguments(helper.Attribute1SystemType, ("NamedParameter1", helper.Attribute1TypeArgumentSystemType))).AssertOnlyViolations(helper); + should.Be(Types().That().DoNotHaveAttributeWithNamedArguments(helper.Attribute1SystemType, [("NamedParameter1", helper.Attribute1TypeArgumentSystemType)])).AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should.BeTypesThat().DoNotHaveAttributeWithNamedArguments(helper.Attribute1, ("NamedParameter1", helper.Attribute1TypeArgumentSystemType)).AssertOnlyViolations(helper); + should.BeTypesThat().DoNotHaveAttributeWithNamedArguments(helper.Attribute1, [("NamedParameter1", helper.Attribute1TypeArgumentSystemType)]).AssertOnlyViolations(helper); + should.BeTypesThat().DoNotHaveAttributeWithNamedArguments(helper.Attribute1SystemType, ("NamedParameter1", helper.Attribute1TypeArgumentSystemType)).AssertOnlyViolations(helper); + should.BeTypesThat().DoNotHaveAttributeWithNamedArguments(helper.Attribute1SystemType, [("NamedParameter1", helper.Attribute1TypeArgumentSystemType)]).AssertOnlyViolations(helper); + await helper.AssertSnapshotMatches(); } @@ -1063,6 +2557,8 @@ public async Task NotHaveNameTest() helper.AddSnapshotHeader("No violations"); var should = Types().That().Are(helper.BaseClass).Should(); + + helper.AddSnapshotSubHeader("Conditions"); should.NotHaveName(helper.BaseClass.FullName).AssertNoViolations(helper); should.NotHaveNameMatching("^.*\\.Base.*$").AssertNoViolations(helper); should.NotHaveFullName(helper.BaseClass.Name).AssertNoViolations(helper); @@ -1072,8 +2568,30 @@ public async Task NotHaveNameTest() should.NotHaveNameStartingWith(helper.BaseClass.Namespace.Name).AssertNoViolations(helper); should.NotHaveNameEndingWith("Test").AssertNoViolations(helper); + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().DoNotHaveName(helper.BaseClass.FullName)).AssertNoViolations(helper); + should.Be(Types().That().DoNotHaveNameMatching("^.*\\.Base.*$")).AssertNoViolations(helper); + should.Be(Types().That().DoNotHaveFullName(helper.BaseClass.Name)).AssertNoViolations(helper); + should.Be(Types().That().DoNotHaveFullNameMatching("^Base.*$")).AssertNoViolations(helper); + should.Be(Types().That().DoNotHaveNameContaining(helper.BaseClass.Namespace.Name)).AssertNoViolations(helper); + should.Be(Types().That().DoNotHaveFullNameContaining(helper.NonExistentObjectName)).AssertNoViolations(helper); + should.Be(Types().That().DoNotHaveNameStartingWith(helper.BaseClass.Namespace.Name)).AssertNoViolations(helper); + should.Be(Types().That().DoNotHaveNameEndingWith("Test")).AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should.BeTypesThat().DoNotHaveName(helper.BaseClass.FullName).AssertNoViolations(helper); + should.BeTypesThat().DoNotHaveNameMatching("^.*\\.Base.*$").AssertNoViolations(helper); + should.BeTypesThat().DoNotHaveFullName(helper.BaseClass.Name).AssertNoViolations(helper); + should.BeTypesThat().DoNotHaveFullNameMatching("^Base.*$").AssertNoViolations(helper); + should.BeTypesThat().DoNotHaveNameContaining(helper.BaseClass.Namespace.Name).AssertNoViolations(helper); + should.BeTypesThat().DoNotHaveFullNameContaining(helper.NonExistentObjectName).AssertNoViolations(helper); + should.BeTypesThat().DoNotHaveNameStartingWith(helper.BaseClass.Namespace.Name).AssertNoViolations(helper); + should.BeTypesThat().DoNotHaveNameEndingWith("Test").AssertNoViolations(helper); + helper.AddSnapshotHeader("Violations"); should = Types().That().Are(helper.BaseClass).Should(); + + helper.AddSnapshotSubHeader("Conditions"); should.NotHaveName(helper.BaseClass.Name).AssertOnlyViolations(helper); should.NotHaveNameMatching("^Base.*$").AssertOnlyViolations(helper); should.NotHaveFullName(helper.BaseClass.FullName).AssertOnlyViolations(helper); @@ -1082,6 +2600,27 @@ public async Task NotHaveNameTest() should.NotHaveFullNameContaining(helper.BaseClass.Namespace.Name).AssertOnlyViolations(helper); should.NotHaveNameStartingWith(helper.BaseClass.Name).AssertOnlyViolations(helper); should.NotHaveNameEndingWith(helper.BaseClass.Name).AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().DoNotHaveName(helper.BaseClass.Name)).AssertOnlyViolations(helper); + should.Be(Types().That().DoNotHaveNameMatching("^Base.*$")).AssertOnlyViolations(helper); + should.Be(Types().That().DoNotHaveFullName(helper.BaseClass.FullName)).AssertOnlyViolations(helper); + should.Be(Types().That().DoNotHaveFullNameMatching("^.*\\.Base.*$")).AssertOnlyViolations(helper); + should.Be(Types().That().DoNotHaveNameContaining(helper.BaseClass.Name)).AssertOnlyViolations(helper); + should.Be(Types().That().DoNotHaveFullNameContaining(helper.BaseClass.Namespace.Name)).AssertOnlyViolations(helper); + should.Be(Types().That().DoNotHaveNameStartingWith(helper.BaseClass.Name)).AssertOnlyViolations(helper); + should.Be(Types().That().DoNotHaveNameEndingWith(helper.BaseClass.Name)).AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should.BeTypesThat().DoNotHaveName(helper.BaseClass.Name).AssertOnlyViolations(helper); + should.BeTypesThat().DoNotHaveNameMatching("^Base.*$").AssertOnlyViolations(helper); + should.BeTypesThat().DoNotHaveFullName(helper.BaseClass.FullName).AssertOnlyViolations(helper); + should.BeTypesThat().DoNotHaveFullNameMatching("^.*\\.Base.*$").AssertOnlyViolations(helper); + should.BeTypesThat().DoNotHaveNameContaining(helper.BaseClass.Name).AssertOnlyViolations(helper); + should.BeTypesThat().DoNotHaveFullNameContaining(helper.BaseClass.Namespace.Name).AssertOnlyViolations(helper); + should.BeTypesThat().DoNotHaveNameStartingWith(helper.BaseClass.Name).AssertOnlyViolations(helper); + should.BeTypesThat().DoNotHaveNameEndingWith(helper.BaseClass.Name).AssertOnlyViolations(helper); + await helper.AssertSnapshotMatches(); } @@ -1089,39 +2628,102 @@ public async Task NotHaveNameTest() public async Task OnlyDependOnTest() { var helper = new DependencyAssemblyTestHelper(); + helper.AddSnapshotHeader("No violations"); var should = Types().That().Are(helper.ChildClass).Should(); + + helper.AddSnapshotSubHeader("Conditions"); should.OnlyDependOn(helper.BaseClass).AssertNoViolations(helper); should.OnlyDependOn(helper.BaseClassSystemType).AssertNoViolations(helper); should.OnlyDependOn(Classes().That().Are(helper.BaseClass)).AssertNoViolations(helper); should.OnlyDependOn([helper.BaseClass]).AssertNoViolations(helper); should.OnlyDependOn([helper.BaseClassSystemType]).AssertNoViolations(helper); + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().OnlyDependOn(helper.BaseClass)).AssertNoViolations(helper); + should.Be(Types().That().OnlyDependOn(helper.BaseClassSystemType)).AssertNoViolations(helper); + should.Be(Types().That().OnlyDependOn(Classes().That().Are(helper.BaseClass))).AssertNoViolations(helper); + should.Be(Types().That().OnlyDependOn([helper.BaseClass])).AssertNoViolations(helper); + should.Be(Types().That().OnlyDependOn([helper.BaseClassSystemType])).AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should.BeTypesThat().OnlyDependOn(helper.BaseClass).AssertNoViolations(helper); + should.BeTypesThat().OnlyDependOn(helper.BaseClassSystemType).AssertNoViolations(helper); + should.BeTypesThat().OnlyDependOn(Classes().That().Are(helper.BaseClass)).AssertNoViolations(helper); + should.BeTypesThat().OnlyDependOn([helper.BaseClass]).AssertNoViolations(helper); + should.BeTypesThat().OnlyDependOn([helper.BaseClassSystemType]).AssertNoViolations(helper); + helper.AddSnapshotHeader("Violations"); should = Types().That().Are(helper.ClassWithMultipleDependencies).Should(); + + helper.AddSnapshotSubHeader("Conditions"); should.OnlyDependOn(helper.BaseClass).AssertOnlyViolations(helper); should.OnlyDependOn(helper.BaseClassSystemType).AssertOnlyViolations(helper); should.OnlyDependOn(Classes().That().Are(helper.BaseClass)).AssertOnlyViolations(helper); should.OnlyDependOn([helper.BaseClass]).AssertOnlyViolations(helper); should.OnlyDependOn([helper.BaseClassSystemType]).AssertOnlyViolations(helper); + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().OnlyDependOn(helper.BaseClass)).AssertOnlyViolations(helper); + should.Be(Types().That().OnlyDependOn(helper.BaseClassSystemType)).AssertOnlyViolations(helper); + should.Be(Types().That().OnlyDependOn(Classes().That().Are(helper.BaseClass))).AssertOnlyViolations(helper); + should.Be(Types().That().OnlyDependOn([helper.BaseClass])).AssertOnlyViolations(helper); + should.Be(Types().That().OnlyDependOn([helper.BaseClassSystemType])).AssertOnlyViolations(helper); + helper.AddSnapshotHeader("Type outside of architecture"); should = Types().That().Are(helper.ClassWithMultipleDependencies).Should(); + + helper.AddSnapshotSubHeader("Conditions"); should.OnlyDependOn(typeof(AttributeNamespace.ClassWithoutAttributes)).AssertException(helper); + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().OnlyDependOn(typeof(AttributeNamespace.ClassWithoutAttributes))).AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should.BeTypesThat().OnlyDependOn(typeof(AttributeNamespace.ClassWithoutAttributes)).AssertOnlyViolations(helper); + helper.AddSnapshotHeader("Empty arguments"); should = Types().That().Are(helper.ClassWithMultipleDependencies).Should(); + + helper.AddSnapshotSubHeader("Conditions"); should.OnlyDependOn(new List()).AssertOnlyViolations(helper); should.OnlyDependOn(new List()).AssertOnlyViolations(helper); should.OnlyDependOn(Classes().That().HaveFullName(helper.NonExistentObjectName)).AssertOnlyViolations(helper); + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().OnlyDependOn(new List())).AssertOnlyViolations(helper); + should.Be(Types().That().OnlyDependOn(new List())).AssertOnlyViolations(helper); + should.Be(Types().That().OnlyDependOn(Classes().That().HaveFullName(helper.NonExistentObjectName))).AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should.BeTypesThat().OnlyDependOn(new List()).AssertOnlyViolations(helper); + should.BeTypesThat().OnlyDependOn(new List()).AssertOnlyViolations(helper); + should.BeTypesThat().OnlyDependOn(Classes().That().HaveFullName(helper.NonExistentObjectName)).AssertOnlyViolations(helper); + helper.AddSnapshotHeader("Multiple arguments"); should = Types().That().Are(helper.ClassWithMultipleDependencies).Should(); + + helper.AddSnapshotSubHeader("Conditions"); should.OnlyDependOn(helper.BaseClass, helper.OtherBaseClass).AssertOnlyViolations(helper); should.OnlyDependOn([helper.BaseClass, helper.OtherBaseClass]).AssertOnlyViolations(helper); should.OnlyDependOn(helper.BaseClassSystemType, helper.OtherBaseClassSystemType).AssertOnlyViolations(helper); should.OnlyDependOn([helper.BaseClassSystemType, helper.OtherBaseClassSystemType]).AssertOnlyViolations(helper); should.OnlyDependOn(Classes().That().Are(helper.BaseClass, helper.OtherBaseClass)).AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().OnlyDependOn(helper.BaseClass, helper.OtherBaseClass)).AssertOnlyViolations(helper); + should.Be(Types().That().OnlyDependOn([helper.BaseClass, helper.OtherBaseClass])).AssertOnlyViolations(helper); + should.Be(Types().That().OnlyDependOn(helper.BaseClassSystemType, helper.OtherBaseClassSystemType)).AssertOnlyViolations(helper); + should.Be(Types().That().OnlyDependOn([helper.BaseClassSystemType, helper.OtherBaseClassSystemType])).AssertOnlyViolations(helper); + should.Be(Types().That().OnlyDependOn(Classes().That().Are(helper.BaseClass, helper.OtherBaseClass))).AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should.BeTypesThat().OnlyDependOn(helper.BaseClass, helper.OtherBaseClass).AssertOnlyViolations(helper); + should.BeTypesThat().OnlyDependOn([helper.BaseClass, helper.OtherBaseClass]).AssertOnlyViolations(helper); + should.BeTypesThat().OnlyDependOn(helper.BaseClassSystemType, helper.OtherBaseClassSystemType).AssertOnlyViolations(helper); + should.BeTypesThat().OnlyDependOn([helper.BaseClassSystemType, helper.OtherBaseClassSystemType]).AssertOnlyViolations(helper); + should.BeTypesThat().OnlyDependOn(Classes().That().Are(helper.BaseClass, helper.OtherBaseClass)).AssertOnlyViolations(helper); + await helper.AssertSnapshotMatches(); } @@ -1143,46 +2745,117 @@ public async Task OnlyDependOnTypesThatTest() public async Task OnlyHaveAttributesTest() { var helper = new AttributeAssemblyTestHelpers(); + helper.AddSnapshotHeader("No violations"); var should = Types().That().Are(helper.ClassWithSingleAttribute).Should(); + + helper.AddSnapshotSubHeader("Conditions"); should.OnlyHaveAttributes(helper.Attribute1).AssertNoViolations(helper); should.OnlyHaveAttributes([helper.Attribute1]).AssertNoViolations(helper); should.OnlyHaveAttributes(helper.Attribute1SystemType).AssertNoViolations(helper); should.OnlyHaveAttributes([helper.Attribute1SystemType]).AssertNoViolations(helper); should.OnlyHaveAttributes(Attributes().That().Are(helper.Attribute1)).AssertNoViolations(helper); + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().OnlyHaveAttributes(helper.Attribute1)).AssertNoViolations(helper); + should.Be(Types().That().OnlyHaveAttributes([helper.Attribute1])).AssertNoViolations(helper); + should.Be(Types().That().OnlyHaveAttributes(helper.Attribute1SystemType)).AssertNoViolations(helper); + should.Be(Types().That().OnlyHaveAttributes([helper.Attribute1SystemType])).AssertNoViolations(helper); + should.Be(Types().That().OnlyHaveAttributes(Attributes().That().Are(helper.Attribute1))).AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should.BeTypesThat().OnlyHaveAttributes(helper.Attribute1).AssertNoViolations(helper); + should.BeTypesThat().OnlyHaveAttributes([helper.Attribute1]).AssertNoViolations(helper); + should.BeTypesThat().OnlyHaveAttributes(helper.Attribute1SystemType).AssertNoViolations(helper); + should.BeTypesThat().OnlyHaveAttributes([helper.Attribute1SystemType]).AssertNoViolations(helper); + should.BeTypesThat().OnlyHaveAttributes(Attributes().That().Are(helper.Attribute1)).AssertNoViolations(helper); + helper.AddSnapshotHeader("Violations"); should = Types().That().Are(helper.ClassWithSingleAttribute).Should(); + + helper.AddSnapshotSubHeader("Conditions"); should.OnlyHaveAttributes(helper.UnusedAttribute).AssertOnlyViolations(helper); should.OnlyHaveAttributes([helper.UnusedAttribute]).AssertOnlyViolations(helper); should.OnlyHaveAttributes(helper.UnusedAttributeSystemType).AssertOnlyViolations(helper); should.OnlyHaveAttributes([helper.UnusedAttributeSystemType]).AssertOnlyViolations(helper); should.OnlyHaveAttributes(Attributes().That().Are(helper.UnusedAttribute)).AssertOnlyViolations(helper); + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().OnlyHaveAttributes(helper.UnusedAttribute)).AssertOnlyViolations(helper); + should.Be(Types().That().OnlyHaveAttributes([helper.UnusedAttribute])).AssertOnlyViolations(helper); + should.Be(Types().That().OnlyHaveAttributes(helper.UnusedAttributeSystemType)).AssertOnlyViolations(helper); + should.Be(Types().That().OnlyHaveAttributes([helper.UnusedAttributeSystemType])).AssertOnlyViolations(helper); + should.Be(Types().That().OnlyHaveAttributes(Attributes().That().Are(helper.UnusedAttribute))).AssertOnlyViolations(helper); + helper.AddSnapshotHeader("Attribute outside of architecture"); should = Types().That().Are(helper.ClassWithSingleAttribute).Should(); + + helper.AddSnapshotSubHeader("Conditions"); should.OnlyHaveAttributes(typeof(TypeDependencyNamespace.BaseClass)).AssertException(helper); + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().OnlyHaveAttributes(typeof(TypeDependencyNamespace.BaseClass))).AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should.BeTypesThat().OnlyHaveAttributes(typeof(TypeDependencyNamespace.BaseClass)).AssertOnlyViolations(helper); + helper.AddSnapshotHeader("Empty arguments"); should = Types().That().Are(helper.ClassWithSingleAttribute).Should(); + + helper.AddSnapshotSubHeader("Conditions"); should.OnlyHaveAttributes(new List()).AssertOnlyViolations(helper); should.OnlyHaveAttributes(new List()).AssertOnlyViolations(helper); should.OnlyHaveAttributes(Attributes().That().HaveFullName(helper.NonExistentObjectName)).AssertOnlyViolations(helper); - should = Types().That().Are(helper.ClassWithoutAttributes).Should(); - should.OnlyHaveAttributes(new List()).AssertNoViolations(helper); - should.OnlyHaveAttributes(new List()).AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().OnlyHaveAttributes(new List())).AssertOnlyViolations(helper); + should.Be(Types().That().OnlyHaveAttributes(new List())).AssertOnlyViolations(helper); + should.Be(Types().That().OnlyHaveAttributes(Attributes().That().HaveFullName(helper.NonExistentObjectName))).AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should.BeTypesThat().OnlyHaveAttributes(new List()).AssertOnlyViolations(helper); + should.BeTypesThat().OnlyHaveAttributes(new List()).AssertOnlyViolations(helper); + should.BeTypesThat().OnlyHaveAttributes(Attributes().That().HaveFullName(helper.NonExistentObjectName)).AssertOnlyViolations(helper); helper.AddSnapshotHeader("Multiple arguments"); should = Types().That().Are(helper.ClassWithTwoAttributes).Should(); + + helper.AddSnapshotSubHeader("Conditions"); should.OnlyHaveAttributes(helper.Attribute1, helper.Attribute2).AssertNoViolations(helper); should.OnlyHaveAttributes([helper.Attribute1, helper.Attribute2]).AssertNoViolations(helper); should.OnlyHaveAttributes(helper.Attribute1SystemType, helper.Attribute2SystemType).AssertNoViolations(helper); should.OnlyHaveAttributes([helper.Attribute1SystemType, helper.Attribute2SystemType]).AssertNoViolations(helper); should.OnlyHaveAttributes(Attributes().That().Are(helper.Attribute1, helper.Attribute2)).AssertNoViolations(helper); + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().OnlyHaveAttributes(helper.Attribute1, helper.Attribute2)).AssertNoViolations(helper); + should.Be(Types().That().OnlyHaveAttributes([helper.Attribute1, helper.Attribute2])).AssertNoViolations(helper); + should.Be(Types().That().OnlyHaveAttributes(helper.Attribute1SystemType, helper.Attribute2SystemType)).AssertNoViolations(helper); + should.Be(Types().That().OnlyHaveAttributes([helper.Attribute1SystemType, helper.Attribute2SystemType])).AssertNoViolations(helper); + should.Be(Types().That().OnlyHaveAttributes(Attributes().That().Are(helper.Attribute1, helper.Attribute2))).AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should.BeTypesThat().OnlyHaveAttributes(helper.Attribute1, helper.Attribute2).AssertNoViolations(helper); + should.BeTypesThat().OnlyHaveAttributes([helper.Attribute1, helper.Attribute2]).AssertNoViolations(helper); + should.BeTypesThat().OnlyHaveAttributes(helper.Attribute1SystemType, helper.Attribute2SystemType).AssertNoViolations(helper); + should.BeTypesThat().OnlyHaveAttributes([helper.Attribute1SystemType, helper.Attribute2SystemType]).AssertNoViolations(helper); + should.BeTypesThat().OnlyHaveAttributes(Attributes().That().Are(helper.Attribute1, helper.Attribute2)).AssertNoViolations(helper); + helper.AddSnapshotHeader("Multiple inputs"); - Types().That().Are(helper.ClassWithSingleAttribute, helper.ClassWithTwoAttributes).Should().OnlyHaveAttributes(helper.Attribute1).AssertAnyViolations(helper); - Types().That().Are(helper.ClassWithSingleAttribute, helper.ClassWithTwoAttributes).Should().OnlyHaveAttributes(helper.Attribute2).AssertOnlyViolations(helper); + should = Types().That().Are(helper.ClassWithSingleAttribute, helper.ClassWithTwoAttributes).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should.OnlyHaveAttributes(helper.Attribute1).AssertAnyViolations(helper); + should.OnlyHaveAttributes(helper.Attribute2).AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().OnlyHaveAttributes(helper.Attribute1)).AssertAnyViolations(helper); + should.Be(Types().That().OnlyHaveAttributes(helper.Attribute2)).AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should.BeTypesThat().OnlyHaveAttributes(helper.Attribute1).AssertAnyViolations(helper); + should.BeTypesThat().OnlyHaveAttributes(helper.Attribute2).AssertOnlyViolations(helper); + await helper.AssertSnapshotMatches(); } @@ -1206,17 +2879,29 @@ public void VisibilityTest() var visibilityRules = new List { Types().That().ArePrivate().Should().BePrivate(), + Types().That().ArePrivate().Should().BeTypesThat().ArePrivate(), Types().That().ArePublic().Should().BePublic(), - Types().That().AreProtected().Should().BeProtected(), + Types().That().ArePublic().Should().BeTypesThat().ArePublic(), + Types().That().AreProtected().Should().BeProtected(), + Types().That().AreProtected().Should().BeTypesThat().AreProtected(), Types().That().AreInternal().Should().BeInternal(), + Types().That().AreInternal().Should().BeTypesThat().AreInternal(), Types().That().AreProtectedInternal().Should().BeProtectedInternal(), + Types().That().AreProtectedInternal().Should().BeTypesThat().AreProtectedInternal(), Types().That().ArePrivateProtected().Should().BePrivateProtected(), + Types().That().ArePrivateProtected().Should().BeTypesThat().ArePrivateProtected(), Types().That().AreNotPrivate().Should().NotBePrivate(), + Types().That().AreNotPrivate().Should().BeTypesThat().AreNotPrivate(), Types().That().AreNotPublic().Should().NotBePublic(), + Types().That().AreNotPublic().Should().BeTypesThat().AreNotPublic(), Types().That().AreNotProtected().Should().NotBeProtected(), + Types().That().AreNotProtected().Should().BeTypesThat().AreNotProtected(), Types().That().AreNotInternal().Should().NotBeInternal(), + Types().That().AreNotInternal().Should().BeTypesThat().AreNotInternal(), Types().That().AreNotProtectedInternal().Should().NotBeProtectedInternal(), + Types().That().AreNotProtectedInternal().Should().BeTypesThat().AreNotProtectedInternal(), Types().That().AreNotPrivateProtected().Should().NotBePrivateProtected(), + Types().That().AreNotPrivateProtected().Should().BeTypesThat().AreNotPrivateProtected(), Types().That().ArePrivate().Should().NotBePublic().AndShould().NotBeProtected().AndShould().NotBeInternal().AndShould().NotBeProtectedInternal().AndShould().NotBePrivateProtected(), Types().That().ArePublic().Should().NotBePrivate().AndShould().NotBeProtected().AndShould().NotBeInternal().AndShould().NotBeProtectedInternal().AndShould().NotBePrivateProtected(), Types().That().AreProtected().Should().NotBePublic().AndShould().NotBePrivate().AndShould().NotBeInternal().AndShould().NotBeProtectedInternal().AndShould().NotBePrivateProtected(), diff --git a/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.AreTest.verified.txt b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.AreTest.verified.txt new file mode 100644 index 000000000..3d167873c --- /dev/null +++ b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.AreTest.verified.txt @@ -0,0 +1,39 @@ +Query: Types that do not exist should be types that are "TypeDependencyNamespace.ChildClass" +Result: False +Description: The rule requires positive evaluation, not just absence of violations. Use WithoutRequiringPositiveResults() or improve your rule's predicates. +Message: +"Types that do not exist should be types that are "TypeDependencyNamespace.ChildClass"" failed: + The rule requires positive evaluation, not just absence of violations. Use WithoutRequiringPositiveResults() or improve your rule's predicates. + + + +Query: Types that are "TypeDependencyNamespace.ChildClass" should be types that are "TypeDependencyNamespace.ChildClass" +Result: True +Description: TypeDependencyNamespace.ChildClass passed +Message: +All Evaluations passed + +Query: Types that are "TypeDependencyNamespace.ChildClass" should be types that are "TypeDependencyNamespace.ChildClass" +Result: True +Description: TypeDependencyNamespace.ChildClass passed +Message: +All Evaluations passed + +Query: Types that are "TypeDependencyNamespace.ChildClass" should be types that are Classes that are "TypeDependencyNamespace.ChildClass" +Result: True +Description: TypeDependencyNamespace.ChildClass passed +Message: +All Evaluations passed + +Query: Types that are "TypeDependencyNamespace.ChildClass" should be types that are "TypeDependencyNamespace.ChildClass" +Result: True +Description: TypeDependencyNamespace.ChildClass passed +Message: +All Evaluations passed + +Query: Types that are "TypeDependencyNamespace.ChildClass" should be types that are "TypeDependencyNamespace.ChildClass" +Result: True +Description: TypeDependencyNamespace.ChildClass passed +Message: +All Evaluations passed + diff --git a/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.BeTypesThatTest.verified.txt b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.BeTypesThatTest.verified.txt new file mode 100644 index 000000000..88e3c1b24 --- /dev/null +++ b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.BeTypesThatTest.verified.txt @@ -0,0 +1,19 @@ +===== No violations ===== + +Query: Types that are "TypeDependencyNamespace.ChildClass" should be types that are "TypeDependencyNamespace.ChildClass" +Result: True +Description: TypeDependencyNamespace.ChildClass passed +Message: +All Evaluations passed + +===== Violations ===== + +Query: Types that are "TypeDependencyNamespace.BaseClass" should be types that are "TypeDependencyNamespace.ChildClass" +Result: False +Description: TypeDependencyNamespace.BaseClass is not "TypeDependencyNamespace.ChildClass" +Message: +"Types that are "TypeDependencyNamespace.BaseClass" should be types that are "TypeDependencyNamespace.ChildClass"" failed: + TypeDependencyNamespace.BaseClass is not "TypeDependencyNamespace.ChildClass" + + + diff --git a/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.CallAnyTest.verified.txt b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.CallAnyTest.verified.txt index 14ef170bd..97fe9bf7b 100644 --- a/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.CallAnyTest.verified.txt +++ b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.CallAnyTest.verified.txt @@ -1,5 +1,7 @@ ===== No violations ===== +----- Conditions ----- + Query: Method members that are "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithSingleDependency()" should call any "System.Void MethodDependencyNamespace.MethodDependencyClass::CalledMethod()" Result: True Description: System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithSingleDependency() passed @@ -18,37 +20,139 @@ Description: System.Void MethodDependencyNamespace.MethodDependencyClass::Method Message: All Evaluations passed +----- Predicates ----- + +Query: Method members that are "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithSingleDependency()" should be Method members that call "System.Void MethodDependencyNamespace.MethodDependencyClass::CalledMethod()" +Result: True +Description: System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithSingleDependency() passed +Message: +All Evaluations passed + +Query: Method members that are "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithSingleDependency()" should be Method members that call "System.Void MethodDependencyNamespace.MethodDependencyClass::CalledMethod()" +Result: True +Description: System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithSingleDependency() passed +Message: +All Evaluations passed + +Query: Method members that are "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithSingleDependency()" should be Method members that call any Method members that are "System.Void MethodDependencyNamespace.MethodDependencyClass::CalledMethod()" +Result: True +Description: System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithSingleDependency() passed +Message: +All Evaluations passed + +----- Predicates as conditions ----- + +Query: Method members that are "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithSingleDependency()" should be method members that call "System.Void MethodDependencyNamespace.MethodDependencyClass::CalledMethod()" +Result: True +Description: System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithSingleDependency() passed +Message: +All Evaluations passed + +Query: Method members that are "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithSingleDependency()" should be method members that call "System.Void MethodDependencyNamespace.MethodDependencyClass::CalledMethod()" +Result: True +Description: System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithSingleDependency() passed +Message: +All Evaluations passed + +Query: Method members that are "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithSingleDependency()" should be method members that call any Method members that are "System.Void MethodDependencyNamespace.MethodDependencyClass::CalledMethod()" +Result: True +Description: System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithSingleDependency() passed +Message: +All Evaluations passed + ===== Violations ===== -Query: Method members that are "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithSingleDependency()" should call any "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithoutDependencies()" +----- Conditions ----- + +Query: Method members that are "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithoutDependencies()" should call any "System.Void MethodDependencyNamespace.MethodDependencyClass::CalledMethod()" Result: False -Description: System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithSingleDependency() does call System.Void MethodDependencyNamespace.MethodDependencyClass::CalledMethod() +Description: System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithoutDependencies() does call Message: -"Method members that are "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithSingleDependency()" should call any "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithoutDependencies()"" failed: - System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithSingleDependency() does call System.Void MethodDependencyNamespace.MethodDependencyClass::CalledMethod() +"Method members that are "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithoutDependencies()" should call any "System.Void MethodDependencyNamespace.MethodDependencyClass::CalledMethod()"" failed: + System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithoutDependencies() does call -Query: Method members that are "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithSingleDependency()" should call any "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithoutDependencies()" +Query: Method members that are "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithoutDependencies()" should call any "System.Void MethodDependencyNamespace.MethodDependencyClass::CalledMethod()" Result: False -Description: System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithSingleDependency() does call System.Void MethodDependencyNamespace.MethodDependencyClass::CalledMethod() +Description: System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithoutDependencies() does call Message: -"Method members that are "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithSingleDependency()" should call any "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithoutDependencies()"" failed: - System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithSingleDependency() does call System.Void MethodDependencyNamespace.MethodDependencyClass::CalledMethod() +"Method members that are "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithoutDependencies()" should call any "System.Void MethodDependencyNamespace.MethodDependencyClass::CalledMethod()"" failed: + System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithoutDependencies() does call -Query: Method members that are "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithSingleDependency()" should call any Method members that are "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithoutDependencies()" +Query: Method members that are "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithoutDependencies()" should call any Method members that are "System.Void MethodDependencyNamespace.MethodDependencyClass::CalledMethod()" Result: False -Description: System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithSingleDependency() does call System.Void MethodDependencyNamespace.MethodDependencyClass::CalledMethod() +Description: System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithoutDependencies() does call Message: -"Method members that are "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithSingleDependency()" should call any Method members that are "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithoutDependencies()"" failed: - System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithSingleDependency() does call System.Void MethodDependencyNamespace.MethodDependencyClass::CalledMethod() +"Method members that are "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithoutDependencies()" should call any Method members that are "System.Void MethodDependencyNamespace.MethodDependencyClass::CalledMethod()"" failed: + System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithoutDependencies() does call + + + +----- Predicates ----- + +Query: Method members that are "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithoutDependencies()" should be Method members that call "System.Void MethodDependencyNamespace.MethodDependencyClass::CalledMethod()" +Result: False +Description: System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithoutDependencies() is not Method members that call "System.Void MethodDependencyNamespace.MethodDependencyClass::CalledMethod()" +Message: +"Method members that are "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithoutDependencies()" should be Method members that call "System.Void MethodDependencyNamespace.MethodDependencyClass::CalledMethod()"" failed: + System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithoutDependencies() is not Method members that call "System.Void MethodDependencyNamespace.MethodDependencyClass::CalledMethod()" + + + +Query: Method members that are "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithoutDependencies()" should be Method members that call "System.Void MethodDependencyNamespace.MethodDependencyClass::CalledMethod()" +Result: False +Description: System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithoutDependencies() is not Method members that call "System.Void MethodDependencyNamespace.MethodDependencyClass::CalledMethod()" +Message: +"Method members that are "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithoutDependencies()" should be Method members that call "System.Void MethodDependencyNamespace.MethodDependencyClass::CalledMethod()"" failed: + System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithoutDependencies() is not Method members that call "System.Void MethodDependencyNamespace.MethodDependencyClass::CalledMethod()" + + + +Query: Method members that are "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithoutDependencies()" should be Method members that call any Method members that are "System.Void MethodDependencyNamespace.MethodDependencyClass::CalledMethod()" +Result: False +Description: System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithoutDependencies() is not Method members that call any Method members that are "System.Void MethodDependencyNamespace.MethodDependencyClass::CalledMethod()" +Message: +"Method members that are "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithoutDependencies()" should be Method members that call any Method members that are "System.Void MethodDependencyNamespace.MethodDependencyClass::CalledMethod()"" failed: + System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithoutDependencies() is not Method members that call any Method members that are "System.Void MethodDependencyNamespace.MethodDependencyClass::CalledMethod()" + + + +----- Predicates as conditions ----- + +Query: Method members that are "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithoutDependencies()" should be method members that call "System.Void MethodDependencyNamespace.MethodDependencyClass::CalledMethod()" +Result: False +Description: System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithoutDependencies() is not "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithSingleDependency()" +Message: +"Method members that are "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithoutDependencies()" should be method members that call "System.Void MethodDependencyNamespace.MethodDependencyClass::CalledMethod()"" failed: + System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithoutDependencies() is not "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithSingleDependency()" + + + +Query: Method members that are "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithoutDependencies()" should be method members that call "System.Void MethodDependencyNamespace.MethodDependencyClass::CalledMethod()" +Result: False +Description: System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithoutDependencies() is not "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithSingleDependency()" +Message: +"Method members that are "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithoutDependencies()" should be method members that call "System.Void MethodDependencyNamespace.MethodDependencyClass::CalledMethod()"" failed: + System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithoutDependencies() is not "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithSingleDependency()" + + + +Query: Method members that are "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithoutDependencies()" should be method members that call any Method members that are "System.Void MethodDependencyNamespace.MethodDependencyClass::CalledMethod()" +Result: False +Description: System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithoutDependencies() is not "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithSingleDependency()" +Message: +"Method members that are "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithoutDependencies()" should be method members that call any Method members that are "System.Void MethodDependencyNamespace.MethodDependencyClass::CalledMethod()"" failed: + System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithoutDependencies() is not "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithSingleDependency()" ===== Empty arguments ===== +----- Conditions ----- + Query: Method members that are "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithSingleDependency()" should call any of no methods (impossible) Result: False Description: System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithSingleDependency() does call System.Void MethodDependencyNamespace.MethodDependencyClass::CalledMethod() @@ -67,8 +171,50 @@ Message: +----- Predicates ----- + +Query: Method members that are "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithSingleDependency()" should be Method members that call one of no methods (impossible) +Result: False +Description: System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithSingleDependency() is not Method members that call one of no methods (impossible) +Message: +"Method members that are "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithSingleDependency()" should be Method members that call one of no methods (impossible)" failed: + System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithSingleDependency() is not Method members that call one of no methods (impossible) + + + +Query: Method members that are "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithSingleDependency()" should be Method members that call any Method members that have full name "NotTheNameOfAnyObject" +Result: False +Description: System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithSingleDependency() is not Method members that call any Method members that have full name "NotTheNameOfAnyObject" +Message: +"Method members that are "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithSingleDependency()" should be Method members that call any Method members that have full name "NotTheNameOfAnyObject"" failed: + System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithSingleDependency() is not Method members that call any Method members that have full name "NotTheNameOfAnyObject" + + + +----- Predicates as conditions ----- + +Query: Method members that are "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithSingleDependency()" should be method members that call one of no methods (impossible) +Result: False +Description: System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithSingleDependency() does exist +Message: +"Method members that are "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithSingleDependency()" should be method members that call one of no methods (impossible)" failed: + System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithSingleDependency() does exist + + + +Query: Method members that are "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithSingleDependency()" should be method members that call any Method members that have full name "NotTheNameOfAnyObject" +Result: False +Description: System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithSingleDependency() does exist +Message: +"Method members that are "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithSingleDependency()" should be method members that call any Method members that have full name "NotTheNameOfAnyObject"" failed: + System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithSingleDependency() does exist + + + ===== Multiple arguments ===== +----- Conditions ----- + Query: Method members that are "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithMultipleDependencies()" should call any "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithoutDependencies()" or "System.Void MethodDependencyNamespace.Metho... Result: False Description: System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithMultipleDependencies() does call System.Void MethodDependencyNamespace.MethodDependencyClass::CalledMethod1() and System.Void MethodDependencyNamespace.MethodDependencyClass::CalledMethod2() and System.Void MethodDependencyNamespace.MethodDependencyClass::CalledMethod3() @@ -96,8 +242,68 @@ Message: +----- Predicates ----- + +Query: Method members that are "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithMultipleDependencies()" should be Method members that call "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithoutDependencies()" or "System.Void MethodDepend... +Result: False +Description: System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithMultipleDependencies() is not Method members that call "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithoutDependencies()" or "System.Void MethodDependencyNamespace.MethodDep... +Message: +"Method members that are "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithMultipleDependencies()" should be Method members that call "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithoutDependencies()" or "System.Void MethodDepend..." failed: + System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithMultipleDependencies() is not Method members that call "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithoutDependencies()" or "System.Void MethodDependencyNamespace.MethodDep... + + + +Query: Method members that are "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithMultipleDependencies()" should be Method members that call "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithoutDependencies()" or "System.Void MethodDepend... +Result: False +Description: System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithMultipleDependencies() is not Method members that call "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithoutDependencies()" or "System.Void MethodDependencyNamespace.MethodDep... +Message: +"Method members that are "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithMultipleDependencies()" should be Method members that call "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithoutDependencies()" or "System.Void MethodDepend..." failed: + System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithMultipleDependencies() is not Method members that call "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithoutDependencies()" or "System.Void MethodDependencyNamespace.MethodDep... + + + +Query: Method members that are "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithMultipleDependencies()" should be Method members that call any Method members that are "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithoutDependencies()" ... +Result: False +Description: System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithMultipleDependencies() is not Method members that call any Method members that are "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithoutDependencies()" or "System.Void MethodD... +Message: +"Method members that are "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithMultipleDependencies()" should be Method members that call any Method members that are "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithoutDependencies()" ..." failed: + System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithMultipleDependencies() is not Method members that call any Method members that are "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithoutDependencies()" or "System.Void MethodD... + + + +----- Predicates as conditions ----- + +Query: Method members that are "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithMultipleDependencies()" should be method members that call "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithoutDependencies()" or "System.Void MethodDepend... +Result: False +Description: System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithMultipleDependencies() does exist +Message: +"Method members that are "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithMultipleDependencies()" should be method members that call "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithoutDependencies()" or "System.Void MethodDepend..." failed: + System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithMultipleDependencies() does exist + + + +Query: Method members that are "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithMultipleDependencies()" should be method members that call "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithoutDependencies()" or "System.Void MethodDepend... +Result: False +Description: System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithMultipleDependencies() does exist +Message: +"Method members that are "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithMultipleDependencies()" should be method members that call "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithoutDependencies()" or "System.Void MethodDepend..." failed: + System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithMultipleDependencies() does exist + + + +Query: Method members that are "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithMultipleDependencies()" should be method members that call any Method members that are "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithoutDependencies()" ... +Result: False +Description: System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithMultipleDependencies() does exist +Message: +"Method members that are "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithMultipleDependencies()" should be method members that call any Method members that are "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithoutDependencies()" ..." failed: + System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithMultipleDependencies() does exist + + + ===== Input with multiple dependencies ===== +----- Conditions ----- + Query: Method members that are "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithMultipleDependencies()" should call any "System.Void MethodDependencyNamespace.MethodDependencyClass::CalledMethod1()" or "System.Void MethodDependencyNamespace.MethodDependencyC... Result: True Description: System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithMultipleDependencies() passed @@ -113,3 +319,37 @@ Message: +----- Predicates ----- + +Query: Method members that are "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithMultipleDependencies()" should be Method members that call "System.Void MethodDependencyNamespace.MethodDependencyClass::CalledMethod1()" or "System.Void MethodDependencyNamespac... +Result: True +Description: System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithMultipleDependencies() passed +Message: +All Evaluations passed + +Query: Method members that are "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithMultipleDependencies()" should be Method members that call "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithoutDependencies()" +Result: False +Description: System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithMultipleDependencies() is not Method members that call "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithoutDependencies()" +Message: +"Method members that are "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithMultipleDependencies()" should be Method members that call "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithoutDependencies()"" failed: + System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithMultipleDependencies() is not Method members that call "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithoutDependencies()" + + + +----- Predicates as conditions ----- + +Query: Method members that are "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithMultipleDependencies()" should be method members that call "System.Void MethodDependencyNamespace.MethodDependencyClass::CalledMethod1()" or "System.Void MethodDependencyNamespac... +Result: True +Description: System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithMultipleDependencies() passed +Message: +All Evaluations passed + +Query: Method members that are "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithMultipleDependencies()" should be method members that call "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithoutDependencies()" +Result: False +Description: System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithMultipleDependencies() does exist +Message: +"Method members that are "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithMultipleDependencies()" should be method members that call "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithoutDependencies()"" failed: + System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithMultipleDependencies() does exist + + + diff --git a/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.DependOnAnyTest.verified.txt b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.DependOnAnyTest.verified.txt index e72a0638f..84a0cd910 100644 --- a/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.DependOnAnyTest.verified.txt +++ b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.DependOnAnyTest.verified.txt @@ -1,5 +1,7 @@ ===== No violations ===== +----- Conditions ----- + Query: Types that are "TypeDependencyNamespace.ChildClass" should depend on any "TypeDependencyNamespace.BaseClass" Result: True Description: TypeDependencyNamespace.ChildClass passed @@ -30,8 +32,74 @@ Description: TypeDependencyNamespace.ChildClass passed Message: All Evaluations passed +----- Predicates ----- + +Query: Types that are "TypeDependencyNamespace.ChildClass" should be Types that depend on "TypeDependencyNamespace.BaseClass" +Result: True +Description: TypeDependencyNamespace.ChildClass passed +Message: +All Evaluations passed + +Query: Types that are "TypeDependencyNamespace.ChildClass" should be Types that depend on "TypeDependencyNamespace.BaseClass" +Result: True +Description: TypeDependencyNamespace.ChildClass passed +Message: +All Evaluations passed + +Query: Types that are "TypeDependencyNamespace.ChildClass" should be Types that depend on any Classes that are "TypeDependencyNamespace.BaseClass" +Result: True +Description: TypeDependencyNamespace.ChildClass passed +Message: +All Evaluations passed + +Query: Types that are "TypeDependencyNamespace.ChildClass" should be Types that depend on "TypeDependencyNamespace.BaseClass" +Result: True +Description: TypeDependencyNamespace.ChildClass passed +Message: +All Evaluations passed + +Query: Types that are "TypeDependencyNamespace.ChildClass" should be Types that depend on "TypeDependencyNamespace.BaseClass" +Result: True +Description: TypeDependencyNamespace.ChildClass passed +Message: +All Evaluations passed + +----- Predicates as conditions ----- + +Query: Types that are "TypeDependencyNamespace.ChildClass" should be types that depend on "TypeDependencyNamespace.BaseClass" +Result: True +Description: TypeDependencyNamespace.ChildClass passed +Message: +All Evaluations passed + +Query: Types that are "TypeDependencyNamespace.ChildClass" should be types that depend on "TypeDependencyNamespace.BaseClass" +Result: True +Description: TypeDependencyNamespace.ChildClass passed +Message: +All Evaluations passed + +Query: Types that are "TypeDependencyNamespace.ChildClass" should be types that depend on any Classes that are "TypeDependencyNamespace.BaseClass" +Result: True +Description: TypeDependencyNamespace.ChildClass passed +Message: +All Evaluations passed + +Query: Types that are "TypeDependencyNamespace.ChildClass" should be types that depend on "TypeDependencyNamespace.BaseClass" +Result: True +Description: TypeDependencyNamespace.ChildClass passed +Message: +All Evaluations passed + +Query: Types that are "TypeDependencyNamespace.ChildClass" should be types that depend on "TypeDependencyNamespace.BaseClass" +Result: True +Description: TypeDependencyNamespace.ChildClass passed +Message: +All Evaluations passed + ===== Violations ===== +----- Conditions ----- + Query: Types that have full name "TypeDependencyNamespace.ClassWithMultipleDependencies" should depend on any "TypeDependencyNamespace.ClassWithoutDependencies" Result: False Description: TypeDependencyNamespace.ClassWithMultipleDependencies does depend on System.Object and TypeDependencyNamespace.BaseClassWithMember and TypeDependencyNamespace.OtherBaseClass @@ -77,13 +145,133 @@ Message: +----- Predicates ----- + +Query: Types that have full name "TypeDependencyNamespace.ClassWithMultipleDependencies" should be Types that depend on "TypeDependencyNamespace.ClassWithoutDependencies" +Result: False +Description: TypeDependencyNamespace.ClassWithMultipleDependencies is not Types that depend on "TypeDependencyNamespace.ClassWithoutDependencies" +Message: +"Types that have full name "TypeDependencyNamespace.ClassWithMultipleDependencies" should be Types that depend on "TypeDependencyNamespace.ClassWithoutDependencies"" failed: + TypeDependencyNamespace.ClassWithMultipleDependencies is not Types that depend on "TypeDependencyNamespace.ClassWithoutDependencies" + + + +Query: Types that have full name "TypeDependencyNamespace.ClassWithMultipleDependencies" should be Types that depend on "TypeDependencyNamespace.ClassWithoutDependencies" +Result: False +Description: TypeDependencyNamespace.ClassWithMultipleDependencies is not Types that depend on "TypeDependencyNamespace.ClassWithoutDependencies" +Message: +"Types that have full name "TypeDependencyNamespace.ClassWithMultipleDependencies" should be Types that depend on "TypeDependencyNamespace.ClassWithoutDependencies"" failed: + TypeDependencyNamespace.ClassWithMultipleDependencies is not Types that depend on "TypeDependencyNamespace.ClassWithoutDependencies" + + + +Query: Types that have full name "TypeDependencyNamespace.ClassWithMultipleDependencies" should be Types that depend on any Classes that are "TypeDependencyNamespace.ClassWithoutDependencies" +Result: False +Description: TypeDependencyNamespace.ClassWithMultipleDependencies is not Types that depend on any Classes that are "TypeDependencyNamespace.ClassWithoutDependencies" +Message: +"Types that have full name "TypeDependencyNamespace.ClassWithMultipleDependencies" should be Types that depend on any Classes that are "TypeDependencyNamespace.ClassWithoutDependencies"" failed: + TypeDependencyNamespace.ClassWithMultipleDependencies is not Types that depend on any Classes that are "TypeDependencyNamespace.ClassWithoutDependencies" + + + +Query: Types that have full name "TypeDependencyNamespace.ClassWithMultipleDependencies" should be Types that depend on "TypeDependencyNamespace.ClassWithoutDependencies" +Result: False +Description: TypeDependencyNamespace.ClassWithMultipleDependencies is not Types that depend on "TypeDependencyNamespace.ClassWithoutDependencies" +Message: +"Types that have full name "TypeDependencyNamespace.ClassWithMultipleDependencies" should be Types that depend on "TypeDependencyNamespace.ClassWithoutDependencies"" failed: + TypeDependencyNamespace.ClassWithMultipleDependencies is not Types that depend on "TypeDependencyNamespace.ClassWithoutDependencies" + + + +Query: Types that have full name "TypeDependencyNamespace.ClassWithMultipleDependencies" should be Types that depend on "TypeDependencyNamespace.ClassWithoutDependencies" +Result: False +Description: TypeDependencyNamespace.ClassWithMultipleDependencies is not Types that depend on "TypeDependencyNamespace.ClassWithoutDependencies" +Message: +"Types that have full name "TypeDependencyNamespace.ClassWithMultipleDependencies" should be Types that depend on "TypeDependencyNamespace.ClassWithoutDependencies"" failed: + TypeDependencyNamespace.ClassWithMultipleDependencies is not Types that depend on "TypeDependencyNamespace.ClassWithoutDependencies" + + + +----- Predicates as conditions ----- + +Query: Types that have full name "TypeDependencyNamespace.ClassWithMultipleDependencies" should be types that depend on "TypeDependencyNamespace.ClassWithoutDependencies" +Result: False +Description: TypeDependencyNamespace.ClassWithMultipleDependencies does exist +Message: +"Types that have full name "TypeDependencyNamespace.ClassWithMultipleDependencies" should be types that depend on "TypeDependencyNamespace.ClassWithoutDependencies"" failed: + TypeDependencyNamespace.ClassWithMultipleDependencies does exist + + + +Query: Types that have full name "TypeDependencyNamespace.ClassWithMultipleDependencies" should be types that depend on "TypeDependencyNamespace.ClassWithoutDependencies" +Result: False +Description: TypeDependencyNamespace.ClassWithMultipleDependencies does exist +Message: +"Types that have full name "TypeDependencyNamespace.ClassWithMultipleDependencies" should be types that depend on "TypeDependencyNamespace.ClassWithoutDependencies"" failed: + TypeDependencyNamespace.ClassWithMultipleDependencies does exist + + + +Query: Types that have full name "TypeDependencyNamespace.ClassWithMultipleDependencies" should be types that depend on any Classes that are "TypeDependencyNamespace.ClassWithoutDependencies" +Result: False +Description: TypeDependencyNamespace.ClassWithMultipleDependencies does exist +Message: +"Types that have full name "TypeDependencyNamespace.ClassWithMultipleDependencies" should be types that depend on any Classes that are "TypeDependencyNamespace.ClassWithoutDependencies"" failed: + TypeDependencyNamespace.ClassWithMultipleDependencies does exist + + + +Query: Types that have full name "TypeDependencyNamespace.ClassWithMultipleDependencies" should be types that depend on "TypeDependencyNamespace.ClassWithoutDependencies" +Result: False +Description: TypeDependencyNamespace.ClassWithMultipleDependencies does exist +Message: +"Types that have full name "TypeDependencyNamespace.ClassWithMultipleDependencies" should be types that depend on "TypeDependencyNamespace.ClassWithoutDependencies"" failed: + TypeDependencyNamespace.ClassWithMultipleDependencies does exist + + + +Query: Types that have full name "TypeDependencyNamespace.ClassWithMultipleDependencies" should be types that depend on "TypeDependencyNamespace.ClassWithoutDependencies" +Result: False +Description: TypeDependencyNamespace.ClassWithMultipleDependencies does exist +Message: +"Types that have full name "TypeDependencyNamespace.ClassWithMultipleDependencies" should be types that depend on "TypeDependencyNamespace.ClassWithoutDependencies"" failed: + TypeDependencyNamespace.ClassWithMultipleDependencies does exist + + + ===== Type outside of architecture ===== +----- Conditions ----- + Query: Types that are "TypeDependencyNamespace.ClassWithMultipleDependencies" should depend on any "AttributeNamespace.ClassWithoutAttributes" Exception: Type AttributeNamespace.ClassWithoutAttributes does not exist in provided architecture or is no class. +----- Predicates ----- + +Query: Types that are "TypeDependencyNamespace.ClassWithMultipleDependencies" should be Types that depend on "AttributeNamespace.ClassWithoutAttributes" +Result: False +Description: TypeDependencyNamespace.ClassWithMultipleDependencies is not Types that depend on "AttributeNamespace.ClassWithoutAttributes" +Message: +"Types that are "TypeDependencyNamespace.ClassWithMultipleDependencies" should be Types that depend on "AttributeNamespace.ClassWithoutAttributes"" failed: + TypeDependencyNamespace.ClassWithMultipleDependencies is not Types that depend on "AttributeNamespace.ClassWithoutAttributes" + + + +----- Predicates as conditions ----- + +Query: Types that are "TypeDependencyNamespace.ClassWithMultipleDependencies" should be types that depend on "AttributeNamespace.ClassWithoutAttributes" +Result: False +Description: TypeDependencyNamespace.ClassWithMultipleDependencies does exist +Message: +"Types that are "TypeDependencyNamespace.ClassWithMultipleDependencies" should be types that depend on "AttributeNamespace.ClassWithoutAttributes"" failed: + TypeDependencyNamespace.ClassWithMultipleDependencies does exist + + + ===== Empty arguments ===== +----- Conditions ----- + Query: Types that are "TypeDependencyNamespace.ClassWithMultipleDependencies" should depend on any of no types (impossible) Result: False Description: TypeDependencyNamespace.ClassWithMultipleDependencies does depend on System.Object and TypeDependencyNamespace.BaseClassWithMember and TypeDependencyNamespace.OtherBaseClass @@ -111,8 +299,68 @@ Message: +----- Predicates ----- + +Query: Types that are "TypeDependencyNamespace.ClassWithMultipleDependencies" should be Types that have no dependencies +Result: False +Description: TypeDependencyNamespace.ClassWithMultipleDependencies is not Types that have no dependencies +Message: +"Types that are "TypeDependencyNamespace.ClassWithMultipleDependencies" should be Types that have no dependencies" failed: + TypeDependencyNamespace.ClassWithMultipleDependencies is not Types that have no dependencies + + + +Query: Types that are "TypeDependencyNamespace.ClassWithMultipleDependencies" should be Types that have no dependencies +Result: False +Description: TypeDependencyNamespace.ClassWithMultipleDependencies is not Types that have no dependencies +Message: +"Types that are "TypeDependencyNamespace.ClassWithMultipleDependencies" should be Types that have no dependencies" failed: + TypeDependencyNamespace.ClassWithMultipleDependencies is not Types that have no dependencies + + + +Query: Types that are "TypeDependencyNamespace.ClassWithMultipleDependencies" should be Types that depend on any Classes that have full name "NotTheNameOfAnyObject" +Result: False +Description: TypeDependencyNamespace.ClassWithMultipleDependencies is not Types that depend on any Classes that have full name "NotTheNameOfAnyObject" +Message: +"Types that are "TypeDependencyNamespace.ClassWithMultipleDependencies" should be Types that depend on any Classes that have full name "NotTheNameOfAnyObject"" failed: + TypeDependencyNamespace.ClassWithMultipleDependencies is not Types that depend on any Classes that have full name "NotTheNameOfAnyObject" + + + +----- Predicates as conditions ----- + +Query: Types that are "TypeDependencyNamespace.ClassWithMultipleDependencies" should be types that have no dependencies +Result: False +Description: TypeDependencyNamespace.ClassWithMultipleDependencies does exist +Message: +"Types that are "TypeDependencyNamespace.ClassWithMultipleDependencies" should be types that have no dependencies" failed: + TypeDependencyNamespace.ClassWithMultipleDependencies does exist + + + +Query: Types that are "TypeDependencyNamespace.ClassWithMultipleDependencies" should be types that have no dependencies +Result: False +Description: TypeDependencyNamespace.ClassWithMultipleDependencies does exist +Message: +"Types that are "TypeDependencyNamespace.ClassWithMultipleDependencies" should be types that have no dependencies" failed: + TypeDependencyNamespace.ClassWithMultipleDependencies does exist + + + +Query: Types that are "TypeDependencyNamespace.ClassWithMultipleDependencies" should be types that depend on any Classes that have full name "NotTheNameOfAnyObject" +Result: False +Description: TypeDependencyNamespace.ClassWithMultipleDependencies does exist +Message: +"Types that are "TypeDependencyNamespace.ClassWithMultipleDependencies" should be types that depend on any Classes that have full name "NotTheNameOfAnyObject"" failed: + TypeDependencyNamespace.ClassWithMultipleDependencies does exist + + + ===== Multiple arguments ===== +----- Conditions ----- + Query: Types that are "TypeDependencyNamespace.ClassWithMultipleDependencies" should depend on any "TypeDependencyNamespace.ClassWithoutDependencies" or "TypeDependencyNamespace.BaseClass" Result: False Description: TypeDependencyNamespace.ClassWithMultipleDependencies does depend on System.Object and TypeDependencyNamespace.BaseClassWithMember and TypeDependencyNamespace.OtherBaseClass @@ -149,8 +397,86 @@ Message: +----- Predicates ----- + +Query: Types that are "TypeDependencyNamespace.ClassWithMultipleDependencies" should be Types that depend on "TypeDependencyNamespace.ClassWithoutDependencies" or "TypeDependencyNamespace.BaseClass" +Result: False +Description: TypeDependencyNamespace.ClassWithMultipleDependencies is not Types that depend on "TypeDependencyNamespace.ClassWithoutDependencies" or "TypeDependencyNamespace.BaseClass" +Message: +"Types that are "TypeDependencyNamespace.ClassWithMultipleDependencies" should be Types that depend on "TypeDependencyNamespace.ClassWithoutDependencies" or "TypeDependencyNamespace.BaseClass"" failed: + TypeDependencyNamespace.ClassWithMultipleDependencies is not Types that depend on "TypeDependencyNamespace.ClassWithoutDependencies" or "TypeDependencyNamespace.BaseClass" + + + +Query: Types that are "TypeDependencyNamespace.ClassWithMultipleDependencies" should be Types that depend on "TypeDependencyNamespace.ClassWithoutDependencies" or "TypeDependencyNamespace.BaseClass" +Result: False +Description: TypeDependencyNamespace.ClassWithMultipleDependencies is not Types that depend on "TypeDependencyNamespace.ClassWithoutDependencies" or "TypeDependencyNamespace.BaseClass" +Message: +"Types that are "TypeDependencyNamespace.ClassWithMultipleDependencies" should be Types that depend on "TypeDependencyNamespace.ClassWithoutDependencies" or "TypeDependencyNamespace.BaseClass"" failed: + TypeDependencyNamespace.ClassWithMultipleDependencies is not Types that depend on "TypeDependencyNamespace.ClassWithoutDependencies" or "TypeDependencyNamespace.BaseClass" + + + +Query: Types that are "TypeDependencyNamespace.ClassWithMultipleDependencies" should be Types that depend on "TypeDependencyNamespace.ClassWithoutDependencies" or "TypeDependencyNamespace.BaseClass" +Result: False +Description: TypeDependencyNamespace.ClassWithMultipleDependencies is not Types that depend on "TypeDependencyNamespace.ClassWithoutDependencies" or "TypeDependencyNamespace.BaseClass" +Message: +"Types that are "TypeDependencyNamespace.ClassWithMultipleDependencies" should be Types that depend on "TypeDependencyNamespace.ClassWithoutDependencies" or "TypeDependencyNamespace.BaseClass"" failed: + TypeDependencyNamespace.ClassWithMultipleDependencies is not Types that depend on "TypeDependencyNamespace.ClassWithoutDependencies" or "TypeDependencyNamespace.BaseClass" + + + +Query: Types that are "TypeDependencyNamespace.ClassWithMultipleDependencies" should be Types that depend on "TypeDependencyNamespace.ClassWithoutDependencies" or "TypeDependencyNamespace.BaseClass" +Result: False +Description: TypeDependencyNamespace.ClassWithMultipleDependencies is not Types that depend on "TypeDependencyNamespace.ClassWithoutDependencies" or "TypeDependencyNamespace.BaseClass" +Message: +"Types that are "TypeDependencyNamespace.ClassWithMultipleDependencies" should be Types that depend on "TypeDependencyNamespace.ClassWithoutDependencies" or "TypeDependencyNamespace.BaseClass"" failed: + TypeDependencyNamespace.ClassWithMultipleDependencies is not Types that depend on "TypeDependencyNamespace.ClassWithoutDependencies" or "TypeDependencyNamespace.BaseClass" + + + +----- Predicates as conditions ----- + +Query: Types that are "TypeDependencyNamespace.ClassWithMultipleDependencies" should be types that depend on "TypeDependencyNamespace.ClassWithoutDependencies" or "TypeDependencyNamespace.BaseClass" +Result: False +Description: TypeDependencyNamespace.ClassWithMultipleDependencies is not "TypeDependencyNamespace.ChildClass" or "TypeDependencyNamespace.OtherChildClass" +Message: +"Types that are "TypeDependencyNamespace.ClassWithMultipleDependencies" should be types that depend on "TypeDependencyNamespace.ClassWithoutDependencies" or "TypeDependencyNamespace.BaseClass"" failed: + TypeDependencyNamespace.ClassWithMultipleDependencies is not "TypeDependencyNamespace.ChildClass" or "TypeDependencyNamespace.OtherChildClass" + + + +Query: Types that are "TypeDependencyNamespace.ClassWithMultipleDependencies" should be types that depend on "TypeDependencyNamespace.ClassWithoutDependencies" or "TypeDependencyNamespace.BaseClass" +Result: False +Description: TypeDependencyNamespace.ClassWithMultipleDependencies is not "TypeDependencyNamespace.ChildClass" or "TypeDependencyNamespace.OtherChildClass" +Message: +"Types that are "TypeDependencyNamespace.ClassWithMultipleDependencies" should be types that depend on "TypeDependencyNamespace.ClassWithoutDependencies" or "TypeDependencyNamespace.BaseClass"" failed: + TypeDependencyNamespace.ClassWithMultipleDependencies is not "TypeDependencyNamespace.ChildClass" or "TypeDependencyNamespace.OtherChildClass" + + + +Query: Types that are "TypeDependencyNamespace.ClassWithMultipleDependencies" should be types that depend on "TypeDependencyNamespace.ClassWithoutDependencies" or "TypeDependencyNamespace.BaseClass" +Result: False +Description: TypeDependencyNamespace.ClassWithMultipleDependencies is not "TypeDependencyNamespace.ChildClass" or "TypeDependencyNamespace.OtherChildClass" +Message: +"Types that are "TypeDependencyNamespace.ClassWithMultipleDependencies" should be types that depend on "TypeDependencyNamespace.ClassWithoutDependencies" or "TypeDependencyNamespace.BaseClass"" failed: + TypeDependencyNamespace.ClassWithMultipleDependencies is not "TypeDependencyNamespace.ChildClass" or "TypeDependencyNamespace.OtherChildClass" + + + +Query: Types that are "TypeDependencyNamespace.ClassWithMultipleDependencies" should be types that depend on "TypeDependencyNamespace.ClassWithoutDependencies" or "TypeDependencyNamespace.BaseClass" +Result: False +Description: TypeDependencyNamespace.ClassWithMultipleDependencies is not "TypeDependencyNamespace.ChildClass" or "TypeDependencyNamespace.OtherChildClass" +Message: +"Types that are "TypeDependencyNamespace.ClassWithMultipleDependencies" should be types that depend on "TypeDependencyNamespace.ClassWithoutDependencies" or "TypeDependencyNamespace.BaseClass"" failed: + TypeDependencyNamespace.ClassWithMultipleDependencies is not "TypeDependencyNamespace.ChildClass" or "TypeDependencyNamespace.OtherChildClass" + + + ===== Input without dependencies ===== +----- Conditions ----- + Query: Types that are "TypeDependencyNamespace.ClassWithoutDependencies" should depend on any "TypeDependencyNamespace.BaseClass" or "TypeDependencyNamespace.ChildClass" Result: False Description: TypeDependencyNamespace.ClassWithoutDependencies does depend on System.Object @@ -160,8 +486,32 @@ Message: +----- Predicates ----- + +Query: Types that are "TypeDependencyNamespace.ClassWithoutDependencies" should be Types that depend on "TypeDependencyNamespace.BaseClass" or "TypeDependencyNamespace.ChildClass" +Result: False +Description: TypeDependencyNamespace.ClassWithoutDependencies is not Types that depend on "TypeDependencyNamespace.BaseClass" or "TypeDependencyNamespace.ChildClass" +Message: +"Types that are "TypeDependencyNamespace.ClassWithoutDependencies" should be Types that depend on "TypeDependencyNamespace.BaseClass" or "TypeDependencyNamespace.ChildClass"" failed: + TypeDependencyNamespace.ClassWithoutDependencies is not Types that depend on "TypeDependencyNamespace.BaseClass" or "TypeDependencyNamespace.ChildClass" + + + +----- Predicates as conditions ----- + +Query: Types that are "TypeDependencyNamespace.ClassWithoutDependencies" should be types that depend on "TypeDependencyNamespace.BaseClass" or "TypeDependencyNamespace.ChildClass" +Result: False +Description: TypeDependencyNamespace.ClassWithoutDependencies is not "TypeDependencyNamespace.ChildClass" or "TypeDependencyNamespace.OtherChildClass" +Message: +"Types that are "TypeDependencyNamespace.ClassWithoutDependencies" should be types that depend on "TypeDependencyNamespace.BaseClass" or "TypeDependencyNamespace.ChildClass"" failed: + TypeDependencyNamespace.ClassWithoutDependencies is not "TypeDependencyNamespace.ChildClass" or "TypeDependencyNamespace.OtherChildClass" + + + ===== Multiple inputs ===== +----- Conditions ----- + Query: Types that are "TypeDependencyNamespace.ChildClass1" or "TypeDependencyNamespace.ChildClass2" should depend on any "TypeDependencyNamespace.BaseClassWithMultipleDependencies" Result: True Description: TypeDependencyNamespace.ChildClass1 passed @@ -182,3 +532,47 @@ Message: +----- Predicates ----- + +Query: Types that are "TypeDependencyNamespace.ChildClass1" or "TypeDependencyNamespace.ChildClass2" should be Types that depend on "TypeDependencyNamespace.BaseClassWithMultipleDependencies" +Result: True +Description: TypeDependencyNamespace.ChildClass1 passed +Result: True +Description: TypeDependencyNamespace.ChildClass2 passed +Message: +All Evaluations passed + +Query: Types that are "TypeDependencyNamespace.ChildClass" or "TypeDependencyNamespace.BaseClass" should be Types that depend on "TypeDependencyNamespace.ClassWithoutDependencies" +Result: False +Description: TypeDependencyNamespace.BaseClass is not Types that depend on "TypeDependencyNamespace.ClassWithoutDependencies" +Result: False +Description: TypeDependencyNamespace.ChildClass is not Types that depend on "TypeDependencyNamespace.ClassWithoutDependencies" +Message: +"Types that are "TypeDependencyNamespace.ChildClass" or "TypeDependencyNamespace.BaseClass" should be Types that depend on "TypeDependencyNamespace.ClassWithoutDependencies"" failed: + TypeDependencyNamespace.BaseClass is not Types that depend on "TypeDependencyNamespace.ClassWithoutDependencies" + TypeDependencyNamespace.ChildClass is not Types that depend on "TypeDependencyNamespace.ClassWithoutDependencies" + + + +----- Predicates as conditions ----- + +Query: Types that are "TypeDependencyNamespace.ChildClass1" or "TypeDependencyNamespace.ChildClass2" should be types that depend on "TypeDependencyNamespace.BaseClassWithMultipleDependencies" +Result: True +Description: TypeDependencyNamespace.ChildClass1 passed +Result: True +Description: TypeDependencyNamespace.ChildClass2 passed +Message: +All Evaluations passed + +Query: Types that are "TypeDependencyNamespace.ChildClass" or "TypeDependencyNamespace.BaseClass" should be types that depend on "TypeDependencyNamespace.ClassWithoutDependencies" +Result: False +Description: TypeDependencyNamespace.BaseClass does exist +Result: False +Description: TypeDependencyNamespace.ChildClass does exist +Message: +"Types that are "TypeDependencyNamespace.ChildClass" or "TypeDependencyNamespace.BaseClass" should be types that depend on "TypeDependencyNamespace.ClassWithoutDependencies"" failed: + TypeDependencyNamespace.BaseClass does exist + TypeDependencyNamespace.ChildClass does exist + + + diff --git a/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.FollowCustomPredicateTest.verified.txt b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.FollowCustomPredicateTest.verified.txt new file mode 100644 index 000000000..55bf00f80 --- /dev/null +++ b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.FollowCustomPredicateTest.verified.txt @@ -0,0 +1,72 @@ +===== No violations ===== + +----- Conditions ----- + +Query: Types that are "TypeDependencyNamespace.ChildClass" should be Types that follow custom predicate +Result: True +Description: TypeDependencyNamespace.ChildClass passed +Message: +All Evaluations passed + +Query: Types that are "TypeDependencyNamespace.ChildClass" should be Types that follow custom predicate +Result: True +Description: TypeDependencyNamespace.ChildClass passed +Message: +All Evaluations passed + +----- Predicates ----- + +Query: Types that are "TypeDependencyNamespace.ChildClass" should be types that follow custom predicate +Result: True +Description: TypeDependencyNamespace.ChildClass passed +Message: +All Evaluations passed + +Query: Types that are "TypeDependencyNamespace.ChildClass" should be types that follow custom predicate +Result: True +Description: TypeDependencyNamespace.ChildClass passed +Message: +All Evaluations passed + +===== Violations ===== + +----- Conditions ----- + +Query: Types that are "TypeDependencyNamespace.BaseClass" should be Types that follow custom predicate +Result: False +Description: TypeDependencyNamespace.BaseClass is not Types that follow custom predicate +Message: +"Types that are "TypeDependencyNamespace.BaseClass" should be Types that follow custom predicate" failed: + TypeDependencyNamespace.BaseClass is not Types that follow custom predicate + + + +Query: Types that are "TypeDependencyNamespace.BaseClass" should be Types that follow custom predicate +Result: False +Description: TypeDependencyNamespace.BaseClass is not Types that follow custom predicate +Message: +"Types that are "TypeDependencyNamespace.BaseClass" should be Types that follow custom predicate" failed: + TypeDependencyNamespace.BaseClass is not Types that follow custom predicate + + + +----- Predicates ----- + +Query: Types that are "TypeDependencyNamespace.BaseClass" should be types that follow custom predicate +Result: False +Description: TypeDependencyNamespace.BaseClass is not "TypeDependencyNamespace.ChildClass" +Message: +"Types that are "TypeDependencyNamespace.BaseClass" should be types that follow custom predicate" failed: + TypeDependencyNamespace.BaseClass is not "TypeDependencyNamespace.ChildClass" + + + +Query: Types that are "TypeDependencyNamespace.BaseClass" should be types that follow custom predicate +Result: False +Description: TypeDependencyNamespace.BaseClass is not "TypeDependencyNamespace.ChildClass" +Message: +"Types that are "TypeDependencyNamespace.BaseClass" should be types that follow custom predicate" failed: + TypeDependencyNamespace.BaseClass is not "TypeDependencyNamespace.ChildClass" + + + diff --git a/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.HaveAnyAttributesTest.verified.txt b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.HaveAnyAttributesTest.verified.txt index ecbd93e7d..5c044adfc 100644 --- a/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.HaveAnyAttributesTest.verified.txt +++ b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.HaveAnyAttributesTest.verified.txt @@ -1,5 +1,7 @@ ===== No violations ===== +----- Conditions ----- + Query: Types that are "AttributeNamespace.ClassWithTwoAttributes" should have any "AttributeNamespace.Attribute1" Result: True Description: AttributeNamespace.ClassWithTwoAttributes passed @@ -30,8 +32,74 @@ Description: AttributeNamespace.ClassWithTwoAttributes passed Message: All Evaluations passed +----- Predicates ----- + +Query: Types that are "AttributeNamespace.ClassWithTwoAttributes" should be Types that have attribute "AttributeNamespace.Attribute1" +Result: True +Description: AttributeNamespace.ClassWithTwoAttributes passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithTwoAttributes" should be Types that have attribute "AttributeNamespace.Attribute1" +Result: True +Description: AttributeNamespace.ClassWithTwoAttributes passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithTwoAttributes" should be Types that have attribute "AttributeNamespace.Attribute1" +Result: True +Description: AttributeNamespace.ClassWithTwoAttributes passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithTwoAttributes" should be Types that have attribute "AttributeNamespace.Attribute1" +Result: True +Description: AttributeNamespace.ClassWithTwoAttributes passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithTwoAttributes" should be Types that have any Attributes that are "AttributeNamespace.Attribute1" +Result: True +Description: AttributeNamespace.ClassWithTwoAttributes passed +Message: +All Evaluations passed + +----- Predicates as conditions ----- + +Query: Types that are "AttributeNamespace.ClassWithTwoAttributes" should be types that have attribute "AttributeNamespace.Attribute1" +Result: True +Description: AttributeNamespace.ClassWithTwoAttributes passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithTwoAttributes" should be types that have attribute "AttributeNamespace.Attribute1" +Result: True +Description: AttributeNamespace.ClassWithTwoAttributes passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithTwoAttributes" should be types that have attribute "AttributeNamespace.Attribute1" +Result: True +Description: AttributeNamespace.ClassWithTwoAttributes passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithTwoAttributes" should be types that have attribute "AttributeNamespace.Attribute1" +Result: True +Description: AttributeNamespace.ClassWithTwoAttributes passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithTwoAttributes" should be types that have any Attributes that are "AttributeNamespace.Attribute1" +Result: True +Description: AttributeNamespace.ClassWithTwoAttributes passed +Message: +All Evaluations passed + ===== Violations ===== +----- Conditions ----- + Query: Types that are "AttributeNamespace.ClassWithTwoAttributes" should have any "AttributeNamespace.UnusedAttribute" Result: False Description: AttributeNamespace.ClassWithTwoAttributes does not have any "AttributeNamespace.UnusedAttribute" @@ -77,8 +145,104 @@ Message: +----- Predicates ----- + +Query: Types that are "AttributeNamespace.ClassWithTwoAttributes" should be Types that have attribute "AttributeNamespace.UnusedAttribute" +Result: False +Description: AttributeNamespace.ClassWithTwoAttributes is not Types that have attribute "AttributeNamespace.UnusedAttribute" +Message: +"Types that are "AttributeNamespace.ClassWithTwoAttributes" should be Types that have attribute "AttributeNamespace.UnusedAttribute"" failed: + AttributeNamespace.ClassWithTwoAttributes is not Types that have attribute "AttributeNamespace.UnusedAttribute" + + + +Query: Types that are "AttributeNamespace.ClassWithTwoAttributes" should be Types that have attribute "AttributeNamespace.UnusedAttribute" +Result: False +Description: AttributeNamespace.ClassWithTwoAttributes is not Types that have attribute "AttributeNamespace.UnusedAttribute" +Message: +"Types that are "AttributeNamespace.ClassWithTwoAttributes" should be Types that have attribute "AttributeNamespace.UnusedAttribute"" failed: + AttributeNamespace.ClassWithTwoAttributes is not Types that have attribute "AttributeNamespace.UnusedAttribute" + + + +Query: Types that are "AttributeNamespace.ClassWithTwoAttributes" should be Types that have attribute "AttributeNamespace.UnusedAttribute" +Result: False +Description: AttributeNamespace.ClassWithTwoAttributes is not Types that have attribute "AttributeNamespace.UnusedAttribute" +Message: +"Types that are "AttributeNamespace.ClassWithTwoAttributes" should be Types that have attribute "AttributeNamespace.UnusedAttribute"" failed: + AttributeNamespace.ClassWithTwoAttributes is not Types that have attribute "AttributeNamespace.UnusedAttribute" + + + +Query: Types that are "AttributeNamespace.ClassWithTwoAttributes" should be Types that have attribute "AttributeNamespace.UnusedAttribute" +Result: False +Description: AttributeNamespace.ClassWithTwoAttributes is not Types that have attribute "AttributeNamespace.UnusedAttribute" +Message: +"Types that are "AttributeNamespace.ClassWithTwoAttributes" should be Types that have attribute "AttributeNamespace.UnusedAttribute"" failed: + AttributeNamespace.ClassWithTwoAttributes is not Types that have attribute "AttributeNamespace.UnusedAttribute" + + + +Query: Types that are "AttributeNamespace.ClassWithTwoAttributes" should be Types that have any Attributes that are "AttributeNamespace.UnusedAttribute" +Result: False +Description: AttributeNamespace.ClassWithTwoAttributes is not Types that have any Attributes that are "AttributeNamespace.UnusedAttribute" +Message: +"Types that are "AttributeNamespace.ClassWithTwoAttributes" should be Types that have any Attributes that are "AttributeNamespace.UnusedAttribute"" failed: + AttributeNamespace.ClassWithTwoAttributes is not Types that have any Attributes that are "AttributeNamespace.UnusedAttribute" + + + +----- Predicates as conditions ----- + +Query: Types that are "AttributeNamespace.ClassWithTwoAttributes" should be types that have attribute "AttributeNamespace.UnusedAttribute" +Result: False +Description: AttributeNamespace.ClassWithTwoAttributes does exist +Message: +"Types that are "AttributeNamespace.ClassWithTwoAttributes" should be types that have attribute "AttributeNamespace.UnusedAttribute"" failed: + AttributeNamespace.ClassWithTwoAttributes does exist + + + +Query: Types that are "AttributeNamespace.ClassWithTwoAttributes" should be types that have attribute "AttributeNamespace.UnusedAttribute" +Result: False +Description: AttributeNamespace.ClassWithTwoAttributes does exist +Message: +"Types that are "AttributeNamespace.ClassWithTwoAttributes" should be types that have attribute "AttributeNamespace.UnusedAttribute"" failed: + AttributeNamespace.ClassWithTwoAttributes does exist + + + +Query: Types that are "AttributeNamespace.ClassWithTwoAttributes" should be types that have attribute "AttributeNamespace.UnusedAttribute" +Result: False +Description: AttributeNamespace.ClassWithTwoAttributes does exist +Message: +"Types that are "AttributeNamespace.ClassWithTwoAttributes" should be types that have attribute "AttributeNamespace.UnusedAttribute"" failed: + AttributeNamespace.ClassWithTwoAttributes does exist + + + +Query: Types that are "AttributeNamespace.ClassWithTwoAttributes" should be types that have attribute "AttributeNamespace.UnusedAttribute" +Result: False +Description: AttributeNamespace.ClassWithTwoAttributes does exist +Message: +"Types that are "AttributeNamespace.ClassWithTwoAttributes" should be types that have attribute "AttributeNamespace.UnusedAttribute"" failed: + AttributeNamespace.ClassWithTwoAttributes does exist + + + +Query: Types that are "AttributeNamespace.ClassWithTwoAttributes" should be types that have any Attributes that are "AttributeNamespace.UnusedAttribute" +Result: False +Description: AttributeNamespace.ClassWithTwoAttributes does exist +Message: +"Types that are "AttributeNamespace.ClassWithTwoAttributes" should be types that have any Attributes that are "AttributeNamespace.UnusedAttribute"" failed: + AttributeNamespace.ClassWithTwoAttributes does exist + + + ===== Empty arguments ===== +----- Conditions ----- + Query: Types that are "AttributeNamespace.ClassWithTwoAttributes" should have one of no attributes (impossible) Result: False Description: AttributeNamespace.ClassWithTwoAttributes does not have any of no attributes (always true) @@ -106,8 +270,68 @@ Message: +----- Predicates ----- + +Query: Types that are "AttributeNamespace.ClassWithTwoAttributes" should be Types that have one of no attributes (impossible) +Result: False +Description: AttributeNamespace.ClassWithTwoAttributes is not Types that have one of no attributes (impossible) +Message: +"Types that are "AttributeNamespace.ClassWithTwoAttributes" should be Types that have one of no attributes (impossible)" failed: + AttributeNamespace.ClassWithTwoAttributes is not Types that have one of no attributes (impossible) + + + +Query: Types that are "AttributeNamespace.ClassWithTwoAttributes" should be Types that have one of no attributes (impossible) +Result: False +Description: AttributeNamespace.ClassWithTwoAttributes is not Types that have one of no attributes (impossible) +Message: +"Types that are "AttributeNamespace.ClassWithTwoAttributes" should be Types that have one of no attributes (impossible)" failed: + AttributeNamespace.ClassWithTwoAttributes is not Types that have one of no attributes (impossible) + + + +Query: Types that are "AttributeNamespace.ClassWithTwoAttributes" should be Types that have any Attributes that have full name "NotTheNameOfAnyObject" +Result: False +Description: AttributeNamespace.ClassWithTwoAttributes is not Types that have any Attributes that have full name "NotTheNameOfAnyObject" +Message: +"Types that are "AttributeNamespace.ClassWithTwoAttributes" should be Types that have any Attributes that have full name "NotTheNameOfAnyObject"" failed: + AttributeNamespace.ClassWithTwoAttributes is not Types that have any Attributes that have full name "NotTheNameOfAnyObject" + + + +----- Predicates as conditions ----- + +Query: Types that are "AttributeNamespace.ClassWithTwoAttributes" should be types that have one of no attributes (impossible) +Result: False +Description: AttributeNamespace.ClassWithTwoAttributes does exist +Message: +"Types that are "AttributeNamespace.ClassWithTwoAttributes" should be types that have one of no attributes (impossible)" failed: + AttributeNamespace.ClassWithTwoAttributes does exist + + + +Query: Types that are "AttributeNamespace.ClassWithTwoAttributes" should be types that have one of no attributes (impossible) +Result: False +Description: AttributeNamespace.ClassWithTwoAttributes does exist +Message: +"Types that are "AttributeNamespace.ClassWithTwoAttributes" should be types that have one of no attributes (impossible)" failed: + AttributeNamespace.ClassWithTwoAttributes does exist + + + +Query: Types that are "AttributeNamespace.ClassWithTwoAttributes" should be types that have any Attributes that have full name "NotTheNameOfAnyObject" +Result: False +Description: AttributeNamespace.ClassWithTwoAttributes does exist +Message: +"Types that are "AttributeNamespace.ClassWithTwoAttributes" should be types that have any Attributes that have full name "NotTheNameOfAnyObject"" failed: + AttributeNamespace.ClassWithTwoAttributes does exist + + + ===== Multiple arguments ===== +----- Conditions ----- + Query: Types that are "AttributeNamespace.ClassWithTwoAttributes" should have any "AttributeNamespace.Attribute1" or "AttributeNamespace.UnusedAttribute" Result: True Description: AttributeNamespace.ClassWithTwoAttributes passed @@ -138,8 +362,74 @@ Description: AttributeNamespace.ClassWithTwoAttributes passed Message: All Evaluations passed +----- Predicates ----- + +Query: Types that are "AttributeNamespace.ClassWithTwoAttributes" should be Types that have attribute "AttributeNamespace.Attribute1" or "AttributeNamespace.UnusedAttribute" +Result: True +Description: AttributeNamespace.ClassWithTwoAttributes passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithTwoAttributes" should be Types that have attribute "AttributeNamespace.Attribute1" or "AttributeNamespace.UnusedAttribute" +Result: True +Description: AttributeNamespace.ClassWithTwoAttributes passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithTwoAttributes" should be Types that have attribute "AttributeNamespace.Attribute1" or "AttributeNamespace.UnusedAttribute" +Result: True +Description: AttributeNamespace.ClassWithTwoAttributes passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithTwoAttributes" should be Types that have attribute "AttributeNamespace.Attribute1" or "AttributeNamespace.UnusedAttribute" +Result: True +Description: AttributeNamespace.ClassWithTwoAttributes passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithTwoAttributes" should be Types that have any Attributes that are "AttributeNamespace.Attribute1" or "AttributeNamespace.UnusedAttribute" +Result: True +Description: AttributeNamespace.ClassWithTwoAttributes passed +Message: +All Evaluations passed + +----- Predicates as conditions ----- + +Query: Types that are "AttributeNamespace.ClassWithTwoAttributes" should be types that have attribute "AttributeNamespace.Attribute1" or "AttributeNamespace.UnusedAttribute" +Result: True +Description: AttributeNamespace.ClassWithTwoAttributes passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithTwoAttributes" should be types that have attribute "AttributeNamespace.Attribute1" or "AttributeNamespace.UnusedAttribute" +Result: True +Description: AttributeNamespace.ClassWithTwoAttributes passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithTwoAttributes" should be types that have attribute "AttributeNamespace.Attribute1" or "AttributeNamespace.UnusedAttribute" +Result: True +Description: AttributeNamespace.ClassWithTwoAttributes passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithTwoAttributes" should be types that have attribute "AttributeNamespace.Attribute1" or "AttributeNamespace.UnusedAttribute" +Result: True +Description: AttributeNamespace.ClassWithTwoAttributes passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithTwoAttributes" should be types that have any Attributes that are "AttributeNamespace.Attribute1" or "AttributeNamespace.UnusedAttribute" +Result: True +Description: AttributeNamespace.ClassWithTwoAttributes passed +Message: +All Evaluations passed + ===== Multiple inputs ===== +----- Conditions ----- + Query: Types that are "AttributeNamespace.ClassWithTwoAttributes" or "AttributeNamespace.ClassWithThreeAttributes" should have any "AttributeNamespace.Attribute1" Result: True Description: AttributeNamespace.ClassWithTwoAttributes passed @@ -159,3 +449,45 @@ Message: +----- Predicates ----- + +Query: Types that are "AttributeNamespace.ClassWithTwoAttributes" or "AttributeNamespace.ClassWithThreeAttributes" should be Types that have attribute "AttributeNamespace.Attribute1" +Result: True +Description: AttributeNamespace.ClassWithTwoAttributes passed +Result: True +Description: AttributeNamespace.ClassWithThreeAttributes passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithTwoAttributes" or "AttributeNamespace.ClassWithoutAttributes" should be Types that have attribute "AttributeNamespace.Attribute1" +Result: False +Description: AttributeNamespace.ClassWithoutAttributes is not Types that have attribute "AttributeNamespace.Attribute1" +Result: True +Description: AttributeNamespace.ClassWithTwoAttributes passed +Message: +"Types that are "AttributeNamespace.ClassWithTwoAttributes" or "AttributeNamespace.ClassWithoutAttributes" should be Types that have attribute "AttributeNamespace.Attribute1"" failed: + AttributeNamespace.ClassWithoutAttributes is not Types that have attribute "AttributeNamespace.Attribute1" + + + +----- Predicates as conditions ----- + +Query: Types that are "AttributeNamespace.ClassWithTwoAttributes" or "AttributeNamespace.ClassWithThreeAttributes" should be types that have attribute "AttributeNamespace.Attribute1" +Result: True +Description: AttributeNamespace.ClassWithTwoAttributes passed +Result: True +Description: AttributeNamespace.ClassWithThreeAttributes passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithTwoAttributes" or "AttributeNamespace.ClassWithoutAttributes" should be types that have attribute "AttributeNamespace.Attribute1" +Result: False +Description: AttributeNamespace.ClassWithoutAttributes is not "AttributeNamespace.ClassWithSingleAttribute" or "AttributeNamespace.ClassWithTwoAttributes" or "AttributeNamespace.ClassWithThreeAttributes" or "AttributeNamespace.ClassWithSingleAttributeWithArguments" or "AttributeNamespace.ClassWithTwoAttributesWithArguments" or "AttributeNamespace.ClassWithThreeAttributesWithArguments" or "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" or "AttributeNamespace.ClassWithTwoAttributesWithNamedArguments" or "AttributeNamespace.ClassWithThreeAttributesWithNamedArguments" +Result: True +Description: AttributeNamespace.ClassWithTwoAttributes passed +Message: +"Types that are "AttributeNamespace.ClassWithTwoAttributes" or "AttributeNamespace.ClassWithoutAttributes" should be types that have attribute "AttributeNamespace.Attribute1"" failed: + AttributeNamespace.ClassWithoutAttributes is not "AttributeNamespace.ClassWithSingleAttribute" or "AttributeNamespace.ClassWithTwoAttributes" or "AttributeNamespace.ClassWithThreeAttributes" or "AttributeNamespace.ClassWithSingleAttributeWithArguments" or "AttributeNamespace.ClassWithTwoAttributesWithArguments" or "AttributeNamespace.ClassWithThreeAttributesWithArguments" or "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" or "AttributeNamespace.ClassWithTwoAttributesWithNamedArguments" or "AttributeNamespace.ClassWithThreeAttributesWithNamedArguments" + + + diff --git a/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.HaveAnyAttributesWithArgumentsTest.verified.txt b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.HaveAnyAttributesWithArgumentsTest.verified.txt index e228063f2..8c54b53c5 100644 --- a/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.HaveAnyAttributesWithArgumentsTest.verified.txt +++ b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.HaveAnyAttributesWithArgumentsTest.verified.txt @@ -1,12 +1,42 @@ ===== No violations with type arguments ===== -Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should have any attributes with arguments "Argument1" +----- Conditions ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should have any attributes with arguments "AttributeNamespace.TypeArgument1" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should have any attributes with arguments "AttributeNamespace.TypeArgument1" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments passed +Message: +All Evaluations passed + +----- Predicates ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be Types that have any attributes with arguments "AttributeNamespace.TypeArgument1" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be Types that have any attributes with arguments "AttributeNamespace.TypeArgument1" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments passed +Message: +All Evaluations passed + +----- Predicates as conditions ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be types that have any attributes with arguments "AttributeNamespace.TypeArgument1" Result: True Description: AttributeNamespace.ClassWithSingleAttributeWithArguments passed Message: All Evaluations passed -Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should have any attributes with arguments "Argument1" +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be types that have any attributes with arguments "AttributeNamespace.TypeArgument1" Result: True Description: AttributeNamespace.ClassWithSingleAttributeWithArguments passed Message: @@ -14,6 +44,8 @@ All Evaluations passed ===== No violations with value arguments ===== +----- Conditions ----- + Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should have any attributes with arguments "1" Result: True Description: AttributeNamespace.ClassWithSingleAttributeWithArguments passed @@ -26,8 +58,38 @@ Description: AttributeNamespace.ClassWithSingleAttributeWithArguments passed Message: All Evaluations passed +----- Predicates ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be Types that have any attributes with arguments "1" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be Types that have any attributes with arguments "1" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments passed +Message: +All Evaluations passed + +----- Predicates as conditions ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be types that have any attributes with arguments "1" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be types that have any attributes with arguments "1" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments passed +Message: +All Evaluations passed + ===== Violations with type arguments ===== +----- Conditions ----- + Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should have any attributes with arguments "AttributeNamespace.UnusedTypeArgument" Result: False Description: AttributeNamespace.ClassWithSingleAttributeWithArguments does have attributes with argument values "Argument1" and "Argument1" and "1" and "ArchUnitNET.Domain.TypeInstance`1[ArchUnitNET.Domain.Class]" @@ -46,8 +108,50 @@ Message: +----- Predicates ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be Types that have any attributes with arguments "AttributeNamespace.UnusedTypeArgument" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments is not Types that have any attributes with arguments "AttributeNamespace.UnusedTypeArgument" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be Types that have any attributes with arguments "AttributeNamespace.UnusedTypeArgument"" failed: + AttributeNamespace.ClassWithSingleAttributeWithArguments is not Types that have any attributes with arguments "AttributeNamespace.UnusedTypeArgument" + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be Types that have any attributes with arguments "AttributeNamespace.UnusedTypeArgument" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments is not Types that have any attributes with arguments "AttributeNamespace.UnusedTypeArgument" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be Types that have any attributes with arguments "AttributeNamespace.UnusedTypeArgument"" failed: + AttributeNamespace.ClassWithSingleAttributeWithArguments is not Types that have any attributes with arguments "AttributeNamespace.UnusedTypeArgument" + + + +----- Predicates as conditions ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be types that have any attributes with arguments "AttributeNamespace.UnusedTypeArgument" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments does exist +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be types that have any attributes with arguments "AttributeNamespace.UnusedTypeArgument"" failed: + AttributeNamespace.ClassWithSingleAttributeWithArguments does exist + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be types that have any attributes with arguments "AttributeNamespace.UnusedTypeArgument" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments does exist +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be types that have any attributes with arguments "AttributeNamespace.UnusedTypeArgument"" failed: + AttributeNamespace.ClassWithSingleAttributeWithArguments does exist + + + ===== Violations with value arguments ===== +----- Conditions ----- + Query: Types that are "AttributeNamespace.ClassWithoutAttributes" should have any attributes with arguments "1" Result: False Description: AttributeNamespace.ClassWithoutAttributes does have no attribute with an argument @@ -66,8 +170,50 @@ Message: +----- Predicates ----- + +Query: Types that are "AttributeNamespace.ClassWithoutAttributes" should be Types that have any attributes with arguments "1" +Result: False +Description: AttributeNamespace.ClassWithoutAttributes is not Types that have any attributes with arguments "1" +Message: +"Types that are "AttributeNamespace.ClassWithoutAttributes" should be Types that have any attributes with arguments "1"" failed: + AttributeNamespace.ClassWithoutAttributes is not Types that have any attributes with arguments "1" + + + +Query: Types that are "AttributeNamespace.ClassWithoutAttributes" should be Types that have any attributes with arguments "1" +Result: False +Description: AttributeNamespace.ClassWithoutAttributes is not Types that have any attributes with arguments "1" +Message: +"Types that are "AttributeNamespace.ClassWithoutAttributes" should be Types that have any attributes with arguments "1"" failed: + AttributeNamespace.ClassWithoutAttributes is not Types that have any attributes with arguments "1" + + + +----- Predicates as conditions ----- + +Query: Types that are "AttributeNamespace.ClassWithoutAttributes" should be types that have any attributes with arguments "1" +Result: False +Description: AttributeNamespace.ClassWithoutAttributes is not "AttributeNamespace.ClassWithSingleAttributeWithArguments" or "AttributeNamespace.ClassWithTwoAttributesWithArguments" or "AttributeNamespace.ClassWithThreeAttributesWithArguments" or "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" or "AttributeNamespace.ClassWithTwoAttributesWithNamedArguments" or "AttributeNamespace.ClassWithThreeAttributesWithNamedArguments" +Message: +"Types that are "AttributeNamespace.ClassWithoutAttributes" should be types that have any attributes with arguments "1"" failed: + AttributeNamespace.ClassWithoutAttributes is not "AttributeNamespace.ClassWithSingleAttributeWithArguments" or "AttributeNamespace.ClassWithTwoAttributesWithArguments" or "AttributeNamespace.ClassWithThreeAttributesWithArguments" or "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" or "AttributeNamespace.ClassWithTwoAttributesWithNamedArguments" or "AttributeNamespace.ClassWithThreeAttributesWithNamedArguments" + + + +Query: Types that are "AttributeNamespace.ClassWithoutAttributes" should be types that have any attributes with arguments "1" +Result: False +Description: AttributeNamespace.ClassWithoutAttributes is not "AttributeNamespace.ClassWithSingleAttributeWithArguments" or "AttributeNamespace.ClassWithTwoAttributesWithArguments" or "AttributeNamespace.ClassWithThreeAttributesWithArguments" or "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" or "AttributeNamespace.ClassWithTwoAttributesWithNamedArguments" or "AttributeNamespace.ClassWithThreeAttributesWithNamedArguments" +Message: +"Types that are "AttributeNamespace.ClassWithoutAttributes" should be types that have any attributes with arguments "1"" failed: + AttributeNamespace.ClassWithoutAttributes is not "AttributeNamespace.ClassWithSingleAttributeWithArguments" or "AttributeNamespace.ClassWithTwoAttributesWithArguments" or "AttributeNamespace.ClassWithThreeAttributesWithArguments" or "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" or "AttributeNamespace.ClassWithTwoAttributesWithNamedArguments" or "AttributeNamespace.ClassWithThreeAttributesWithNamedArguments" + + + ===== Null argument ===== +----- Conditions ----- + Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should have any attributes with arguments "" Result: False Description: AttributeNamespace.ClassWithSingleAttributeWithArguments does have attributes with argument values "Argument1" and "Argument1" and "1" and "ArchUnitNET.Domain.TypeInstance`1[ArchUnitNET.Domain.Class]" @@ -77,8 +223,32 @@ Message: +----- Predicates ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be Types that have any attributes with arguments "" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments is not Types that have any attributes with arguments "" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be Types that have any attributes with arguments """ failed: + AttributeNamespace.ClassWithSingleAttributeWithArguments is not Types that have any attributes with arguments "" + + + +----- Predicates as conditions ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be types that have any attributes with arguments "" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments is not "AttributeNamespace.ClassWithSingleAttribute" or "AttributeNamespace.ClassWithTwoAttributes" or "AttributeNamespace.ClassWithThreeAttributes" or "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" or "AttributeNamespace.ClassWithTwoAttributesWithNamedArguments" or "AttributeNamespace.ClassWithThreeAttributesWithNamedArguments" or "AttributeNamespace.ClassWithSingleUniquelyUsedAttribute" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be types that have any attributes with arguments """ failed: + AttributeNamespace.ClassWithSingleAttributeWithArguments is not "AttributeNamespace.ClassWithSingleAttribute" or "AttributeNamespace.ClassWithTwoAttributes" or "AttributeNamespace.ClassWithThreeAttributes" or "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" or "AttributeNamespace.ClassWithTwoAttributesWithNamedArguments" or "AttributeNamespace.ClassWithThreeAttributesWithNamedArguments" or "AttributeNamespace.ClassWithSingleUniquelyUsedAttribute" + + + ===== Empty arguments ===== +----- Conditions ----- + Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should have no or any attributes with arguments (always true) Result: True Description: AttributeNamespace.ClassWithSingleAttributeWithArguments passed @@ -91,8 +261,38 @@ Description: AttributeNamespace.ClassWithTwoAttributesWithArguments passed Message: All Evaluations passed +----- Predicates ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be Types that have no or any attributes with arguments (always true) +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithTwoAttributesWithArguments" should be Types that have no or any attributes with arguments (always true) +Result: True +Description: AttributeNamespace.ClassWithTwoAttributesWithArguments passed +Message: +All Evaluations passed + +----- Predicates as conditions ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be types that have no or any attributes with arguments (always true) +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithTwoAttributesWithArguments" should be types that have no or any attributes with arguments (always true) +Result: True +Description: AttributeNamespace.ClassWithTwoAttributesWithArguments passed +Message: +All Evaluations passed + ===== Multiple arguments ===== +----- Conditions ----- + Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should have any attributes with arguments "42" and "NotTheValueOfAnyAttribute" Result: False Description: AttributeNamespace.ClassWithSingleAttributeWithArguments does have attributes with argument values "Argument1" and "Argument1" and "1" and "ArchUnitNET.Domain.TypeInstance`1[ArchUnitNET.Domain.Class]" @@ -111,8 +311,50 @@ Message: +----- Predicates ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be Types that have any attributes with arguments "42" and "NotTheValueOfAnyAttribute" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments is not Types that have any attributes with arguments "42" and "NotTheValueOfAnyAttribute" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be Types that have any attributes with arguments "42" and "NotTheValueOfAnyAttribute"" failed: + AttributeNamespace.ClassWithSingleAttributeWithArguments is not Types that have any attributes with arguments "42" and "NotTheValueOfAnyAttribute" + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be Types that have any attributes with arguments "42" and "NotTheValueOfAnyAttribute" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments is not Types that have any attributes with arguments "42" and "NotTheValueOfAnyAttribute" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be Types that have any attributes with arguments "42" and "NotTheValueOfAnyAttribute"" failed: + AttributeNamespace.ClassWithSingleAttributeWithArguments is not Types that have any attributes with arguments "42" and "NotTheValueOfAnyAttribute" + + + +----- Predicates as conditions ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be types that have any attributes with arguments "42" and "NotTheValueOfAnyAttribute" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments does exist +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be types that have any attributes with arguments "42" and "NotTheValueOfAnyAttribute"" failed: + AttributeNamespace.ClassWithSingleAttributeWithArguments does exist + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be types that have any attributes with arguments "42" and "NotTheValueOfAnyAttribute" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments does exist +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be types that have any attributes with arguments "42" and "NotTheValueOfAnyAttribute"" failed: + AttributeNamespace.ClassWithSingleAttributeWithArguments does exist + + + ===== Multiple inputs ===== +----- Conditions ----- + Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" or "AttributeNamespace.ClassWithTwoAttributesWithArguments" should have any attributes with arguments "Argument1" Result: True Description: AttributeNamespace.ClassWithSingleAttributeWithArguments passed @@ -132,3 +374,45 @@ Message: +----- Predicates ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" or "AttributeNamespace.ClassWithTwoAttributesWithArguments" should be Types that have any attributes with arguments "Argument1" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments passed +Result: True +Description: AttributeNamespace.ClassWithTwoAttributesWithArguments passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" or "AttributeNamespace.ClassWithTwoAttributesWithArguments" should be Types that have any attributes with arguments "2" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments is not Types that have any attributes with arguments "2" +Result: True +Description: AttributeNamespace.ClassWithTwoAttributesWithArguments passed +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" or "AttributeNamespace.ClassWithTwoAttributesWithArguments" should be Types that have any attributes with arguments "2"" failed: + AttributeNamespace.ClassWithSingleAttributeWithArguments is not Types that have any attributes with arguments "2" + + + +----- Predicates as conditions ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" or "AttributeNamespace.ClassWithTwoAttributesWithArguments" should be types that have any attributes with arguments "Argument1" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments passed +Result: True +Description: AttributeNamespace.ClassWithTwoAttributesWithArguments passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" or "AttributeNamespace.ClassWithTwoAttributesWithArguments" should be types that have any attributes with arguments "2" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments is not "AttributeNamespace.ClassWithTwoAttributesWithArguments" or "AttributeNamespace.ClassWithThreeAttributesWithArguments" or "AttributeNamespace.ClassWithTwoAttributesWithNamedArguments" or "AttributeNamespace.ClassWithThreeAttributesWithNamedArguments" +Result: True +Description: AttributeNamespace.ClassWithTwoAttributesWithArguments passed +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" or "AttributeNamespace.ClassWithTwoAttributesWithArguments" should be types that have any attributes with arguments "2"" failed: + AttributeNamespace.ClassWithSingleAttributeWithArguments is not "AttributeNamespace.ClassWithTwoAttributesWithArguments" or "AttributeNamespace.ClassWithThreeAttributesWithArguments" or "AttributeNamespace.ClassWithTwoAttributesWithNamedArguments" or "AttributeNamespace.ClassWithThreeAttributesWithNamedArguments" + + + diff --git a/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.HaveAnyAttributesWithNamedArguments.verified.txt b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.HaveAnyAttributesWithNamedArguments.verified.txt index b7a8d6c5b..f8356e86d 100644 --- a/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.HaveAnyAttributesWithNamedArguments.verified.txt +++ b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.HaveAnyAttributesWithNamedArguments.verified.txt @@ -1,5 +1,7 @@ ===== No violations with type arguments ===== +----- Conditions ----- + Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should have any attributes with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" Result: True Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments passed @@ -12,8 +14,38 @@ Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments passe Message: All Evaluations passed +----- Predicates ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be Types that have any attributes with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be Types that have any attributes with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments passed +Message: +All Evaluations passed + +----- Predicates as conditions ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be types that have any attributes with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be types that have any attributes with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments passed +Message: +All Evaluations passed + ===== No violations with value arguments ===== +----- Conditions ----- + Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should have any attributes with named arguments "NamedParameter2=Argument1" Result: True Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments passed @@ -26,8 +58,154 @@ Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments passe Message: All Evaluations passed +----- Predicates ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be Types that have any attributes with named arguments "NamedParameter2=Argument1" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be Types that have any attributes with named arguments "NamedParameter2=Argument1" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments passed +Message: +All Evaluations passed + +----- Predicates as conditions ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be types that have any attributes with named arguments "NamedParameter2=Argument1" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be types that have any attributes with named arguments "NamedParameter2=Argument1" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments passed +Message: +All Evaluations passed + +===== Violations for attribute without named arguments ===== + +----- Conditions ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttribute" should have any attributes with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttribute does have no attribute with a named argument +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttribute" should have any attributes with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1"" failed: + AttributeNamespace.ClassWithSingleAttribute does have no attribute with a named argument + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttribute" should have any attributes with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttribute does have no attribute with a named argument +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttribute" should have any attributes with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1"" failed: + AttributeNamespace.ClassWithSingleAttribute does have no attribute with a named argument + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttribute" should have any attributes with named arguments "NamedParameter2=Argument1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttribute does have no attribute with a named argument +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttribute" should have any attributes with named arguments "NamedParameter2=Argument1"" failed: + AttributeNamespace.ClassWithSingleAttribute does have no attribute with a named argument + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttribute" should have any attributes with named arguments "NamedParameter2=Argument1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttribute does have no attribute with a named argument +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttribute" should have any attributes with named arguments "NamedParameter2=Argument1"" failed: + AttributeNamespace.ClassWithSingleAttribute does have no attribute with a named argument + + + +----- Predicates ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttribute" should be Types that have any attributes with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttribute is not Types that have any attributes with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttribute" should be Types that have any attributes with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1"" failed: + AttributeNamespace.ClassWithSingleAttribute is not Types that have any attributes with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttribute" should be Types that have any attributes with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttribute is not Types that have any attributes with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttribute" should be Types that have any attributes with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1"" failed: + AttributeNamespace.ClassWithSingleAttribute is not Types that have any attributes with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttribute" should be Types that have any attributes with named arguments "NamedParameter2=Argument1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttribute is not Types that have any attributes with named arguments "NamedParameter2=Argument1" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttribute" should be Types that have any attributes with named arguments "NamedParameter2=Argument1"" failed: + AttributeNamespace.ClassWithSingleAttribute is not Types that have any attributes with named arguments "NamedParameter2=Argument1" + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttribute" should be Types that have any attributes with named arguments "NamedParameter2=Argument1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttribute is not Types that have any attributes with named arguments "NamedParameter2=Argument1" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttribute" should be Types that have any attributes with named arguments "NamedParameter2=Argument1"" failed: + AttributeNamespace.ClassWithSingleAttribute is not Types that have any attributes with named arguments "NamedParameter2=Argument1" + + + +----- Predicates as conditions ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttribute" should be types that have any attributes with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttribute is not "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" or "AttributeNamespace.ClassWithTwoAttributesWithNamedArguments" or "AttributeNamespace.ClassWithThreeAttributesWithNamedArguments" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttribute" should be types that have any attributes with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1"" failed: + AttributeNamespace.ClassWithSingleAttribute is not "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" or "AttributeNamespace.ClassWithTwoAttributesWithNamedArguments" or "AttributeNamespace.ClassWithThreeAttributesWithNamedArguments" + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttribute" should be types that have any attributes with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttribute is not "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" or "AttributeNamespace.ClassWithTwoAttributesWithNamedArguments" or "AttributeNamespace.ClassWithThreeAttributesWithNamedArguments" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttribute" should be types that have any attributes with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1"" failed: + AttributeNamespace.ClassWithSingleAttribute is not "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" or "AttributeNamespace.ClassWithTwoAttributesWithNamedArguments" or "AttributeNamespace.ClassWithThreeAttributesWithNamedArguments" + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttribute" should be types that have any attributes with named arguments "NamedParameter2=Argument1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttribute is not "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" or "AttributeNamespace.ClassWithTwoAttributesWithNamedArguments" or "AttributeNamespace.ClassWithThreeAttributesWithNamedArguments" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttribute" should be types that have any attributes with named arguments "NamedParameter2=Argument1"" failed: + AttributeNamespace.ClassWithSingleAttribute is not "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" or "AttributeNamespace.ClassWithTwoAttributesWithNamedArguments" or "AttributeNamespace.ClassWithThreeAttributesWithNamedArguments" + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttribute" should be types that have any attributes with named arguments "NamedParameter2=Argument1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttribute is not "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" or "AttributeNamespace.ClassWithTwoAttributesWithNamedArguments" or "AttributeNamespace.ClassWithThreeAttributesWithNamedArguments" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttribute" should be types that have any attributes with named arguments "NamedParameter2=Argument1"" failed: + AttributeNamespace.ClassWithSingleAttribute is not "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" or "AttributeNamespace.ClassWithTwoAttributesWithNamedArguments" or "AttributeNamespace.ClassWithThreeAttributesWithNamedArguments" + + + ===== Violations with type arguments ===== +----- Conditions ----- + Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should have any attributes with named arguments "InvalidName=AttributeNamespace.TypeArgument1" Result: False Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments does have attributes with named arguments "NamedParameter1=ArchUnitNET.Domain.TypeInstance`1[ArchUnitNET.Domain.Class]" and "NamedParameter1=ArchUnitNET.Domain.TypeInstance`1[ArchUnitNET.Domain.Class]" and "NamedParameter2=Argument1" and "NamedParameter3=1" @@ -64,8 +242,86 @@ Message: +----- Predicates ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be Types that have any attributes with named arguments "InvalidName=AttributeNamespace.TypeArgument1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not Types that have any attributes with named arguments "InvalidName=AttributeNamespace.TypeArgument1" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be Types that have any attributes with named arguments "InvalidName=AttributeNamespace.TypeArgument1"" failed: + AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not Types that have any attributes with named arguments "InvalidName=AttributeNamespace.TypeArgument1" + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be Types that have any attributes with named arguments "InvalidName=AttributeNamespace.TypeArgument1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not Types that have any attributes with named arguments "InvalidName=AttributeNamespace.TypeArgument1" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be Types that have any attributes with named arguments "InvalidName=AttributeNamespace.TypeArgument1"" failed: + AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not Types that have any attributes with named arguments "InvalidName=AttributeNamespace.TypeArgument1" + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be Types that have any attributes with named arguments "NamedParameter1=AttributeNamespace.UnusedTypeArgument" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not Types that have any attributes with named arguments "NamedParameter1=AttributeNamespace.UnusedTypeArgument" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be Types that have any attributes with named arguments "NamedParameter1=AttributeNamespace.UnusedTypeArgument"" failed: + AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not Types that have any attributes with named arguments "NamedParameter1=AttributeNamespace.UnusedTypeArgument" + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be Types that have any attributes with named arguments "NamedParameter1=AttributeNamespace.UnusedTypeArgument" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not Types that have any attributes with named arguments "NamedParameter1=AttributeNamespace.UnusedTypeArgument" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be Types that have any attributes with named arguments "NamedParameter1=AttributeNamespace.UnusedTypeArgument"" failed: + AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not Types that have any attributes with named arguments "NamedParameter1=AttributeNamespace.UnusedTypeArgument" + + + +----- Predicates as conditions ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be types that have any attributes with named arguments "InvalidName=AttributeNamespace.TypeArgument1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments does exist +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be types that have any attributes with named arguments "InvalidName=AttributeNamespace.TypeArgument1"" failed: + AttributeNamespace.ClassWithSingleAttributeWithNamedArguments does exist + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be types that have any attributes with named arguments "InvalidName=AttributeNamespace.TypeArgument1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments does exist +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be types that have any attributes with named arguments "InvalidName=AttributeNamespace.TypeArgument1"" failed: + AttributeNamespace.ClassWithSingleAttributeWithNamedArguments does exist + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be types that have any attributes with named arguments "NamedParameter1=AttributeNamespace.UnusedTypeArgument" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments does exist +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be types that have any attributes with named arguments "NamedParameter1=AttributeNamespace.UnusedTypeArgument"" failed: + AttributeNamespace.ClassWithSingleAttributeWithNamedArguments does exist + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be types that have any attributes with named arguments "NamedParameter1=AttributeNamespace.UnusedTypeArgument" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments does exist +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be types that have any attributes with named arguments "NamedParameter1=AttributeNamespace.UnusedTypeArgument"" failed: + AttributeNamespace.ClassWithSingleAttributeWithNamedArguments does exist + + + ===== Violations with value arguments ===== +----- Conditions ----- + Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should have any attributes with named arguments "InvalidName=Argument1" Result: False Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments does have attributes with named arguments "NamedParameter1=ArchUnitNET.Domain.TypeInstance`1[ArchUnitNET.Domain.Class]" and "NamedParameter1=ArchUnitNET.Domain.TypeInstance`1[ArchUnitNET.Domain.Class]" and "NamedParameter2=Argument1" and "NamedParameter3=1" @@ -102,16 +358,112 @@ Message: +----- Predicates ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be Types that have any attributes with named arguments "InvalidName=Argument1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not Types that have any attributes with named arguments "InvalidName=Argument1" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be Types that have any attributes with named arguments "InvalidName=Argument1"" failed: + AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not Types that have any attributes with named arguments "InvalidName=Argument1" + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be Types that have any attributes with named arguments "InvalidName=Argument1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not Types that have any attributes with named arguments "InvalidName=Argument1" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be Types that have any attributes with named arguments "InvalidName=Argument1"" failed: + AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not Types that have any attributes with named arguments "InvalidName=Argument1" + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be Types that have any attributes with named arguments "NamedParameter2=NotTheValueOfAnyAttribute" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not Types that have any attributes with named arguments "NamedParameter2=NotTheValueOfAnyAttribute" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be Types that have any attributes with named arguments "NamedParameter2=NotTheValueOfAnyAttribute"" failed: + AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not Types that have any attributes with named arguments "NamedParameter2=NotTheValueOfAnyAttribute" + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be Types that have any attributes with named arguments "NamedParameter2=NotTheValueOfAnyAttribute" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not Types that have any attributes with named arguments "NamedParameter2=NotTheValueOfAnyAttribute" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be Types that have any attributes with named arguments "NamedParameter2=NotTheValueOfAnyAttribute"" failed: + AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not Types that have any attributes with named arguments "NamedParameter2=NotTheValueOfAnyAttribute" + + + +----- Predicates as conditions ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be types that have any attributes with named arguments "InvalidName=Argument1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments does exist +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be types that have any attributes with named arguments "InvalidName=Argument1"" failed: + AttributeNamespace.ClassWithSingleAttributeWithNamedArguments does exist + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be types that have any attributes with named arguments "InvalidName=Argument1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments does exist +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be types that have any attributes with named arguments "InvalidName=Argument1"" failed: + AttributeNamespace.ClassWithSingleAttributeWithNamedArguments does exist + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be types that have any attributes with named arguments "NamedParameter2=NotTheValueOfAnyAttribute" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments does exist +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be types that have any attributes with named arguments "NamedParameter2=NotTheValueOfAnyAttribute"" failed: + AttributeNamespace.ClassWithSingleAttributeWithNamedArguments does exist + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be types that have any attributes with named arguments "NamedParameter2=NotTheValueOfAnyAttribute" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments does exist +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be types that have any attributes with named arguments "NamedParameter2=NotTheValueOfAnyAttribute"" failed: + AttributeNamespace.ClassWithSingleAttributeWithNamedArguments does exist + + + ===== Empty arguments ===== +----- Conditions ----- + Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should have no or any attributes with named arguments (always true) Result: True Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments passed Message: All Evaluations passed +----- Predicates ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be Types that have no or any attributes with named arguments (always true) +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments passed +Message: +All Evaluations passed + +----- Predicates as conditions ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be types that have no or any attributes with named arguments (always true) +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments passed +Message: +All Evaluations passed + ===== Multiple arguments ===== +----- Conditions ----- + Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should have any attributes with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" and "NamedParameter2=Argument1" Result: True Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments passed @@ -142,8 +494,74 @@ Message: +----- Predicates ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be Types that have any attributes with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" and "NamedParameter2=Argument1" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be Types that have any attributes with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" and "NamedParameter2=Argument1" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be Types that have any attributes with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" and "NamedParameter2=NotTheValueOfAnyAttr... +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not Types that have any attributes with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" and "NamedParameter2=NotTheValueOfAnyAttribute" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be Types that have any attributes with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" and "NamedParameter2=NotTheValueOfAnyAttr..." failed: + AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not Types that have any attributes with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" and "NamedParameter2=NotTheValueOfAnyAttribute" + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be Types that have any attributes with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" and "NamedParameter2=NotTheValueOfAnyAttr... +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not Types that have any attributes with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" and "NamedParameter2=NotTheValueOfAnyAttribute" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be Types that have any attributes with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" and "NamedParameter2=NotTheValueOfAnyAttr..." failed: + AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not Types that have any attributes with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" and "NamedParameter2=NotTheValueOfAnyAttribute" + + + +----- Predicates as conditions ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be types that have any attributes with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" and "NamedParameter2=Argument1" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be types that have any attributes with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" and "NamedParameter2=Argument1" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be types that have any attributes with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" and "NamedParameter2=NotTheValueOfAnyAttr... +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments does exist +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be types that have any attributes with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" and "NamedParameter2=NotTheValueOfAnyAttr..." failed: + AttributeNamespace.ClassWithSingleAttributeWithNamedArguments does exist + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be types that have any attributes with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" and "NamedParameter2=NotTheValueOfAnyAttr... +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments does exist +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be types that have any attributes with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" and "NamedParameter2=NotTheValueOfAnyAttr..." failed: + AttributeNamespace.ClassWithSingleAttributeWithNamedArguments does exist + + + ===== Multiple inputs ===== +----- Conditions ----- + Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" or "AttributeNamespace.ClassWithTwoAttributesWithNamedArguments" should have any attributes with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" Result: True Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments passed @@ -163,3 +581,45 @@ Message: +----- Predicates ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" or "AttributeNamespace.ClassWithTwoAttributesWithNamedArguments" should be Types that have any attributes with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments passed +Result: True +Description: AttributeNamespace.ClassWithTwoAttributesWithNamedArguments passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" or "AttributeNamespace.ClassWithTwoAttributesWithNamedArguments" should be Types that have any attributes with named arguments "NamedParameter3=AttributeNamespace.TypeArgument2" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not Types that have any attributes with named arguments "NamedParameter3=AttributeNamespace.TypeArgument2" +Result: True +Description: AttributeNamespace.ClassWithTwoAttributesWithNamedArguments passed +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" or "AttributeNamespace.ClassWithTwoAttributesWithNamedArguments" should be Types that have any attributes with named arguments "NamedParameter3=AttributeNamespace.TypeArgument2"" failed: + AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not Types that have any attributes with named arguments "NamedParameter3=AttributeNamespace.TypeArgument2" + + + +----- Predicates as conditions ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" or "AttributeNamespace.ClassWithTwoAttributesWithNamedArguments" should be types that have any attributes with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments passed +Result: True +Description: AttributeNamespace.ClassWithTwoAttributesWithNamedArguments passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" or "AttributeNamespace.ClassWithTwoAttributesWithNamedArguments" should be types that have any attributes with named arguments "NamedParameter3=AttributeNamespace.TypeArgument2" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not "AttributeNamespace.ClassWithTwoAttributesWithNamedArguments" or "AttributeNamespace.ClassWithThreeAttributesWithNamedArguments" +Result: True +Description: AttributeNamespace.ClassWithTwoAttributesWithNamedArguments passed +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" or "AttributeNamespace.ClassWithTwoAttributesWithNamedArguments" should be types that have any attributes with named arguments "NamedParameter3=AttributeNamespace.TypeArgument2"" failed: + AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not "AttributeNamespace.ClassWithTwoAttributesWithNamedArguments" or "AttributeNamespace.ClassWithThreeAttributesWithNamedArguments" + + + diff --git a/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.HaveAttributeWithArgumentsTest.verified.txt b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.HaveAttributeWithArgumentsTest.verified.txt index b48c18cca..31da0c7a0 100644 --- a/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.HaveAttributeWithArgumentsTest.verified.txt +++ b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.HaveAttributeWithArgumentsTest.verified.txt @@ -1,5 +1,7 @@ ===== No violations with type arguments ===== +----- Conditions ----- + Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should have attribute "AttributeNamespace.Attribute1" with arguments "AttributeNamespace.TypeArgument1" Result: True Description: AttributeNamespace.ClassWithSingleAttributeWithArguments passed @@ -24,8 +26,62 @@ Description: AttributeNamespace.ClassWithSingleAttributeWithArguments passed Message: All Evaluations passed +----- Predicates ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be Types that have attribute "AttributeNamespace.Attribute1" with arguments "AttributeNamespace.TypeArgument1" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be Types that have attribute "AttributeNamespace.Attribute1" with arguments "AttributeNamespace.TypeArgument1" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be Types that have attribute "AttributeNamespace.Attribute1" with arguments "AttributeNamespace.TypeArgument1" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be Types that have attribute "AttributeNamespace.Attribute1" with arguments "AttributeNamespace.TypeArgument1" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments passed +Message: +All Evaluations passed + +----- Predicates as conditions ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be types that have attribute "AttributeNamespace.Attribute1" with arguments "AttributeNamespace.TypeArgument1" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be types that have attribute "AttributeNamespace.Attribute1" with arguments "AttributeNamespace.TypeArgument1" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be types that have attribute "AttributeNamespace.Attribute1" with arguments "AttributeNamespace.TypeArgument1" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be types that have attribute "AttributeNamespace.Attribute1" with arguments "AttributeNamespace.TypeArgument1" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments passed +Message: +All Evaluations passed + ===== No violations with value arguments ===== +----- Conditions ----- + Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should have attribute "AttributeNamespace.Attribute1" with arguments "Argument1" Result: True Description: AttributeNamespace.ClassWithSingleAttributeWithArguments passed @@ -50,8 +106,178 @@ Description: AttributeNamespace.ClassWithSingleAttributeWithArguments passed Message: All Evaluations passed +----- Predicates ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be Types that have attribute "AttributeNamespace.Attribute1" with arguments "Argument1" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be Types that have attribute "AttributeNamespace.Attribute1" with arguments "Argument1" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be Types that have attribute "AttributeNamespace.Attribute1" with arguments "Argument1" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be Types that have attribute "AttributeNamespace.Attribute1" with arguments "Argument1" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments passed +Message: +All Evaluations passed + +----- Predicates as conditions ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be types that have attribute "AttributeNamespace.Attribute1" with arguments "Argument1" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be types that have attribute "AttributeNamespace.Attribute1" with arguments "Argument1" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be types that have attribute "AttributeNamespace.Attribute1" with arguments "Argument1" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be types that have attribute "AttributeNamespace.Attribute1" with arguments "Argument1" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments passed +Message: +All Evaluations passed + +===== Violations for wrong attribute ===== + +----- Conditions ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should have attribute "AttributeNamespace.UnusedAttribute" with arguments "AttributeNamespace.TypeArgument1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments does not have attribute "AttributeNamespace.UnusedAttribute" with arguments "AttributeNamespace.TypeArgument1" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should have attribute "AttributeNamespace.UnusedAttribute" with arguments "AttributeNamespace.TypeArgument1"" failed: + AttributeNamespace.ClassWithSingleAttributeWithArguments does not have attribute "AttributeNamespace.UnusedAttribute" with arguments "AttributeNamespace.TypeArgument1" + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should have attribute "AttributeNamespace.UnusedAttribute" with arguments "AttributeNamespace.TypeArgument1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments does not have attribute "AttributeNamespace.UnusedAttribute" with arguments "AttributeNamespace.TypeArgument1" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should have attribute "AttributeNamespace.UnusedAttribute" with arguments "AttributeNamespace.TypeArgument1"" failed: + AttributeNamespace.ClassWithSingleAttributeWithArguments does not have attribute "AttributeNamespace.UnusedAttribute" with arguments "AttributeNamespace.TypeArgument1" + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should have attribute "AttributeNamespace.UnusedAttribute" with arguments "AttributeNamespace.TypeArgument1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments does not have attribute "AttributeNamespace.UnusedAttribute" with arguments "AttributeNamespace.TypeArgument1" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should have attribute "AttributeNamespace.UnusedAttribute" with arguments "AttributeNamespace.TypeArgument1"" failed: + AttributeNamespace.ClassWithSingleAttributeWithArguments does not have attribute "AttributeNamespace.UnusedAttribute" with arguments "AttributeNamespace.TypeArgument1" + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should have attribute "AttributeNamespace.UnusedAttribute" with arguments "AttributeNamespace.TypeArgument1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments does not have attribute "AttributeNamespace.UnusedAttribute" with arguments "AttributeNamespace.TypeArgument1" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should have attribute "AttributeNamespace.UnusedAttribute" with arguments "AttributeNamespace.TypeArgument1"" failed: + AttributeNamespace.ClassWithSingleAttributeWithArguments does not have attribute "AttributeNamespace.UnusedAttribute" with arguments "AttributeNamespace.TypeArgument1" + + + +----- Predicates ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be Types that have attribute "AttributeNamespace.UnusedAttribute" with arguments "AttributeNamespace.TypeArgument1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments is not Types that have attribute "AttributeNamespace.UnusedAttribute" with arguments "AttributeNamespace.TypeArgument1" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be Types that have attribute "AttributeNamespace.UnusedAttribute" with arguments "AttributeNamespace.TypeArgument1"" failed: + AttributeNamespace.ClassWithSingleAttributeWithArguments is not Types that have attribute "AttributeNamespace.UnusedAttribute" with arguments "AttributeNamespace.TypeArgument1" + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be Types that have attribute "AttributeNamespace.UnusedAttribute" with arguments "AttributeNamespace.TypeArgument1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments is not Types that have attribute "AttributeNamespace.UnusedAttribute" with arguments "AttributeNamespace.TypeArgument1" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be Types that have attribute "AttributeNamespace.UnusedAttribute" with arguments "AttributeNamespace.TypeArgument1"" failed: + AttributeNamespace.ClassWithSingleAttributeWithArguments is not Types that have attribute "AttributeNamespace.UnusedAttribute" with arguments "AttributeNamespace.TypeArgument1" + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be Types that have attribute "AttributeNamespace.UnusedAttribute" with arguments "AttributeNamespace.TypeArgument1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments is not Types that have attribute "AttributeNamespace.UnusedAttribute" with arguments "AttributeNamespace.TypeArgument1" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be Types that have attribute "AttributeNamespace.UnusedAttribute" with arguments "AttributeNamespace.TypeArgument1"" failed: + AttributeNamespace.ClassWithSingleAttributeWithArguments is not Types that have attribute "AttributeNamespace.UnusedAttribute" with arguments "AttributeNamespace.TypeArgument1" + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be Types that have attribute "AttributeNamespace.UnusedAttribute" with arguments "AttributeNamespace.TypeArgument1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments is not Types that have attribute "AttributeNamespace.UnusedAttribute" with arguments "AttributeNamespace.TypeArgument1" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be Types that have attribute "AttributeNamespace.UnusedAttribute" with arguments "AttributeNamespace.TypeArgument1"" failed: + AttributeNamespace.ClassWithSingleAttributeWithArguments is not Types that have attribute "AttributeNamespace.UnusedAttribute" with arguments "AttributeNamespace.TypeArgument1" + + + +----- Predicates as conditions ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be types that have attribute "AttributeNamespace.UnusedAttribute" with arguments "AttributeNamespace.TypeArgument1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments does exist +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be types that have attribute "AttributeNamespace.UnusedAttribute" with arguments "AttributeNamespace.TypeArgument1"" failed: + AttributeNamespace.ClassWithSingleAttributeWithArguments does exist + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be types that have attribute "AttributeNamespace.UnusedAttribute" with arguments "AttributeNamespace.TypeArgument1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments does exist +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be types that have attribute "AttributeNamespace.UnusedAttribute" with arguments "AttributeNamespace.TypeArgument1"" failed: + AttributeNamespace.ClassWithSingleAttributeWithArguments does exist + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be types that have attribute "AttributeNamespace.UnusedAttribute" with arguments "AttributeNamespace.TypeArgument1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments does exist +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be types that have attribute "AttributeNamespace.UnusedAttribute" with arguments "AttributeNamespace.TypeArgument1"" failed: + AttributeNamespace.ClassWithSingleAttributeWithArguments does exist + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be types that have attribute "AttributeNamespace.UnusedAttribute" with arguments "AttributeNamespace.TypeArgument1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments does exist +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be types that have attribute "AttributeNamespace.UnusedAttribute" with arguments "AttributeNamespace.TypeArgument1"" failed: + AttributeNamespace.ClassWithSingleAttributeWithArguments does exist + + + ===== Violations with type arguments ===== +----- Conditions ----- + Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should have attribute "AttributeNamespace.Attribute1" with arguments "AttributeNamespace.UnusedTypeArgument" Result: False Description: AttributeNamespace.ClassWithSingleAttributeWithArguments does not have attribute "AttributeNamespace.Attribute1" with arguments "AttributeNamespace.UnusedTypeArgument" @@ -88,8 +314,86 @@ Message: +----- Predicates ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be Types that have attribute "AttributeNamespace.Attribute1" with arguments "AttributeNamespace.UnusedTypeArgument" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments is not Types that have attribute "AttributeNamespace.Attribute1" with arguments "AttributeNamespace.UnusedTypeArgument" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be Types that have attribute "AttributeNamespace.Attribute1" with arguments "AttributeNamespace.UnusedTypeArgument"" failed: + AttributeNamespace.ClassWithSingleAttributeWithArguments is not Types that have attribute "AttributeNamespace.Attribute1" with arguments "AttributeNamespace.UnusedTypeArgument" + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be Types that have attribute "AttributeNamespace.Attribute1" with arguments "AttributeNamespace.UnusedTypeArgument" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments is not Types that have attribute "AttributeNamespace.Attribute1" with arguments "AttributeNamespace.UnusedTypeArgument" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be Types that have attribute "AttributeNamespace.Attribute1" with arguments "AttributeNamespace.UnusedTypeArgument"" failed: + AttributeNamespace.ClassWithSingleAttributeWithArguments is not Types that have attribute "AttributeNamespace.Attribute1" with arguments "AttributeNamespace.UnusedTypeArgument" + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be Types that have attribute "AttributeNamespace.Attribute1" with arguments "AttributeNamespace.UnusedTypeArgument" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments is not Types that have attribute "AttributeNamespace.Attribute1" with arguments "AttributeNamespace.UnusedTypeArgument" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be Types that have attribute "AttributeNamespace.Attribute1" with arguments "AttributeNamespace.UnusedTypeArgument"" failed: + AttributeNamespace.ClassWithSingleAttributeWithArguments is not Types that have attribute "AttributeNamespace.Attribute1" with arguments "AttributeNamespace.UnusedTypeArgument" + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be Types that have attribute "AttributeNamespace.Attribute1" with arguments "AttributeNamespace.UnusedTypeArgument" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments is not Types that have attribute "AttributeNamespace.Attribute1" with arguments "AttributeNamespace.UnusedTypeArgument" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be Types that have attribute "AttributeNamespace.Attribute1" with arguments "AttributeNamespace.UnusedTypeArgument"" failed: + AttributeNamespace.ClassWithSingleAttributeWithArguments is not Types that have attribute "AttributeNamespace.Attribute1" with arguments "AttributeNamespace.UnusedTypeArgument" + + + +----- Predicates as conditions ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be types that have attribute "AttributeNamespace.Attribute1" with arguments "AttributeNamespace.UnusedTypeArgument" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments does exist +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be types that have attribute "AttributeNamespace.Attribute1" with arguments "AttributeNamespace.UnusedTypeArgument"" failed: + AttributeNamespace.ClassWithSingleAttributeWithArguments does exist + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be types that have attribute "AttributeNamespace.Attribute1" with arguments "AttributeNamespace.UnusedTypeArgument" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments does exist +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be types that have attribute "AttributeNamespace.Attribute1" with arguments "AttributeNamespace.UnusedTypeArgument"" failed: + AttributeNamespace.ClassWithSingleAttributeWithArguments does exist + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be types that have attribute "AttributeNamespace.Attribute1" with arguments "AttributeNamespace.UnusedTypeArgument" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments does exist +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be types that have attribute "AttributeNamespace.Attribute1" with arguments "AttributeNamespace.UnusedTypeArgument"" failed: + AttributeNamespace.ClassWithSingleAttributeWithArguments does exist + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be types that have attribute "AttributeNamespace.Attribute1" with arguments "AttributeNamespace.UnusedTypeArgument" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments does exist +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be types that have attribute "AttributeNamespace.Attribute1" with arguments "AttributeNamespace.UnusedTypeArgument"" failed: + AttributeNamespace.ClassWithSingleAttributeWithArguments does exist + + + ===== Violations with value arguments ===== +----- Conditions ----- + Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should have attribute "AttributeNamespace.Attribute1" with arguments "Argument2" Result: False Description: AttributeNamespace.ClassWithSingleAttributeWithArguments does not have attribute "AttributeNamespace.Attribute1" with arguments "Argument2" @@ -126,8 +430,86 @@ Message: +----- Predicates ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be Types that have attribute "AttributeNamespace.Attribute1" with arguments "Argument2" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments is not Types that have attribute "AttributeNamespace.Attribute1" with arguments "Argument2" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be Types that have attribute "AttributeNamespace.Attribute1" with arguments "Argument2"" failed: + AttributeNamespace.ClassWithSingleAttributeWithArguments is not Types that have attribute "AttributeNamespace.Attribute1" with arguments "Argument2" + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be Types that have attribute "AttributeNamespace.Attribute1" with arguments "Argument2" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments is not Types that have attribute "AttributeNamespace.Attribute1" with arguments "Argument2" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be Types that have attribute "AttributeNamespace.Attribute1" with arguments "Argument2"" failed: + AttributeNamespace.ClassWithSingleAttributeWithArguments is not Types that have attribute "AttributeNamespace.Attribute1" with arguments "Argument2" + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be Types that have attribute "AttributeNamespace.Attribute1" with arguments "Argument2" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments is not Types that have attribute "AttributeNamespace.Attribute1" with arguments "Argument2" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be Types that have attribute "AttributeNamespace.Attribute1" with arguments "Argument2"" failed: + AttributeNamespace.ClassWithSingleAttributeWithArguments is not Types that have attribute "AttributeNamespace.Attribute1" with arguments "Argument2" + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be Types that have attribute "AttributeNamespace.Attribute1" with arguments "Argument2" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments is not Types that have attribute "AttributeNamespace.Attribute1" with arguments "Argument2" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be Types that have attribute "AttributeNamespace.Attribute1" with arguments "Argument2"" failed: + AttributeNamespace.ClassWithSingleAttributeWithArguments is not Types that have attribute "AttributeNamespace.Attribute1" with arguments "Argument2" + + + +----- Predicates as conditions ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be types that have attribute "AttributeNamespace.Attribute1" with arguments "Argument2" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments does exist +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be types that have attribute "AttributeNamespace.Attribute1" with arguments "Argument2"" failed: + AttributeNamespace.ClassWithSingleAttributeWithArguments does exist + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be types that have attribute "AttributeNamespace.Attribute1" with arguments "Argument2" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments does exist +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be types that have attribute "AttributeNamespace.Attribute1" with arguments "Argument2"" failed: + AttributeNamespace.ClassWithSingleAttributeWithArguments does exist + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be types that have attribute "AttributeNamespace.Attribute1" with arguments "Argument2" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments does exist +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be types that have attribute "AttributeNamespace.Attribute1" with arguments "Argument2"" failed: + AttributeNamespace.ClassWithSingleAttributeWithArguments does exist + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be types that have attribute "AttributeNamespace.Attribute1" with arguments "Argument2" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments does exist +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be types that have attribute "AttributeNamespace.Attribute1" with arguments "Argument2"" failed: + AttributeNamespace.ClassWithSingleAttributeWithArguments does exist + + + ===== Type outside of architecture ===== +----- Conditions ----- + Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should have attribute "TypeDependencyNamespace.BaseClass" with arguments "Argument1" Result: False Description: AttributeNamespace.ClassWithSingleAttributeWithArguments does not have attribute "TypeDependencyNamespace.BaseClass" with arguments "Argument1" @@ -137,8 +519,32 @@ Message: +----- Predicates ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be Types that have attribute "TypeDependencyNamespace.BaseClass" with arguments "Argument1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments is not Types that have attribute "TypeDependencyNamespace.BaseClass" with arguments "Argument1" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be Types that have attribute "TypeDependencyNamespace.BaseClass" with arguments "Argument1"" failed: + AttributeNamespace.ClassWithSingleAttributeWithArguments is not Types that have attribute "TypeDependencyNamespace.BaseClass" with arguments "Argument1" + + + +----- Predicates as conditions ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be types that have attribute "TypeDependencyNamespace.BaseClass" with arguments "Argument1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments does exist +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be types that have attribute "TypeDependencyNamespace.BaseClass" with arguments "Argument1"" failed: + AttributeNamespace.ClassWithSingleAttributeWithArguments does exist + + + ===== Null argument ===== +----- Conditions ----- + Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should have attribute "AttributeNamespace.Attribute1" with arguments "" Result: False Description: AttributeNamespace.ClassWithSingleAttributeWithArguments does not have attribute "AttributeNamespace.Attribute1" with arguments "" @@ -157,8 +563,50 @@ Message: +----- Predicates ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be Types that have attribute "AttributeNamespace.Attribute1" with arguments "" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments is not Types that have attribute "AttributeNamespace.Attribute1" with arguments "" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be Types that have attribute "AttributeNamespace.Attribute1" with arguments """ failed: + AttributeNamespace.ClassWithSingleAttributeWithArguments is not Types that have attribute "AttributeNamespace.Attribute1" with arguments "" + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be Types that have attribute "AttributeNamespace.Attribute1" with arguments "" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments is not Types that have attribute "AttributeNamespace.Attribute1" with arguments "" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be Types that have attribute "AttributeNamespace.Attribute1" with arguments """ failed: + AttributeNamespace.ClassWithSingleAttributeWithArguments is not Types that have attribute "AttributeNamespace.Attribute1" with arguments "" + + + +----- Predicates as conditions ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be types that have attribute "AttributeNamespace.Attribute1" with arguments "" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments is not "AttributeNamespace.ClassWithSingleAttribute" or "AttributeNamespace.ClassWithTwoAttributes" or "AttributeNamespace.ClassWithThreeAttributes" or "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" or "AttributeNamespace.ClassWithTwoAttributesWithNamedArguments" or "AttributeNamespace.ClassWithThreeAttributesWithNamedArguments" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be types that have attribute "AttributeNamespace.Attribute1" with arguments """ failed: + AttributeNamespace.ClassWithSingleAttributeWithArguments is not "AttributeNamespace.ClassWithSingleAttribute" or "AttributeNamespace.ClassWithTwoAttributes" or "AttributeNamespace.ClassWithThreeAttributes" or "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" or "AttributeNamespace.ClassWithTwoAttributesWithNamedArguments" or "AttributeNamespace.ClassWithThreeAttributesWithNamedArguments" + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be types that have attribute "AttributeNamespace.Attribute1" with arguments "" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments is not "AttributeNamespace.ClassWithSingleAttribute" or "AttributeNamespace.ClassWithTwoAttributes" or "AttributeNamespace.ClassWithThreeAttributes" or "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" or "AttributeNamespace.ClassWithTwoAttributesWithNamedArguments" or "AttributeNamespace.ClassWithThreeAttributesWithNamedArguments" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be types that have attribute "AttributeNamespace.Attribute1" with arguments """ failed: + AttributeNamespace.ClassWithSingleAttributeWithArguments is not "AttributeNamespace.ClassWithSingleAttribute" or "AttributeNamespace.ClassWithTwoAttributes" or "AttributeNamespace.ClassWithThreeAttributes" or "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" or "AttributeNamespace.ClassWithTwoAttributesWithNamedArguments" or "AttributeNamespace.ClassWithThreeAttributesWithNamedArguments" + + + ===== Empty arguments ===== +----- Conditions ----- + Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should have attribute "AttributeNamespace.Attribute1" Result: True Description: AttributeNamespace.ClassWithSingleAttributeWithArguments passed @@ -171,8 +619,38 @@ Description: AttributeNamespace.ClassWithSingleAttributeWithArguments passed Message: All Evaluations passed +----- Predicates ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be Types that have attribute "AttributeNamespace.Attribute1" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be Types that have attribute "AttributeNamespace.Attribute1" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments passed +Message: +All Evaluations passed + +----- Predicates as conditions ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be types that have attribute "AttributeNamespace.Attribute1" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be types that have attribute "AttributeNamespace.Attribute1" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments passed +Message: +All Evaluations passed + ===== Multiple arguments ===== +----- Conditions ----- + Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should have attribute "AttributeNamespace.Attribute1" with arguments "Argument1" and "1" Result: True Description: AttributeNamespace.ClassWithSingleAttributeWithArguments passed @@ -197,8 +675,62 @@ Description: AttributeNamespace.ClassWithSingleAttributeWithArguments passed Message: All Evaluations passed +----- Predicates ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be Types that have attribute "AttributeNamespace.Attribute1" with arguments "Argument1" and "1" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be Types that have attribute "AttributeNamespace.Attribute1" with arguments "Argument1" and "1" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be Types that have attribute "AttributeNamespace.Attribute1" with arguments "Argument1" and "1" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be Types that have attribute "AttributeNamespace.Attribute1" with arguments "Argument1" and "1" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments passed +Message: +All Evaluations passed + +----- Predicates as conditions ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be types that have attribute "AttributeNamespace.Attribute1" with arguments "Argument1" and "1" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be types that have attribute "AttributeNamespace.Attribute1" with arguments "Argument1" and "1" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be types that have attribute "AttributeNamespace.Attribute1" with arguments "Argument1" and "1" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be types that have attribute "AttributeNamespace.Attribute1" with arguments "Argument1" and "1" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments passed +Message: +All Evaluations passed + ===== Multiple inputs ===== +----- Conditions ----- + Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" or "AttributeNamespace.ClassWithTwoAttributesWithArguments" should have attribute "AttributeNamespace.Attribute1" with arguments "Argument1" Result: True Description: AttributeNamespace.ClassWithSingleAttributeWithArguments passed @@ -218,3 +750,45 @@ Message: +----- Predicates ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" or "AttributeNamespace.ClassWithTwoAttributesWithArguments" should be Types that have attribute "AttributeNamespace.Attribute1" with arguments "Argument1" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments passed +Result: True +Description: AttributeNamespace.ClassWithTwoAttributesWithArguments passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" or "AttributeNamespace.ClassWithTwoAttributesWithArguments" should be Types that have attribute "AttributeNamespace.Attribute2" with arguments "2" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments is not Types that have attribute "AttributeNamespace.Attribute2" with arguments "2" +Result: True +Description: AttributeNamespace.ClassWithTwoAttributesWithArguments passed +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" or "AttributeNamespace.ClassWithTwoAttributesWithArguments" should be Types that have attribute "AttributeNamespace.Attribute2" with arguments "2"" failed: + AttributeNamespace.ClassWithSingleAttributeWithArguments is not Types that have attribute "AttributeNamespace.Attribute2" with arguments "2" + + + +----- Predicates as conditions ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" or "AttributeNamespace.ClassWithTwoAttributesWithArguments" should be types that have attribute "AttributeNamespace.Attribute1" with arguments "Argument1" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments passed +Result: True +Description: AttributeNamespace.ClassWithTwoAttributesWithArguments passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" or "AttributeNamespace.ClassWithTwoAttributesWithArguments" should be types that have attribute "AttributeNamespace.Attribute2" with arguments "2" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments is not "AttributeNamespace.ClassWithTwoAttributesWithArguments" or "AttributeNamespace.ClassWithThreeAttributesWithArguments" or "AttributeNamespace.ClassWithTwoAttributesWithNamedArguments" or "AttributeNamespace.ClassWithThreeAttributesWithNamedArguments" +Result: True +Description: AttributeNamespace.ClassWithTwoAttributesWithArguments passed +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" or "AttributeNamespace.ClassWithTwoAttributesWithArguments" should be types that have attribute "AttributeNamespace.Attribute2" with arguments "2"" failed: + AttributeNamespace.ClassWithSingleAttributeWithArguments is not "AttributeNamespace.ClassWithTwoAttributesWithArguments" or "AttributeNamespace.ClassWithThreeAttributesWithArguments" or "AttributeNamespace.ClassWithTwoAttributesWithNamedArguments" or "AttributeNamespace.ClassWithThreeAttributesWithNamedArguments" + + + diff --git a/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.HaveAttributeWithNamedArguments.verified.txt b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.HaveAttributeWithNamedArguments.verified.txt index a063cf733..52b404ccf 100644 --- a/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.HaveAttributeWithNamedArguments.verified.txt +++ b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.HaveAttributeWithNamedArguments.verified.txt @@ -1,5 +1,7 @@ ===== No violations with type arguments ===== +----- Conditions ----- + Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" Result: True Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments passed @@ -24,8 +26,62 @@ Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments passe Message: All Evaluations passed +----- Predicates ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be Types that have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be Types that have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be Types that have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be Types that have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments passed +Message: +All Evaluations passed + +----- Predicates as conditions ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be types that have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be types that have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be types that have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be types that have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments passed +Message: +All Evaluations passed + ===== No violations with value arguments ===== +----- Conditions ----- + Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter2=Argument1" Result: True Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments passed @@ -50,8 +106,178 @@ Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments passe Message: All Evaluations passed +----- Predicates ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be Types that have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter2=Argument1" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be Types that have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter2=Argument1" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be Types that have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter2=Argument1" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be Types that have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter2=Argument1" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments passed +Message: +All Evaluations passed + +----- Predicates as conditions ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be types that have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter2=Argument1" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be types that have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter2=Argument1" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be types that have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter2=Argument1" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be types that have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter2=Argument1" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments passed +Message: +All Evaluations passed + +===== Violations for attribute without named arguments ===== + +----- Conditions ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttribute" should have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttribute does not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttribute" should have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1"" failed: + AttributeNamespace.ClassWithSingleAttribute does not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttribute" should have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttribute does not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttribute" should have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1"" failed: + AttributeNamespace.ClassWithSingleAttribute does not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttribute" should have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttribute does not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttribute" should have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1"" failed: + AttributeNamespace.ClassWithSingleAttribute does not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttribute" should have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttribute does not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttribute" should have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1"" failed: + AttributeNamespace.ClassWithSingleAttribute does not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" + + + +----- Predicates ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttribute" should be Types that have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttribute is not Types that have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttribute" should be Types that have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1"" failed: + AttributeNamespace.ClassWithSingleAttribute is not Types that have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttribute" should be Types that have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttribute is not Types that have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttribute" should be Types that have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1"" failed: + AttributeNamespace.ClassWithSingleAttribute is not Types that have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttribute" should be Types that have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttribute is not Types that have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttribute" should be Types that have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1"" failed: + AttributeNamespace.ClassWithSingleAttribute is not Types that have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttribute" should be Types that have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttribute is not Types that have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttribute" should be Types that have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1"" failed: + AttributeNamespace.ClassWithSingleAttribute is not Types that have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" + + + +----- Predicates as conditions ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttribute" should be types that have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttribute is not "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" or "AttributeNamespace.ClassWithTwoAttributesWithNamedArguments" or "AttributeNamespace.ClassWithThreeAttributesWithNamedArguments" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttribute" should be types that have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1"" failed: + AttributeNamespace.ClassWithSingleAttribute is not "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" or "AttributeNamespace.ClassWithTwoAttributesWithNamedArguments" or "AttributeNamespace.ClassWithThreeAttributesWithNamedArguments" + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttribute" should be types that have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttribute is not "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" or "AttributeNamespace.ClassWithTwoAttributesWithNamedArguments" or "AttributeNamespace.ClassWithThreeAttributesWithNamedArguments" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttribute" should be types that have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1"" failed: + AttributeNamespace.ClassWithSingleAttribute is not "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" or "AttributeNamespace.ClassWithTwoAttributesWithNamedArguments" or "AttributeNamespace.ClassWithThreeAttributesWithNamedArguments" + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttribute" should be types that have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttribute is not "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" or "AttributeNamespace.ClassWithTwoAttributesWithNamedArguments" or "AttributeNamespace.ClassWithThreeAttributesWithNamedArguments" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttribute" should be types that have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1"" failed: + AttributeNamespace.ClassWithSingleAttribute is not "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" or "AttributeNamespace.ClassWithTwoAttributesWithNamedArguments" or "AttributeNamespace.ClassWithThreeAttributesWithNamedArguments" + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttribute" should be types that have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttribute is not "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" or "AttributeNamespace.ClassWithTwoAttributesWithNamedArguments" or "AttributeNamespace.ClassWithThreeAttributesWithNamedArguments" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttribute" should be types that have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1"" failed: + AttributeNamespace.ClassWithSingleAttribute is not "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" or "AttributeNamespace.ClassWithTwoAttributesWithNamedArguments" or "AttributeNamespace.ClassWithThreeAttributesWithNamedArguments" + + + ===== Violations with type arguments ===== +----- Conditions ----- + Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should have attribute "AttributeNamespace.Attribute1" with named arguments "InvalidName=AttributeNamespace.TypeArgument1" Result: False Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments does not have attribute "AttributeNamespace.Attribute1" with named arguments "InvalidName=AttributeNamespace.TypeArgument1" @@ -106,8 +332,122 @@ Message: +----- Predicates ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be Types that have attribute "AttributeNamespace.Attribute1" with named arguments "InvalidName=AttributeNamespace.TypeArgument1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not Types that have attribute "AttributeNamespace.Attribute1" with named arguments "InvalidName=AttributeNamespace.TypeArgument1" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be Types that have attribute "AttributeNamespace.Attribute1" with named arguments "InvalidName=AttributeNamespace.TypeArgument1"" failed: + AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not Types that have attribute "AttributeNamespace.Attribute1" with named arguments "InvalidName=AttributeNamespace.TypeArgument1" + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be Types that have attribute "AttributeNamespace.Attribute1" with named arguments "InvalidName=AttributeNamespace.TypeArgument1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not Types that have attribute "AttributeNamespace.Attribute1" with named arguments "InvalidName=AttributeNamespace.TypeArgument1" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be Types that have attribute "AttributeNamespace.Attribute1" with named arguments "InvalidName=AttributeNamespace.TypeArgument1"" failed: + AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not Types that have attribute "AttributeNamespace.Attribute1" with named arguments "InvalidName=AttributeNamespace.TypeArgument1" + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be Types that have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.UnusedTypeArgument" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not Types that have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.UnusedTypeArgument" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be Types that have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.UnusedTypeArgument"" failed: + AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not Types that have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.UnusedTypeArgument" + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be Types that have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.UnusedTypeArgument" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not Types that have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.UnusedTypeArgument" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be Types that have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.UnusedTypeArgument"" failed: + AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not Types that have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.UnusedTypeArgument" + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be Types that have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.UnusedTypeArgument" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not Types that have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.UnusedTypeArgument" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be Types that have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.UnusedTypeArgument"" failed: + AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not Types that have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.UnusedTypeArgument" + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be Types that have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.UnusedTypeArgument" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not Types that have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.UnusedTypeArgument" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be Types that have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.UnusedTypeArgument"" failed: + AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not Types that have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.UnusedTypeArgument" + + + +----- Predicates as conditions ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be types that have attribute "AttributeNamespace.Attribute1" with named arguments "InvalidName=AttributeNamespace.TypeArgument1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments does exist +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be types that have attribute "AttributeNamespace.Attribute1" with named arguments "InvalidName=AttributeNamespace.TypeArgument1"" failed: + AttributeNamespace.ClassWithSingleAttributeWithNamedArguments does exist + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be types that have attribute "AttributeNamespace.Attribute1" with named arguments "InvalidName=AttributeNamespace.TypeArgument1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments does exist +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be types that have attribute "AttributeNamespace.Attribute1" with named arguments "InvalidName=AttributeNamespace.TypeArgument1"" failed: + AttributeNamespace.ClassWithSingleAttributeWithNamedArguments does exist + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be types that have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.UnusedTypeArgument" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments does exist +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be types that have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.UnusedTypeArgument"" failed: + AttributeNamespace.ClassWithSingleAttributeWithNamedArguments does exist + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be types that have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.UnusedTypeArgument" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments does exist +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be types that have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.UnusedTypeArgument"" failed: + AttributeNamespace.ClassWithSingleAttributeWithNamedArguments does exist + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be types that have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.UnusedTypeArgument" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments does exist +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be types that have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.UnusedTypeArgument"" failed: + AttributeNamespace.ClassWithSingleAttributeWithNamedArguments does exist + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be types that have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.UnusedTypeArgument" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments does exist +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be types that have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.UnusedTypeArgument"" failed: + AttributeNamespace.ClassWithSingleAttributeWithNamedArguments does exist + + + ===== Violations with value arguments ===== +----- Conditions ----- + Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should have attribute "AttributeNamespace.Attribute1" with named arguments "InvalidName=Argument1" Result: False Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments does not have attribute "AttributeNamespace.Attribute1" with named arguments "InvalidName=Argument1" @@ -144,8 +484,86 @@ Message: +----- Predicates ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be Types that have attribute "AttributeNamespace.Attribute1" with named arguments "InvalidName=Argument1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not Types that have attribute "AttributeNamespace.Attribute1" with named arguments "InvalidName=Argument1" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be Types that have attribute "AttributeNamespace.Attribute1" with named arguments "InvalidName=Argument1"" failed: + AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not Types that have attribute "AttributeNamespace.Attribute1" with named arguments "InvalidName=Argument1" + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be Types that have attribute "AttributeNamespace.Attribute1" with named arguments "InvalidName=Argument1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not Types that have attribute "AttributeNamespace.Attribute1" with named arguments "InvalidName=Argument1" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be Types that have attribute "AttributeNamespace.Attribute1" with named arguments "InvalidName=Argument1"" failed: + AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not Types that have attribute "AttributeNamespace.Attribute1" with named arguments "InvalidName=Argument1" + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be Types that have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter2=NotTheValueOfAnyAttribute" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not Types that have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter2=NotTheValueOfAnyAttribute" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be Types that have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter2=NotTheValueOfAnyAttribute"" failed: + AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not Types that have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter2=NotTheValueOfAnyAttribute" + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be Types that have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter2=NotTheValueOfAnyAttribute" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not Types that have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter2=NotTheValueOfAnyAttribute" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be Types that have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter2=NotTheValueOfAnyAttribute"" failed: + AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not Types that have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter2=NotTheValueOfAnyAttribute" + + + +----- Predicates as conditions ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be types that have attribute "AttributeNamespace.Attribute1" with named arguments "InvalidName=Argument1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments does exist +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be types that have attribute "AttributeNamespace.Attribute1" with named arguments "InvalidName=Argument1"" failed: + AttributeNamespace.ClassWithSingleAttributeWithNamedArguments does exist + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be types that have attribute "AttributeNamespace.Attribute1" with named arguments "InvalidName=Argument1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments does exist +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be types that have attribute "AttributeNamespace.Attribute1" with named arguments "InvalidName=Argument1"" failed: + AttributeNamespace.ClassWithSingleAttributeWithNamedArguments does exist + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be types that have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter2=NotTheValueOfAnyAttribute" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments does exist +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be types that have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter2=NotTheValueOfAnyAttribute"" failed: + AttributeNamespace.ClassWithSingleAttributeWithNamedArguments does exist + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be types that have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter2=NotTheValueOfAnyAttribute" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments does exist +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be types that have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter2=NotTheValueOfAnyAttribute"" failed: + AttributeNamespace.ClassWithSingleAttributeWithNamedArguments does exist + + + ===== Unused attribute ===== +----- Conditions ----- + Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should have attribute "AttributeNamespace.UnusedAttribute" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" Result: False Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments does not have attribute "AttributeNamespace.UnusedAttribute" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" @@ -182,8 +600,86 @@ Message: +----- Predicates ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be Types that have attribute "AttributeNamespace.UnusedAttribute" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not Types that have attribute "AttributeNamespace.UnusedAttribute" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be Types that have attribute "AttributeNamespace.UnusedAttribute" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1"" failed: + AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not Types that have attribute "AttributeNamespace.UnusedAttribute" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be Types that have attribute "AttributeNamespace.UnusedAttribute" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not Types that have attribute "AttributeNamespace.UnusedAttribute" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be Types that have attribute "AttributeNamespace.UnusedAttribute" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1"" failed: + AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not Types that have attribute "AttributeNamespace.UnusedAttribute" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be Types that have attribute "AttributeNamespace.UnusedAttribute" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not Types that have attribute "AttributeNamespace.UnusedAttribute" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be Types that have attribute "AttributeNamespace.UnusedAttribute" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1"" failed: + AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not Types that have attribute "AttributeNamespace.UnusedAttribute" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be Types that have attribute "AttributeNamespace.UnusedAttribute" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not Types that have attribute "AttributeNamespace.UnusedAttribute" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be Types that have attribute "AttributeNamespace.UnusedAttribute" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1"" failed: + AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not Types that have attribute "AttributeNamespace.UnusedAttribute" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" + + + +----- Predicates as conditions ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be types that have attribute "AttributeNamespace.UnusedAttribute" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments does exist +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be types that have attribute "AttributeNamespace.UnusedAttribute" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1"" failed: + AttributeNamespace.ClassWithSingleAttributeWithNamedArguments does exist + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be types that have attribute "AttributeNamespace.UnusedAttribute" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments does exist +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be types that have attribute "AttributeNamespace.UnusedAttribute" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1"" failed: + AttributeNamespace.ClassWithSingleAttributeWithNamedArguments does exist + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be types that have attribute "AttributeNamespace.UnusedAttribute" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments does exist +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be types that have attribute "AttributeNamespace.UnusedAttribute" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1"" failed: + AttributeNamespace.ClassWithSingleAttributeWithNamedArguments does exist + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be types that have attribute "AttributeNamespace.UnusedAttribute" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments does exist +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be types that have attribute "AttributeNamespace.UnusedAttribute" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1"" failed: + AttributeNamespace.ClassWithSingleAttributeWithNamedArguments does exist + + + ===== Type outside of architecture ===== +----- Conditions ----- + Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should have attribute "TypeDependencyNamespace.BaseClass" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" Result: False Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments does not have attribute "TypeDependencyNamespace.BaseClass" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" @@ -193,7 +689,31 @@ Message: -===== Emtpy arguments ===== +----- Predicates ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be Types that have attribute "TypeDependencyNamespace.BaseClass" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not Types that have attribute "TypeDependencyNamespace.BaseClass" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be Types that have attribute "TypeDependencyNamespace.BaseClass" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1"" failed: + AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not Types that have attribute "TypeDependencyNamespace.BaseClass" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" + + + +----- Predicates as conditions ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be types that have attribute "TypeDependencyNamespace.BaseClass" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments does exist +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be types that have attribute "TypeDependencyNamespace.BaseClass" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1"" failed: + AttributeNamespace.ClassWithSingleAttributeWithNamedArguments does exist + + + +===== Empty arguments ===== + +----- Conditions ----- Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should have attribute "AttributeNamespace.Attribute1" Result: True @@ -207,8 +727,38 @@ Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments passe Message: All Evaluations passed +----- Predicates ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be Types that have attribute "AttributeNamespace.Attribute1" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be Types that have attribute "AttributeNamespace.Attribute1" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments passed +Message: +All Evaluations passed + +----- Predicates as conditions ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be types that have attribute "AttributeNamespace.Attribute1" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be types that have attribute "AttributeNamespace.Attribute1" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments passed +Message: +All Evaluations passed + ===== Multiple arguments ===== +----- Conditions ----- + Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" and "NamedParameter2=Argument1" Result: False Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments does not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" and "NamedParameter2=Argument1" @@ -245,8 +795,86 @@ Message: +----- Predicates ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be Types that have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" and "NamedPara... +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not Types that have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" and "NamedParameter2=Argument1" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be Types that have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" and "NamedPara..." failed: + AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not Types that have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" and "NamedParameter2=Argument1" + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be Types that have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" and "NamedPara... +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not Types that have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" and "NamedParameter2=Argument1" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be Types that have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" and "NamedPara..." failed: + AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not Types that have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" and "NamedParameter2=Argument1" + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be Types that have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" and "NamedPara... +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not Types that have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" and "NamedParameter2=Argument1" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be Types that have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" and "NamedPara..." failed: + AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not Types that have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" and "NamedParameter2=Argument1" + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be Types that have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" and "NamedPara... +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not Types that have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" and "NamedParameter2=Argument1" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be Types that have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" and "NamedPara..." failed: + AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not Types that have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" and "NamedParameter2=Argument1" + + + +----- Predicates as conditions ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be types that have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" and "NamedPara... +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments does exist +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be types that have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" and "NamedPara..." failed: + AttributeNamespace.ClassWithSingleAttributeWithNamedArguments does exist + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be types that have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" and "NamedPara... +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments does exist +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be types that have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" and "NamedPara..." failed: + AttributeNamespace.ClassWithSingleAttributeWithNamedArguments does exist + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be types that have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" and "NamedPara... +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments does exist +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be types that have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" and "NamedPara..." failed: + AttributeNamespace.ClassWithSingleAttributeWithNamedArguments does exist + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be types that have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" and "NamedPara... +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments does exist +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be types that have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" and "NamedPara..." failed: + AttributeNamespace.ClassWithSingleAttributeWithNamedArguments does exist + + + ===== Multiple inputs ===== +----- Conditions ----- + Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" or "AttributeNamespace.ClassWithTwoAttributesWithNamedArguments" should have attribute "AttributeNamespace.Attribute2" with named arguments "NamedParameter3=AttributeNamespace.TypeArgument2" Result: False Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments does not have attribute "AttributeNamespace.Attribute2" with named arguments "NamedParameter3=AttributeNamespace.TypeArgument2" @@ -291,3 +919,95 @@ Message: +----- Predicates ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" or "AttributeNamespace.ClassWithTwoAttributesWithNamedArguments" should be Types that have attribute "AttributeNamespace.Attribute2" with named arguments "NamedParameter3=AttributeNamespace.TypeArgument2" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not Types that have attribute "AttributeNamespace.Attribute2" with named arguments "NamedParameter3=AttributeNamespace.TypeArgument2" +Result: True +Description: AttributeNamespace.ClassWithTwoAttributesWithNamedArguments passed +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" or "AttributeNamespace.ClassWithTwoAttributesWithNamedArguments" should be Types that have attribute "AttributeNamespace.Attribute2" with named arguments "NamedParameter3=AttributeNamespace.TypeArgument2"" failed: + AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not Types that have attribute "AttributeNamespace.Attribute2" with named arguments "NamedParameter3=AttributeNamespace.TypeArgument2" + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" or "AttributeNamespace.ClassWithTwoAttributesWithNamedArguments" should be Types that have attribute "AttributeNamespace.Attribute2" with named arguments "NamedParameter3=AttributeNamespace.TypeArgument2" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not Types that have attribute "AttributeNamespace.Attribute2" with named arguments "NamedParameter3=AttributeNamespace.TypeArgument2" +Result: True +Description: AttributeNamespace.ClassWithTwoAttributesWithNamedArguments passed +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" or "AttributeNamespace.ClassWithTwoAttributesWithNamedArguments" should be Types that have attribute "AttributeNamespace.Attribute2" with named arguments "NamedParameter3=AttributeNamespace.TypeArgument2"" failed: + AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not Types that have attribute "AttributeNamespace.Attribute2" with named arguments "NamedParameter3=AttributeNamespace.TypeArgument2" + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" or "AttributeNamespace.ClassWithTwoAttributesWithNamedArguments" should be Types that have attribute "AttributeNamespace.Attribute2" with named arguments "NamedParameter3=AttributeNamespace.TypeArgument2" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not Types that have attribute "AttributeNamespace.Attribute2" with named arguments "NamedParameter3=AttributeNamespace.TypeArgument2" +Result: True +Description: AttributeNamespace.ClassWithTwoAttributesWithNamedArguments passed +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" or "AttributeNamespace.ClassWithTwoAttributesWithNamedArguments" should be Types that have attribute "AttributeNamespace.Attribute2" with named arguments "NamedParameter3=AttributeNamespace.TypeArgument2"" failed: + AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not Types that have attribute "AttributeNamespace.Attribute2" with named arguments "NamedParameter3=AttributeNamespace.TypeArgument2" + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" or "AttributeNamespace.ClassWithTwoAttributesWithNamedArguments" should be Types that have attribute "AttributeNamespace.Attribute2" with named arguments "NamedParameter3=AttributeNamespace.TypeArgument2" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not Types that have attribute "AttributeNamespace.Attribute2" with named arguments "NamedParameter3=AttributeNamespace.TypeArgument2" +Result: True +Description: AttributeNamespace.ClassWithTwoAttributesWithNamedArguments passed +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" or "AttributeNamespace.ClassWithTwoAttributesWithNamedArguments" should be Types that have attribute "AttributeNamespace.Attribute2" with named arguments "NamedParameter3=AttributeNamespace.TypeArgument2"" failed: + AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not Types that have attribute "AttributeNamespace.Attribute2" with named arguments "NamedParameter3=AttributeNamespace.TypeArgument2" + + + +----- Predicates as conditions ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" or "AttributeNamespace.ClassWithTwoAttributesWithNamedArguments" should be types that have attribute "AttributeNamespace.Attribute2" with named arguments "NamedParameter3=AttributeNamespace.TypeArgument2" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not "AttributeNamespace.ClassWithTwoAttributesWithNamedArguments" or "AttributeNamespace.ClassWithThreeAttributesWithNamedArguments" +Result: True +Description: AttributeNamespace.ClassWithTwoAttributesWithNamedArguments passed +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" or "AttributeNamespace.ClassWithTwoAttributesWithNamedArguments" should be types that have attribute "AttributeNamespace.Attribute2" with named arguments "NamedParameter3=AttributeNamespace.TypeArgument2"" failed: + AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not "AttributeNamespace.ClassWithTwoAttributesWithNamedArguments" or "AttributeNamespace.ClassWithThreeAttributesWithNamedArguments" + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" or "AttributeNamespace.ClassWithTwoAttributesWithNamedArguments" should be types that have attribute "AttributeNamespace.Attribute2" with named arguments "NamedParameter3=AttributeNamespace.TypeArgument2" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not "AttributeNamespace.ClassWithTwoAttributesWithNamedArguments" or "AttributeNamespace.ClassWithThreeAttributesWithNamedArguments" +Result: True +Description: AttributeNamespace.ClassWithTwoAttributesWithNamedArguments passed +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" or "AttributeNamespace.ClassWithTwoAttributesWithNamedArguments" should be types that have attribute "AttributeNamespace.Attribute2" with named arguments "NamedParameter3=AttributeNamespace.TypeArgument2"" failed: + AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not "AttributeNamespace.ClassWithTwoAttributesWithNamedArguments" or "AttributeNamespace.ClassWithThreeAttributesWithNamedArguments" + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" or "AttributeNamespace.ClassWithTwoAttributesWithNamedArguments" should be types that have attribute "AttributeNamespace.Attribute2" with named arguments "NamedParameter3=AttributeNamespace.TypeArgument2" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not "AttributeNamespace.ClassWithTwoAttributesWithNamedArguments" or "AttributeNamespace.ClassWithThreeAttributesWithNamedArguments" +Result: True +Description: AttributeNamespace.ClassWithTwoAttributesWithNamedArguments passed +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" or "AttributeNamespace.ClassWithTwoAttributesWithNamedArguments" should be types that have attribute "AttributeNamespace.Attribute2" with named arguments "NamedParameter3=AttributeNamespace.TypeArgument2"" failed: + AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not "AttributeNamespace.ClassWithTwoAttributesWithNamedArguments" or "AttributeNamespace.ClassWithThreeAttributesWithNamedArguments" + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" or "AttributeNamespace.ClassWithTwoAttributesWithNamedArguments" should be types that have attribute "AttributeNamespace.Attribute2" with named arguments "NamedParameter3=AttributeNamespace.TypeArgument2" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not "AttributeNamespace.ClassWithTwoAttributesWithNamedArguments" or "AttributeNamespace.ClassWithThreeAttributesWithNamedArguments" +Result: True +Description: AttributeNamespace.ClassWithTwoAttributesWithNamedArguments passed +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" or "AttributeNamespace.ClassWithTwoAttributesWithNamedArguments" should be types that have attribute "AttributeNamespace.Attribute2" with named arguments "NamedParameter3=AttributeNamespace.TypeArgument2"" failed: + AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not "AttributeNamespace.ClassWithTwoAttributesWithNamedArguments" or "AttributeNamespace.ClassWithThreeAttributesWithNamedArguments" + + + diff --git a/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.HaveNameTest.verified.txt b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.HaveNameTest.verified.txt index 06d62f034..d31f14a59 100644 --- a/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.HaveNameTest.verified.txt +++ b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.HaveNameTest.verified.txt @@ -1,5 +1,7 @@ ===== No violations ===== +----- Conditions ----- + Query: Types that are "TypeDependencyNamespace.BaseClass" should have name "BaseClass" Result: True Description: TypeDependencyNamespace.BaseClass passed @@ -48,8 +50,110 @@ Description: TypeDependencyNamespace.BaseClass passed Message: All Evaluations passed +----- Predicates ----- + +Query: Types that are "TypeDependencyNamespace.BaseClass" should be Types that have name "BaseClass" +Result: True +Description: TypeDependencyNamespace.BaseClass passed +Message: +All Evaluations passed + +Query: Types that are "TypeDependencyNamespace.BaseClass" should be Types that have name matching "^Base.*$" +Result: True +Description: TypeDependencyNamespace.BaseClass passed +Message: +All Evaluations passed + +Query: Types that are "TypeDependencyNamespace.BaseClass" should be Types that have full name "TypeDependencyNamespace.BaseClass" +Result: True +Description: TypeDependencyNamespace.BaseClass passed +Message: +All Evaluations passed + +Query: Types that are "TypeDependencyNamespace.BaseClass" should be Types that have full name matching "^.*\.Base.*$" +Result: True +Description: TypeDependencyNamespace.BaseClass passed +Message: +All Evaluations passed + +Query: Types that are "TypeDependencyNamespace.BaseClass" should be Types that have name containing "Base" +Result: True +Description: TypeDependencyNamespace.BaseClass passed +Message: +All Evaluations passed + +Query: Types that are "TypeDependencyNamespace.BaseClass" should be Types that have full name containing "TypeDependencyNamespace" +Result: True +Description: TypeDependencyNamespace.BaseClass passed +Message: +All Evaluations passed + +Query: Types that are "TypeDependencyNamespace.BaseClass" should be Types that have name starting with "Base" +Result: True +Description: TypeDependencyNamespace.BaseClass passed +Message: +All Evaluations passed + +Query: Types that are "TypeDependencyNamespace.BaseClass" should be Types that have name ending with "Class" +Result: True +Description: TypeDependencyNamespace.BaseClass passed +Message: +All Evaluations passed + +----- Predicates as conditions ----- + +Query: Types that are "TypeDependencyNamespace.BaseClass" should be types that have name "BaseClass" +Result: True +Description: TypeDependencyNamespace.BaseClass passed +Message: +All Evaluations passed + +Query: Types that are "TypeDependencyNamespace.BaseClass" should be types that have name matching "^Base.*$" +Result: True +Description: TypeDependencyNamespace.BaseClass passed +Message: +All Evaluations passed + +Query: Types that are "TypeDependencyNamespace.BaseClass" should be types that have full name "TypeDependencyNamespace.BaseClass" +Result: True +Description: TypeDependencyNamespace.BaseClass passed +Message: +All Evaluations passed + +Query: Types that are "TypeDependencyNamespace.BaseClass" should be types that have full name matching "^.*\.Base.*$" +Result: True +Description: TypeDependencyNamespace.BaseClass passed +Message: +All Evaluations passed + +Query: Types that are "TypeDependencyNamespace.BaseClass" should be types that have name containing "Base" +Result: True +Description: TypeDependencyNamespace.BaseClass passed +Message: +All Evaluations passed + +Query: Types that are "TypeDependencyNamespace.BaseClass" should be types that have full name containing "TypeDependencyNamespace" +Result: True +Description: TypeDependencyNamespace.BaseClass passed +Message: +All Evaluations passed + +Query: Types that are "TypeDependencyNamespace.BaseClass" should be types that have name starting with "Base" +Result: True +Description: TypeDependencyNamespace.BaseClass passed +Message: +All Evaluations passed + +Query: Types that are "TypeDependencyNamespace.BaseClass" should be types that have name ending with "Class" +Result: True +Description: TypeDependencyNamespace.BaseClass passed +Message: +All Evaluations passed + ===== Violations ===== +----- Conditions ----- + Query: Types that are "TypeDependencyNamespace.BaseClass" should have name "TypeDependencyNamespace.BaseClass" Result: False Description: TypeDependencyNamespace.BaseClass does have name BaseClass @@ -122,3 +226,103 @@ Message: +----- Predicates ----- + +Query: Types that are "TypeDependencyNamespace.BaseClass" should be Types that have name "BaseClass" +Result: True +Description: TypeDependencyNamespace.BaseClass passed +Message: +All Evaluations passed + +Query: Types that are "TypeDependencyNamespace.BaseClass" should be Types that have name matching "^Base.*$" +Result: True +Description: TypeDependencyNamespace.BaseClass passed +Message: +All Evaluations passed + +Query: Types that are "TypeDependencyNamespace.BaseClass" should be Types that have full name "TypeDependencyNamespace.BaseClass" +Result: True +Description: TypeDependencyNamespace.BaseClass passed +Message: +All Evaluations passed + +Query: Types that are "TypeDependencyNamespace.BaseClass" should be Types that have full name matching "^.*\.Base.*$" +Result: True +Description: TypeDependencyNamespace.BaseClass passed +Message: +All Evaluations passed + +Query: Types that are "TypeDependencyNamespace.BaseClass" should be Types that have name containing "Base" +Result: True +Description: TypeDependencyNamespace.BaseClass passed +Message: +All Evaluations passed + +Query: Types that are "TypeDependencyNamespace.BaseClass" should be Types that have full name containing "TypeDependencyNamespace" +Result: True +Description: TypeDependencyNamespace.BaseClass passed +Message: +All Evaluations passed + +Query: Types that are "TypeDependencyNamespace.BaseClass" should be Types that have name starting with "Base" +Result: True +Description: TypeDependencyNamespace.BaseClass passed +Message: +All Evaluations passed + +Query: Types that are "TypeDependencyNamespace.BaseClass" should be Types that have name ending with "Class" +Result: True +Description: TypeDependencyNamespace.BaseClass passed +Message: +All Evaluations passed + +----- Predicates as conditions ----- + +Query: Types that are "TypeDependencyNamespace.BaseClass" should be types that have name "BaseClass" +Result: True +Description: TypeDependencyNamespace.BaseClass passed +Message: +All Evaluations passed + +Query: Types that are "TypeDependencyNamespace.BaseClass" should be types that have name matching "^Base.*$" +Result: True +Description: TypeDependencyNamespace.BaseClass passed +Message: +All Evaluations passed + +Query: Types that are "TypeDependencyNamespace.BaseClass" should be types that have full name "TypeDependencyNamespace.BaseClass" +Result: True +Description: TypeDependencyNamespace.BaseClass passed +Message: +All Evaluations passed + +Query: Types that are "TypeDependencyNamespace.BaseClass" should be types that have full name matching "^.*\.Base.*$" +Result: True +Description: TypeDependencyNamespace.BaseClass passed +Message: +All Evaluations passed + +Query: Types that are "TypeDependencyNamespace.BaseClass" should be types that have name containing "Base" +Result: True +Description: TypeDependencyNamespace.BaseClass passed +Message: +All Evaluations passed + +Query: Types that are "TypeDependencyNamespace.BaseClass" should be types that have full name containing "TypeDependencyNamespace" +Result: True +Description: TypeDependencyNamespace.BaseClass passed +Message: +All Evaluations passed + +Query: Types that are "TypeDependencyNamespace.BaseClass" should be types that have name starting with "Base" +Result: True +Description: TypeDependencyNamespace.BaseClass passed +Message: +All Evaluations passed + +Query: Types that are "TypeDependencyNamespace.BaseClass" should be types that have name ending with "Class" +Result: True +Description: TypeDependencyNamespace.BaseClass passed +Message: +All Evaluations passed + diff --git a/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.NotBeTest.verified.txt b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.NotBeTest.verified.txt index 03655ed70..3799c65a5 100644 --- a/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.NotBeTest.verified.txt +++ b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.NotBeTest.verified.txt @@ -1,5 +1,7 @@ ===== No violations ===== +----- Conditions ----- + Query: Types that depend on "TypeDependencyNamespace.BaseClass" should not be "TypeDependencyNamespace.ClassWithoutDependencies" Result: True Description: TypeDependencyNamespace.ChildClass passed @@ -40,8 +42,94 @@ Description: TypeDependencyNamespace.OtherChildClass passed Message: All Evaluations passed +----- Predicates ----- + +Query: Types that depend on "TypeDependencyNamespace.BaseClass" should be Types that are not "TypeDependencyNamespace.ClassWithoutDependencies" +Result: True +Description: TypeDependencyNamespace.ChildClass passed +Result: True +Description: TypeDependencyNamespace.OtherChildClass passed +Message: +All Evaluations passed + +Query: Types that depend on "TypeDependencyNamespace.BaseClass" should be Types that are not "TypeDependencyNamespace.ClassWithoutDependencies" +Result: True +Description: TypeDependencyNamespace.ChildClass passed +Result: True +Description: TypeDependencyNamespace.OtherChildClass passed +Message: +All Evaluations passed + +Query: Types that depend on "TypeDependencyNamespace.BaseClass" should be Types that are not "TypeDependencyNamespace.ClassWithoutDependencies" +Result: True +Description: TypeDependencyNamespace.ChildClass passed +Result: True +Description: TypeDependencyNamespace.OtherChildClass passed +Message: +All Evaluations passed + +Query: Types that depend on "TypeDependencyNamespace.BaseClass" should be Types that are not "TypeDependencyNamespace.ClassWithoutDependencies" +Result: True +Description: TypeDependencyNamespace.ChildClass passed +Result: True +Description: TypeDependencyNamespace.OtherChildClass passed +Message: +All Evaluations passed + +Query: Types that depend on "TypeDependencyNamespace.BaseClass" should be Types that are not "TypeDependencyNamespace.ClassWithoutDependencies" +Result: True +Description: TypeDependencyNamespace.ChildClass passed +Result: True +Description: TypeDependencyNamespace.OtherChildClass passed +Message: +All Evaluations passed + +----- Predicates as conditions ----- + +Query: Types that depend on "TypeDependencyNamespace.BaseClass" should be types that are not "TypeDependencyNamespace.ClassWithoutDependencies" +Result: True +Description: TypeDependencyNamespace.ChildClass passed +Result: True +Description: TypeDependencyNamespace.OtherChildClass passed +Message: +All Evaluations passed + +Query: Types that depend on "TypeDependencyNamespace.BaseClass" should be types that are not "TypeDependencyNamespace.ClassWithoutDependencies" +Result: True +Description: TypeDependencyNamespace.ChildClass passed +Result: True +Description: TypeDependencyNamespace.OtherChildClass passed +Message: +All Evaluations passed + +Query: Types that depend on "TypeDependencyNamespace.BaseClass" should be types that are not Classes that are "TypeDependencyNamespace.ClassWithoutDependencies" +Result: True +Description: TypeDependencyNamespace.ChildClass passed +Result: True +Description: TypeDependencyNamespace.OtherChildClass passed +Message: +All Evaluations passed + +Query: Types that depend on "TypeDependencyNamespace.BaseClass" should be types that are not "TypeDependencyNamespace.ClassWithoutDependencies" +Result: True +Description: TypeDependencyNamespace.ChildClass passed +Result: True +Description: TypeDependencyNamespace.OtherChildClass passed +Message: +All Evaluations passed + +Query: Types that depend on "TypeDependencyNamespace.BaseClass" should be types that are not "TypeDependencyNamespace.ClassWithoutDependencies" +Result: True +Description: TypeDependencyNamespace.ChildClass passed +Result: True +Description: TypeDependencyNamespace.OtherChildClass passed +Message: +All Evaluations passed + ===== Violations ===== +----- Conditions ----- + Query: Types that depend on "TypeDependencyNamespace.BaseClass" should not be "TypeDependencyNamespace.ChildClass" Result: False Description: TypeDependencyNamespace.ChildClass is "TypeDependencyNamespace.ChildClass" @@ -97,8 +185,124 @@ Message: +----- Predicates ----- + +Query: Types that depend on "TypeDependencyNamespace.BaseClass" should be Types that are not "TypeDependencyNamespace.ChildClass" +Result: False +Description: TypeDependencyNamespace.ChildClass is not Types that are not "TypeDependencyNamespace.ChildClass" +Result: True +Description: TypeDependencyNamespace.OtherChildClass passed +Message: +"Types that depend on "TypeDependencyNamespace.BaseClass" should be Types that are not "TypeDependencyNamespace.ChildClass"" failed: + TypeDependencyNamespace.ChildClass is not Types that are not "TypeDependencyNamespace.ChildClass" + + + +Query: Types that depend on "TypeDependencyNamespace.BaseClass" should be Types that are not "TypeDependencyNamespace.ChildClass" +Result: False +Description: TypeDependencyNamespace.ChildClass is not Types that are not "TypeDependencyNamespace.ChildClass" +Result: True +Description: TypeDependencyNamespace.OtherChildClass passed +Message: +"Types that depend on "TypeDependencyNamespace.BaseClass" should be Types that are not "TypeDependencyNamespace.ChildClass"" failed: + TypeDependencyNamespace.ChildClass is not Types that are not "TypeDependencyNamespace.ChildClass" + + + +Query: Types that depend on "TypeDependencyNamespace.BaseClass" should be Types that are not Classes that are "TypeDependencyNamespace.ChildClass" +Result: False +Description: TypeDependencyNamespace.ChildClass is not Types that are not Classes that are "TypeDependencyNamespace.ChildClass" +Result: True +Description: TypeDependencyNamespace.OtherChildClass passed +Message: +"Types that depend on "TypeDependencyNamespace.BaseClass" should be Types that are not Classes that are "TypeDependencyNamespace.ChildClass"" failed: + TypeDependencyNamespace.ChildClass is not Types that are not Classes that are "TypeDependencyNamespace.ChildClass" + + + +Query: Types that depend on "TypeDependencyNamespace.BaseClass" should be Types that are not "TypeDependencyNamespace.ChildClass" +Result: False +Description: TypeDependencyNamespace.ChildClass is not Types that are not "TypeDependencyNamespace.ChildClass" +Result: True +Description: TypeDependencyNamespace.OtherChildClass passed +Message: +"Types that depend on "TypeDependencyNamespace.BaseClass" should be Types that are not "TypeDependencyNamespace.ChildClass"" failed: + TypeDependencyNamespace.ChildClass is not Types that are not "TypeDependencyNamespace.ChildClass" + + + +Query: Types that depend on "TypeDependencyNamespace.BaseClass" should be Types that are not "TypeDependencyNamespace.ChildClass" +Result: False +Description: TypeDependencyNamespace.ChildClass is not Types that are not "TypeDependencyNamespace.ChildClass" +Result: True +Description: TypeDependencyNamespace.OtherChildClass passed +Message: +"Types that depend on "TypeDependencyNamespace.BaseClass" should be Types that are not "TypeDependencyNamespace.ChildClass"" failed: + TypeDependencyNamespace.ChildClass is not Types that are not "TypeDependencyNamespace.ChildClass" + + + +----- Predicates as conditions ----- + +Query: Types that depend on "TypeDependencyNamespace.BaseClass" should be types that are not "TypeDependencyNamespace.ChildClass" +Result: False +Description: TypeDependencyNamespace.ChildClass is not "TypeDependencyNamespace.BaseClass" or "TypeDependencyNamespace.OtherChildClass" or "TypeDependencyNamespace.BaseClassWithMember" or "TypeDependencyNamespace.ChildClassWithMember" or "TypeDependencyNamespace.OtherChildClassWithMember" or "TypeDependencyNamespace.BaseClassWithMultipleDependencies" or "TypeDependencyNamespace.ChildClass1" or "TypeDependencyNamespace.ChildClass2" or "TypeDependencyNamespace.OtherBaseClass" or "TypeDependencyNamespace.ClassWithMultipleDependencies" or "TypeDependencyNamespace.GenericBaseClass`1" or "TypeDependencyNamespace.ChildClassOfGeneric" or "TypeDependencyNamespace.ClassWithoutDependencies" or "TypeDependencyNamespace.OtherClassWithoutDependencies" or "TypeDependencyNamespace.Issue351" or "MethodDependencyNamespace.MethodDependencyClass" or "System.Object" or "System.Void" or "System.String" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Int32" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" or "System.Collections.Generic.List`1" or "System.Func`2" or "System.IntPtr" or "System.Linq.Enumerable" or "System.Collections.Generic.IEnumerable`1" or "System.Linq.IGrouping`2" or "System.Collections.Generic.IReadOnlyCollection`1" or "System.Collections.Generic.Dictionary`2" +Result: True +Description: TypeDependencyNamespace.OtherChildClass passed +Message: +"Types that depend on "TypeDependencyNamespace.BaseClass" should be types that are not "TypeDependencyNamespace.ChildClass"" failed: + TypeDependencyNamespace.ChildClass is not "TypeDependencyNamespace.BaseClass" or "TypeDependencyNamespace.OtherChildClass" or "TypeDependencyNamespace.BaseClassWithMember" or "TypeDependencyNamespace.ChildClassWithMember" or "TypeDependencyNamespace.OtherChildClassWithMember" or "TypeDependencyNamespace.BaseClassWithMultipleDependencies" or "TypeDependencyNamespace.ChildClass1" or "TypeDependencyNamespace.ChildClass2" or "TypeDependencyNamespace.OtherBaseClass" or "TypeDependencyNamespace.ClassWithMultipleDependencies" or "TypeDependencyNamespace.GenericBaseClass`1" or "TypeDependencyNamespace.ChildClassOfGeneric" or "TypeDependencyNamespace.ClassWithoutDependencies" or "TypeDependencyNamespace.OtherClassWithoutDependencies" or "TypeDependencyNamespace.Issue351" or "MethodDependencyNamespace.MethodDependencyClass" or "System.Object" or "System.Void" or "System.String" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Int32" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" or "System.Collections.Generic.List`1" or "System.Func`2" or "System.IntPtr" or "System.Linq.Enumerable" or "System.Collections.Generic.IEnumerable`1" or "System.Linq.IGrouping`2" or "System.Collections.Generic.IReadOnlyCollection`1" or "System.Collections.Generic.Dictionary`2" + + + +Query: Types that depend on "TypeDependencyNamespace.BaseClass" should be types that are not "TypeDependencyNamespace.ChildClass" +Result: False +Description: TypeDependencyNamespace.ChildClass is not "TypeDependencyNamespace.BaseClass" or "TypeDependencyNamespace.OtherChildClass" or "TypeDependencyNamespace.BaseClassWithMember" or "TypeDependencyNamespace.ChildClassWithMember" or "TypeDependencyNamespace.OtherChildClassWithMember" or "TypeDependencyNamespace.BaseClassWithMultipleDependencies" or "TypeDependencyNamespace.ChildClass1" or "TypeDependencyNamespace.ChildClass2" or "TypeDependencyNamespace.OtherBaseClass" or "TypeDependencyNamespace.ClassWithMultipleDependencies" or "TypeDependencyNamespace.GenericBaseClass`1" or "TypeDependencyNamespace.ChildClassOfGeneric" or "TypeDependencyNamespace.ClassWithoutDependencies" or "TypeDependencyNamespace.OtherClassWithoutDependencies" or "TypeDependencyNamespace.Issue351" or "MethodDependencyNamespace.MethodDependencyClass" or "System.Object" or "System.Void" or "System.String" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Int32" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" or "System.Collections.Generic.List`1" or "System.Func`2" or "System.IntPtr" or "System.Linq.Enumerable" or "System.Collections.Generic.IEnumerable`1" or "System.Linq.IGrouping`2" or "System.Collections.Generic.IReadOnlyCollection`1" or "System.Collections.Generic.Dictionary`2" +Result: True +Description: TypeDependencyNamespace.OtherChildClass passed +Message: +"Types that depend on "TypeDependencyNamespace.BaseClass" should be types that are not "TypeDependencyNamespace.ChildClass"" failed: + TypeDependencyNamespace.ChildClass is not "TypeDependencyNamespace.BaseClass" or "TypeDependencyNamespace.OtherChildClass" or "TypeDependencyNamespace.BaseClassWithMember" or "TypeDependencyNamespace.ChildClassWithMember" or "TypeDependencyNamespace.OtherChildClassWithMember" or "TypeDependencyNamespace.BaseClassWithMultipleDependencies" or "TypeDependencyNamespace.ChildClass1" or "TypeDependencyNamespace.ChildClass2" or "TypeDependencyNamespace.OtherBaseClass" or "TypeDependencyNamespace.ClassWithMultipleDependencies" or "TypeDependencyNamespace.GenericBaseClass`1" or "TypeDependencyNamespace.ChildClassOfGeneric" or "TypeDependencyNamespace.ClassWithoutDependencies" or "TypeDependencyNamespace.OtherClassWithoutDependencies" or "TypeDependencyNamespace.Issue351" or "MethodDependencyNamespace.MethodDependencyClass" or "System.Object" or "System.Void" or "System.String" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Int32" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" or "System.Collections.Generic.List`1" or "System.Func`2" or "System.IntPtr" or "System.Linq.Enumerable" or "System.Collections.Generic.IEnumerable`1" or "System.Linq.IGrouping`2" or "System.Collections.Generic.IReadOnlyCollection`1" or "System.Collections.Generic.Dictionary`2" + + + +Query: Types that depend on "TypeDependencyNamespace.BaseClass" should be types that are not Classes that are "TypeDependencyNamespace.ChildClass" +Result: False +Description: TypeDependencyNamespace.ChildClass is not "TypeDependencyNamespace.BaseClass" or "TypeDependencyNamespace.OtherChildClass" or "TypeDependencyNamespace.BaseClassWithMember" or "TypeDependencyNamespace.ChildClassWithMember" or "TypeDependencyNamespace.OtherChildClassWithMember" or "TypeDependencyNamespace.BaseClassWithMultipleDependencies" or "TypeDependencyNamespace.ChildClass1" or "TypeDependencyNamespace.ChildClass2" or "TypeDependencyNamespace.OtherBaseClass" or "TypeDependencyNamespace.ClassWithMultipleDependencies" or "TypeDependencyNamespace.GenericBaseClass`1" or "TypeDependencyNamespace.ChildClassOfGeneric" or "TypeDependencyNamespace.ClassWithoutDependencies" or "TypeDependencyNamespace.OtherClassWithoutDependencies" or "TypeDependencyNamespace.Issue351" or "MethodDependencyNamespace.MethodDependencyClass" or "System.Object" or "System.Void" or "System.String" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Int32" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" or "System.Collections.Generic.List`1" or "System.Func`2" or "System.IntPtr" or "System.Linq.Enumerable" or "System.Collections.Generic.IEnumerable`1" or "System.Linq.IGrouping`2" or "System.Collections.Generic.IReadOnlyCollection`1" or "System.Collections.Generic.Dictionary`2" +Result: True +Description: TypeDependencyNamespace.OtherChildClass passed +Message: +"Types that depend on "TypeDependencyNamespace.BaseClass" should be types that are not Classes that are "TypeDependencyNamespace.ChildClass"" failed: + TypeDependencyNamespace.ChildClass is not "TypeDependencyNamespace.BaseClass" or "TypeDependencyNamespace.OtherChildClass" or "TypeDependencyNamespace.BaseClassWithMember" or "TypeDependencyNamespace.ChildClassWithMember" or "TypeDependencyNamespace.OtherChildClassWithMember" or "TypeDependencyNamespace.BaseClassWithMultipleDependencies" or "TypeDependencyNamespace.ChildClass1" or "TypeDependencyNamespace.ChildClass2" or "TypeDependencyNamespace.OtherBaseClass" or "TypeDependencyNamespace.ClassWithMultipleDependencies" or "TypeDependencyNamespace.GenericBaseClass`1" or "TypeDependencyNamespace.ChildClassOfGeneric" or "TypeDependencyNamespace.ClassWithoutDependencies" or "TypeDependencyNamespace.OtherClassWithoutDependencies" or "TypeDependencyNamespace.Issue351" or "MethodDependencyNamespace.MethodDependencyClass" or "System.Object" or "System.Void" or "System.String" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Int32" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" or "System.Collections.Generic.List`1" or "System.Func`2" or "System.IntPtr" or "System.Linq.Enumerable" or "System.Collections.Generic.IEnumerable`1" or "System.Linq.IGrouping`2" or "System.Collections.Generic.IReadOnlyCollection`1" or "System.Collections.Generic.Dictionary`2" + + + +Query: Types that depend on "TypeDependencyNamespace.BaseClass" should be types that are not "TypeDependencyNamespace.ChildClass" +Result: False +Description: TypeDependencyNamespace.ChildClass is not "TypeDependencyNamespace.BaseClass" or "TypeDependencyNamespace.OtherChildClass" or "TypeDependencyNamespace.BaseClassWithMember" or "TypeDependencyNamespace.ChildClassWithMember" or "TypeDependencyNamespace.OtherChildClassWithMember" or "TypeDependencyNamespace.BaseClassWithMultipleDependencies" or "TypeDependencyNamespace.ChildClass1" or "TypeDependencyNamespace.ChildClass2" or "TypeDependencyNamespace.OtherBaseClass" or "TypeDependencyNamespace.ClassWithMultipleDependencies" or "TypeDependencyNamespace.GenericBaseClass`1" or "TypeDependencyNamespace.ChildClassOfGeneric" or "TypeDependencyNamespace.ClassWithoutDependencies" or "TypeDependencyNamespace.OtherClassWithoutDependencies" or "TypeDependencyNamespace.Issue351" or "MethodDependencyNamespace.MethodDependencyClass" or "System.Object" or "System.Void" or "System.String" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Int32" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" or "System.Collections.Generic.List`1" or "System.Func`2" or "System.IntPtr" or "System.Linq.Enumerable" or "System.Collections.Generic.IEnumerable`1" or "System.Linq.IGrouping`2" or "System.Collections.Generic.IReadOnlyCollection`1" or "System.Collections.Generic.Dictionary`2" +Result: True +Description: TypeDependencyNamespace.OtherChildClass passed +Message: +"Types that depend on "TypeDependencyNamespace.BaseClass" should be types that are not "TypeDependencyNamespace.ChildClass"" failed: + TypeDependencyNamespace.ChildClass is not "TypeDependencyNamespace.BaseClass" or "TypeDependencyNamespace.OtherChildClass" or "TypeDependencyNamespace.BaseClassWithMember" or "TypeDependencyNamespace.ChildClassWithMember" or "TypeDependencyNamespace.OtherChildClassWithMember" or "TypeDependencyNamespace.BaseClassWithMultipleDependencies" or "TypeDependencyNamespace.ChildClass1" or "TypeDependencyNamespace.ChildClass2" or "TypeDependencyNamespace.OtherBaseClass" or "TypeDependencyNamespace.ClassWithMultipleDependencies" or "TypeDependencyNamespace.GenericBaseClass`1" or "TypeDependencyNamespace.ChildClassOfGeneric" or "TypeDependencyNamespace.ClassWithoutDependencies" or "TypeDependencyNamespace.OtherClassWithoutDependencies" or "TypeDependencyNamespace.Issue351" or "MethodDependencyNamespace.MethodDependencyClass" or "System.Object" or "System.Void" or "System.String" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Int32" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" or "System.Collections.Generic.List`1" or "System.Func`2" or "System.IntPtr" or "System.Linq.Enumerable" or "System.Collections.Generic.IEnumerable`1" or "System.Linq.IGrouping`2" or "System.Collections.Generic.IReadOnlyCollection`1" or "System.Collections.Generic.Dictionary`2" + + + +Query: Types that depend on "TypeDependencyNamespace.BaseClass" should be types that are not "TypeDependencyNamespace.ChildClass" +Result: False +Description: TypeDependencyNamespace.ChildClass is not "TypeDependencyNamespace.BaseClass" or "TypeDependencyNamespace.OtherChildClass" or "TypeDependencyNamespace.BaseClassWithMember" or "TypeDependencyNamespace.ChildClassWithMember" or "TypeDependencyNamespace.OtherChildClassWithMember" or "TypeDependencyNamespace.BaseClassWithMultipleDependencies" or "TypeDependencyNamespace.ChildClass1" or "TypeDependencyNamespace.ChildClass2" or "TypeDependencyNamespace.OtherBaseClass" or "TypeDependencyNamespace.ClassWithMultipleDependencies" or "TypeDependencyNamespace.GenericBaseClass`1" or "TypeDependencyNamespace.ChildClassOfGeneric" or "TypeDependencyNamespace.ClassWithoutDependencies" or "TypeDependencyNamespace.OtherClassWithoutDependencies" or "TypeDependencyNamespace.Issue351" or "MethodDependencyNamespace.MethodDependencyClass" or "System.Object" or "System.Void" or "System.String" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Int32" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" or "System.Collections.Generic.List`1" or "System.Func`2" or "System.IntPtr" or "System.Linq.Enumerable" or "System.Collections.Generic.IEnumerable`1" or "System.Linq.IGrouping`2" or "System.Collections.Generic.IReadOnlyCollection`1" or "System.Collections.Generic.Dictionary`2" +Result: True +Description: TypeDependencyNamespace.OtherChildClass passed +Message: +"Types that depend on "TypeDependencyNamespace.BaseClass" should be types that are not "TypeDependencyNamespace.ChildClass"" failed: + TypeDependencyNamespace.ChildClass is not "TypeDependencyNamespace.BaseClass" or "TypeDependencyNamespace.OtherChildClass" or "TypeDependencyNamespace.BaseClassWithMember" or "TypeDependencyNamespace.ChildClassWithMember" or "TypeDependencyNamespace.OtherChildClassWithMember" or "TypeDependencyNamespace.BaseClassWithMultipleDependencies" or "TypeDependencyNamespace.ChildClass1" or "TypeDependencyNamespace.ChildClass2" or "TypeDependencyNamespace.OtherBaseClass" or "TypeDependencyNamespace.ClassWithMultipleDependencies" or "TypeDependencyNamespace.GenericBaseClass`1" or "TypeDependencyNamespace.ChildClassOfGeneric" or "TypeDependencyNamespace.ClassWithoutDependencies" or "TypeDependencyNamespace.OtherClassWithoutDependencies" or "TypeDependencyNamespace.Issue351" or "MethodDependencyNamespace.MethodDependencyClass" or "System.Object" or "System.Void" or "System.String" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Int32" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" or "System.Collections.Generic.List`1" or "System.Func`2" or "System.IntPtr" or "System.Linq.Enumerable" or "System.Collections.Generic.IEnumerable`1" or "System.Linq.IGrouping`2" or "System.Collections.Generic.IReadOnlyCollection`1" or "System.Collections.Generic.Dictionary`2" + + + ===== Empty arguments ===== +----- Conditions ----- + Query: Types that depend on "TypeDependencyNamespace.BaseClass" should exist Result: True Description: TypeDependencyNamespace.ChildClass passed @@ -123,8 +327,62 @@ Description: TypeDependencyNamespace.OtherChildClass passed Message: All Evaluations passed +----- Predicates ----- + +Query: Types that depend on "TypeDependencyNamespace.BaseClass" should be Types that are not no object (always true) +Result: True +Description: TypeDependencyNamespace.ChildClass passed +Result: True +Description: TypeDependencyNamespace.OtherChildClass passed +Message: +All Evaluations passed + +Query: Types that depend on "TypeDependencyNamespace.BaseClass" should be Types that are not no types (always true) +Result: True +Description: TypeDependencyNamespace.ChildClass passed +Result: True +Description: TypeDependencyNamespace.OtherChildClass passed +Message: +All Evaluations passed + +Query: Types that depend on "TypeDependencyNamespace.BaseClass" should be Types that are not Classes that have full name "NotTheNameOfAnyObject" +Result: True +Description: TypeDependencyNamespace.ChildClass passed +Result: True +Description: TypeDependencyNamespace.OtherChildClass passed +Message: +All Evaluations passed + +----- Predicates as conditions ----- + +Query: Types that depend on "TypeDependencyNamespace.BaseClass" should be types that are not no object (always true) +Result: True +Description: TypeDependencyNamespace.ChildClass passed +Result: True +Description: TypeDependencyNamespace.OtherChildClass passed +Message: +All Evaluations passed + +Query: Types that depend on "TypeDependencyNamespace.BaseClass" should be types that are not no types (always true) +Result: True +Description: TypeDependencyNamespace.ChildClass passed +Result: True +Description: TypeDependencyNamespace.OtherChildClass passed +Message: +All Evaluations passed + +Query: Types that depend on "TypeDependencyNamespace.BaseClass" should be types that are not Classes that have full name "NotTheNameOfAnyObject" +Result: True +Description: TypeDependencyNamespace.ChildClass passed +Result: True +Description: TypeDependencyNamespace.OtherChildClass passed +Message: +All Evaluations passed + ===== Multiple arguments ===== +----- Conditions ----- + Query: Types that depend on "TypeDependencyNamespace.BaseClass" should not be "TypeDependencyNamespace.ClassWithoutDependencies" or "TypeDependencyNamespace.BaseClass" Result: True Description: TypeDependencyNamespace.ChildClass passed @@ -157,3 +415,71 @@ Description: TypeDependencyNamespace.OtherChildClass passed Message: All Evaluations passed +----- Predicates ----- + +Query: Types that depend on "TypeDependencyNamespace.BaseClass" should be Types that are not "TypeDependencyNamespace.ClassWithoutDependencies" or "TypeDependencyNamespace.BaseClass" +Result: True +Description: TypeDependencyNamespace.ChildClass passed +Result: True +Description: TypeDependencyNamespace.OtherChildClass passed +Message: +All Evaluations passed + +Query: Types that depend on "TypeDependencyNamespace.BaseClass" should be Types that are not "TypeDependencyNamespace.ClassWithoutDependencies" or "TypeDependencyNamespace.BaseClass" +Result: True +Description: TypeDependencyNamespace.ChildClass passed +Result: True +Description: TypeDependencyNamespace.OtherChildClass passed +Message: +All Evaluations passed + +Query: Types that depend on "TypeDependencyNamespace.BaseClass" should be Types that are not "TypeDependencyNamespace.ClassWithoutDependencies" or "TypeDependencyNamespace.BaseClass" +Result: True +Description: TypeDependencyNamespace.ChildClass passed +Result: True +Description: TypeDependencyNamespace.OtherChildClass passed +Message: +All Evaluations passed + +Query: Types that depend on "TypeDependencyNamespace.BaseClass" should be Types that are not "TypeDependencyNamespace.ClassWithoutDependencies" or "TypeDependencyNamespace.BaseClass" +Result: True +Description: TypeDependencyNamespace.ChildClass passed +Result: True +Description: TypeDependencyNamespace.OtherChildClass passed +Message: +All Evaluations passed + +----- Predicates as conditions ----- + +Query: Types that depend on "TypeDependencyNamespace.BaseClass" should be types that are not "TypeDependencyNamespace.ClassWithoutDependencies" or "TypeDependencyNamespace.BaseClass" +Result: True +Description: TypeDependencyNamespace.ChildClass passed +Result: True +Description: TypeDependencyNamespace.OtherChildClass passed +Message: +All Evaluations passed + +Query: Types that depend on "TypeDependencyNamespace.BaseClass" should be types that are not "TypeDependencyNamespace.ClassWithoutDependencies" or "TypeDependencyNamespace.BaseClass" +Result: True +Description: TypeDependencyNamespace.ChildClass passed +Result: True +Description: TypeDependencyNamespace.OtherChildClass passed +Message: +All Evaluations passed + +Query: Types that depend on "TypeDependencyNamespace.BaseClass" should be types that are not "TypeDependencyNamespace.ClassWithoutDependencies" or "TypeDependencyNamespace.BaseClass" +Result: True +Description: TypeDependencyNamespace.ChildClass passed +Result: True +Description: TypeDependencyNamespace.OtherChildClass passed +Message: +All Evaluations passed + +Query: Types that depend on "TypeDependencyNamespace.BaseClass" should be types that are not "TypeDependencyNamespace.ClassWithoutDependencies" or "TypeDependencyNamespace.BaseClass" +Result: True +Description: TypeDependencyNamespace.ChildClass passed +Result: True +Description: TypeDependencyNamespace.OtherChildClass passed +Message: +All Evaluations passed + diff --git a/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.NotCallAnyTest.verified.txt b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.NotCallAnyTest.verified.txt index 7d5273f79..9dc359cf6 100644 --- a/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.NotCallAnyTest.verified.txt +++ b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.NotCallAnyTest.verified.txt @@ -1,5 +1,7 @@ ===== No violations ===== +----- Conditions ----- + Query: Method members that are "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithSingleDependency()" should not call any "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithoutDependencies()" Result: True Description: System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithSingleDependency() passed @@ -18,8 +20,50 @@ Description: System.Void MethodDependencyNamespace.MethodDependencyClass::Method Message: All Evaluations passed +----- Predicates ----- + +Query: Method members that are "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithSingleDependency()" should be Method members that do not call "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithoutDependencies()" +Result: True +Description: System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithSingleDependency() passed +Message: +All Evaluations passed + +Query: Method members that are "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithSingleDependency()" should be Method members that do not call "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithoutDependencies()" +Result: True +Description: System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithSingleDependency() passed +Message: +All Evaluations passed + +Query: Method members that are "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithSingleDependency()" should be Method members that do not call Method members that are "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithoutDependencies()" +Result: True +Description: System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithSingleDependency() passed +Message: +All Evaluations passed + +----- Predicates as conditions ----- + +Query: Method members that are "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithSingleDependency()" should be method members that do not call "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithoutDependencies()" +Result: True +Description: System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithSingleDependency() passed +Message: +All Evaluations passed + +Query: Method members that are "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithSingleDependency()" should be method members that do not call "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithoutDependencies()" +Result: True +Description: System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithSingleDependency() passed +Message: +All Evaluations passed + +Query: Method members that are "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithSingleDependency()" should be method members that do not call Method members that are "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithoutDependencies()" +Result: True +Description: System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithSingleDependency() passed +Message: +All Evaluations passed + ===== Violations ===== +----- Conditions ----- + Query: Method members that are "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithSingleDependency()" should not call any "System.Void MethodDependencyNamespace.MethodDependencyClass::CalledMethod()" Result: False Description: System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithSingleDependency() does call System.Void MethodDependencyNamespace.MethodDependencyClass::CalledMethod() @@ -47,16 +91,94 @@ Message: +----- Predicates ----- + +Query: Method members that are "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithSingleDependency()" should be Method members that do not call "System.Void MethodDependencyNamespace.MethodDependencyClass::CalledMethod()" +Result: False +Description: System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithSingleDependency() is not Method members that do not call "System.Void MethodDependencyNamespace.MethodDependencyClass::CalledMethod()" +Message: +"Method members that are "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithSingleDependency()" should be Method members that do not call "System.Void MethodDependencyNamespace.MethodDependencyClass::CalledMethod()"" failed: + System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithSingleDependency() is not Method members that do not call "System.Void MethodDependencyNamespace.MethodDependencyClass::CalledMethod()" + + + +Query: Method members that are "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithSingleDependency()" should be Method members that do not call "System.Void MethodDependencyNamespace.MethodDependencyClass::CalledMethod()" +Result: False +Description: System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithSingleDependency() is not Method members that do not call "System.Void MethodDependencyNamespace.MethodDependencyClass::CalledMethod()" +Message: +"Method members that are "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithSingleDependency()" should be Method members that do not call "System.Void MethodDependencyNamespace.MethodDependencyClass::CalledMethod()"" failed: + System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithSingleDependency() is not Method members that do not call "System.Void MethodDependencyNamespace.MethodDependencyClass::CalledMethod()" + + + +Query: Method members that are "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithSingleDependency()" should be Method members that do not call Method members that are "System.Void MethodDependencyNamespace.MethodDependencyClass::CalledMethod()" +Result: False +Description: System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithSingleDependency() is not Method members that do not call Method members that are "System.Void MethodDependencyNamespace.MethodDependencyClass::CalledMethod()" +Message: +"Method members that are "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithSingleDependency()" should be Method members that do not call Method members that are "System.Void MethodDependencyNamespace.MethodDependencyClass::CalledMethod()"" failed: + System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithSingleDependency() is not Method members that do not call Method members that are "System.Void MethodDependencyNamespace.MethodDependencyClass::CalledMethod()" + + + +----- Predicates as conditions ----- + +Query: Method members that are "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithSingleDependency()" should be method members that do not call "System.Void MethodDependencyNamespace.MethodDependencyClass::CalledMethod()" +Result: False +Description: System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithSingleDependency() is not "System.Void TypeDependencyNamespace.BaseClass::.ctor()" or "System.Void TypeDependencyNamespace.ChildClass::.ctor()" or "System.Void TypeDependencyNamespace.OtherChildClass::.ctor()" or "System.String TypeDependencyNamespace.BaseClassWithMember::get_BaseClassMember()" or "System.Void TypeDependencyNamespace.BaseClassWithMember::set_BaseClassMember(System.String)" or "System.Void TypeDependencyNamespace.BaseClassWithMember::.ctor()" or "System.String TypeDependencyNamespace.ChildClassWithMember::get_ChildClassMember()" or "System.Void TypeDependencyNamespace.ChildClassWithMember::set_ChildClassMember(System.String)" or "System.Void TypeDependencyNamespace.ChildClassWithMember::.ctor()" or "System.String TypeDependencyNamespace.OtherChildClassWithMember::get_OtherChildClassMember()" or "System.Void TypeDependencyNamespace.OtherChildClassWithMember::set_OtherChildClassMember(System.String)" or "System.Void TypeDependencyNamespace.OtherChildClassWithMember::.ctor()" or "System.Void TypeDependencyNamespace.BaseClassWithMultipleDependencies::.ctor()" or "System.Void TypeDependencyNamespace.ChildClass1::.ctor()" or "System.Void TypeDependencyNamespace.ChildClass2::.ctor()" or "System.Void TypeDependencyNamespace.OtherBaseClass::.ctor()" or "System.Void TypeDependencyNamespace.ClassWithMultipleDependencies::.ctor()" or "System.Void TypeDependencyNamespace.GenericBaseClass`1::.ctor()" or "System.Void TypeDependencyNamespace.ChildClassOfGeneric::.ctor()" or "System.Void TypeDependencyNamespace.ClassWithoutDependencies::.ctor()" or "System.Void TypeDependencyNamespace.OtherClassWithoutDependencies::.ctor()" or "System.Void TypeDependencyNamespace.Issue351::OuterFunc()" or "System.Void TypeDependencyNamespace.Issue351::.ctor()" or "System.Void MethodDependencyNamespace.MethodDependencyClass::CalledMethod()" or "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithMultipleDependencies()" or "System.Void MethodDependencyNamespace.MethodDependencyClass::CalledMethod1()" or "System.Void MethodDependencyNamespace.MethodDependencyClass::CalledMethod2()" or "System.Void MethodDependencyNamespace.MethodDependencyClass::CalledMethod3()" or "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithoutDependencies()" or "System.Void MethodDependencyNamespace.MethodDependencyClass::.ctor()" +Message: +"Method members that are "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithSingleDependency()" should be method members that do not call "System.Void MethodDependencyNamespace.MethodDependencyClass::CalledMethod()"" failed: + System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithSingleDependency() is not "System.Void TypeDependencyNamespace.BaseClass::.ctor()" or "System.Void TypeDependencyNamespace.ChildClass::.ctor()" or "System.Void TypeDependencyNamespace.OtherChildClass::.ctor()" or "System.String TypeDependencyNamespace.BaseClassWithMember::get_BaseClassMember()" or "System.Void TypeDependencyNamespace.BaseClassWithMember::set_BaseClassMember(System.String)" or "System.Void TypeDependencyNamespace.BaseClassWithMember::.ctor()" or "System.String TypeDependencyNamespace.ChildClassWithMember::get_ChildClassMember()" or "System.Void TypeDependencyNamespace.ChildClassWithMember::set_ChildClassMember(System.String)" or "System.Void TypeDependencyNamespace.ChildClassWithMember::.ctor()" or "System.String TypeDependencyNamespace.OtherChildClassWithMember::get_OtherChildClassMember()" or "System.Void TypeDependencyNamespace.OtherChildClassWithMember::set_OtherChildClassMember(System.String)" or "System.Void TypeDependencyNamespace.OtherChildClassWithMember::.ctor()" or "System.Void TypeDependencyNamespace.BaseClassWithMultipleDependencies::.ctor()" or "System.Void TypeDependencyNamespace.ChildClass1::.ctor()" or "System.Void TypeDependencyNamespace.ChildClass2::.ctor()" or "System.Void TypeDependencyNamespace.OtherBaseClass::.ctor()" or "System.Void TypeDependencyNamespace.ClassWithMultipleDependencies::.ctor()" or "System.Void TypeDependencyNamespace.GenericBaseClass`1::.ctor()" or "System.Void TypeDependencyNamespace.ChildClassOfGeneric::.ctor()" or "System.Void TypeDependencyNamespace.ClassWithoutDependencies::.ctor()" or "System.Void TypeDependencyNamespace.OtherClassWithoutDependencies::.ctor()" or "System.Void TypeDependencyNamespace.Issue351::OuterFunc()" or "System.Void TypeDependencyNamespace.Issue351::.ctor()" or "System.Void MethodDependencyNamespace.MethodDependencyClass::CalledMethod()" or "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithMultipleDependencies()" or "System.Void MethodDependencyNamespace.MethodDependencyClass::CalledMethod1()" or "System.Void MethodDependencyNamespace.MethodDependencyClass::CalledMethod2()" or "System.Void MethodDependencyNamespace.MethodDependencyClass::CalledMethod3()" or "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithoutDependencies()" or "System.Void MethodDependencyNamespace.MethodDependencyClass::.ctor()" + + + +Query: Method members that are "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithSingleDependency()" should be method members that do not call "System.Void MethodDependencyNamespace.MethodDependencyClass::CalledMethod()" +Result: False +Description: System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithSingleDependency() is not "System.Void TypeDependencyNamespace.BaseClass::.ctor()" or "System.Void TypeDependencyNamespace.ChildClass::.ctor()" or "System.Void TypeDependencyNamespace.OtherChildClass::.ctor()" or "System.String TypeDependencyNamespace.BaseClassWithMember::get_BaseClassMember()" or "System.Void TypeDependencyNamespace.BaseClassWithMember::set_BaseClassMember(System.String)" or "System.Void TypeDependencyNamespace.BaseClassWithMember::.ctor()" or "System.String TypeDependencyNamespace.ChildClassWithMember::get_ChildClassMember()" or "System.Void TypeDependencyNamespace.ChildClassWithMember::set_ChildClassMember(System.String)" or "System.Void TypeDependencyNamespace.ChildClassWithMember::.ctor()" or "System.String TypeDependencyNamespace.OtherChildClassWithMember::get_OtherChildClassMember()" or "System.Void TypeDependencyNamespace.OtherChildClassWithMember::set_OtherChildClassMember(System.String)" or "System.Void TypeDependencyNamespace.OtherChildClassWithMember::.ctor()" or "System.Void TypeDependencyNamespace.BaseClassWithMultipleDependencies::.ctor()" or "System.Void TypeDependencyNamespace.ChildClass1::.ctor()" or "System.Void TypeDependencyNamespace.ChildClass2::.ctor()" or "System.Void TypeDependencyNamespace.OtherBaseClass::.ctor()" or "System.Void TypeDependencyNamespace.ClassWithMultipleDependencies::.ctor()" or "System.Void TypeDependencyNamespace.GenericBaseClass`1::.ctor()" or "System.Void TypeDependencyNamespace.ChildClassOfGeneric::.ctor()" or "System.Void TypeDependencyNamespace.ClassWithoutDependencies::.ctor()" or "System.Void TypeDependencyNamespace.OtherClassWithoutDependencies::.ctor()" or "System.Void TypeDependencyNamespace.Issue351::OuterFunc()" or "System.Void TypeDependencyNamespace.Issue351::.ctor()" or "System.Void MethodDependencyNamespace.MethodDependencyClass::CalledMethod()" or "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithMultipleDependencies()" or "System.Void MethodDependencyNamespace.MethodDependencyClass::CalledMethod1()" or "System.Void MethodDependencyNamespace.MethodDependencyClass::CalledMethod2()" or "System.Void MethodDependencyNamespace.MethodDependencyClass::CalledMethod3()" or "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithoutDependencies()" or "System.Void MethodDependencyNamespace.MethodDependencyClass::.ctor()" +Message: +"Method members that are "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithSingleDependency()" should be method members that do not call "System.Void MethodDependencyNamespace.MethodDependencyClass::CalledMethod()"" failed: + System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithSingleDependency() is not "System.Void TypeDependencyNamespace.BaseClass::.ctor()" or "System.Void TypeDependencyNamespace.ChildClass::.ctor()" or "System.Void TypeDependencyNamespace.OtherChildClass::.ctor()" or "System.String TypeDependencyNamespace.BaseClassWithMember::get_BaseClassMember()" or "System.Void TypeDependencyNamespace.BaseClassWithMember::set_BaseClassMember(System.String)" or "System.Void TypeDependencyNamespace.BaseClassWithMember::.ctor()" or "System.String TypeDependencyNamespace.ChildClassWithMember::get_ChildClassMember()" or "System.Void TypeDependencyNamespace.ChildClassWithMember::set_ChildClassMember(System.String)" or "System.Void TypeDependencyNamespace.ChildClassWithMember::.ctor()" or "System.String TypeDependencyNamespace.OtherChildClassWithMember::get_OtherChildClassMember()" or "System.Void TypeDependencyNamespace.OtherChildClassWithMember::set_OtherChildClassMember(System.String)" or "System.Void TypeDependencyNamespace.OtherChildClassWithMember::.ctor()" or "System.Void TypeDependencyNamespace.BaseClassWithMultipleDependencies::.ctor()" or "System.Void TypeDependencyNamespace.ChildClass1::.ctor()" or "System.Void TypeDependencyNamespace.ChildClass2::.ctor()" or "System.Void TypeDependencyNamespace.OtherBaseClass::.ctor()" or "System.Void TypeDependencyNamespace.ClassWithMultipleDependencies::.ctor()" or "System.Void TypeDependencyNamespace.GenericBaseClass`1::.ctor()" or "System.Void TypeDependencyNamespace.ChildClassOfGeneric::.ctor()" or "System.Void TypeDependencyNamespace.ClassWithoutDependencies::.ctor()" or "System.Void TypeDependencyNamespace.OtherClassWithoutDependencies::.ctor()" or "System.Void TypeDependencyNamespace.Issue351::OuterFunc()" or "System.Void TypeDependencyNamespace.Issue351::.ctor()" or "System.Void MethodDependencyNamespace.MethodDependencyClass::CalledMethod()" or "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithMultipleDependencies()" or "System.Void MethodDependencyNamespace.MethodDependencyClass::CalledMethod1()" or "System.Void MethodDependencyNamespace.MethodDependencyClass::CalledMethod2()" or "System.Void MethodDependencyNamespace.MethodDependencyClass::CalledMethod3()" or "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithoutDependencies()" or "System.Void MethodDependencyNamespace.MethodDependencyClass::.ctor()" + + + +Query: Method members that are "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithSingleDependency()" should be method members that do not call Method members that are "System.Void MethodDependencyNamespace.MethodDependencyClass::CalledMethod()" +Result: False +Description: System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithSingleDependency() is not "System.Void TypeDependencyNamespace.BaseClass::.ctor()" or "System.Void TypeDependencyNamespace.ChildClass::.ctor()" or "System.Void TypeDependencyNamespace.OtherChildClass::.ctor()" or "System.String TypeDependencyNamespace.BaseClassWithMember::get_BaseClassMember()" or "System.Void TypeDependencyNamespace.BaseClassWithMember::set_BaseClassMember(System.String)" or "System.Void TypeDependencyNamespace.BaseClassWithMember::.ctor()" or "System.String TypeDependencyNamespace.ChildClassWithMember::get_ChildClassMember()" or "System.Void TypeDependencyNamespace.ChildClassWithMember::set_ChildClassMember(System.String)" or "System.Void TypeDependencyNamespace.ChildClassWithMember::.ctor()" or "System.String TypeDependencyNamespace.OtherChildClassWithMember::get_OtherChildClassMember()" or "System.Void TypeDependencyNamespace.OtherChildClassWithMember::set_OtherChildClassMember(System.String)" or "System.Void TypeDependencyNamespace.OtherChildClassWithMember::.ctor()" or "System.Void TypeDependencyNamespace.BaseClassWithMultipleDependencies::.ctor()" or "System.Void TypeDependencyNamespace.ChildClass1::.ctor()" or "System.Void TypeDependencyNamespace.ChildClass2::.ctor()" or "System.Void TypeDependencyNamespace.OtherBaseClass::.ctor()" or "System.Void TypeDependencyNamespace.ClassWithMultipleDependencies::.ctor()" or "System.Void TypeDependencyNamespace.GenericBaseClass`1::.ctor()" or "System.Void TypeDependencyNamespace.ChildClassOfGeneric::.ctor()" or "System.Void TypeDependencyNamespace.ClassWithoutDependencies::.ctor()" or "System.Void TypeDependencyNamespace.OtherClassWithoutDependencies::.ctor()" or "System.Void TypeDependencyNamespace.Issue351::OuterFunc()" or "System.Void TypeDependencyNamespace.Issue351::.ctor()" or "System.Void MethodDependencyNamespace.MethodDependencyClass::CalledMethod()" or "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithMultipleDependencies()" or "System.Void MethodDependencyNamespace.MethodDependencyClass::CalledMethod1()" or "System.Void MethodDependencyNamespace.MethodDependencyClass::CalledMethod2()" or "System.Void MethodDependencyNamespace.MethodDependencyClass::CalledMethod3()" or "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithoutDependencies()" or "System.Void MethodDependencyNamespace.MethodDependencyClass::.ctor()" +Message: +"Method members that are "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithSingleDependency()" should be method members that do not call Method members that are "System.Void MethodDependencyNamespace.MethodDependencyClass::CalledMethod()"" failed: + System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithSingleDependency() is not "System.Void TypeDependencyNamespace.BaseClass::.ctor()" or "System.Void TypeDependencyNamespace.ChildClass::.ctor()" or "System.Void TypeDependencyNamespace.OtherChildClass::.ctor()" or "System.String TypeDependencyNamespace.BaseClassWithMember::get_BaseClassMember()" or "System.Void TypeDependencyNamespace.BaseClassWithMember::set_BaseClassMember(System.String)" or "System.Void TypeDependencyNamespace.BaseClassWithMember::.ctor()" or "System.String TypeDependencyNamespace.ChildClassWithMember::get_ChildClassMember()" or "System.Void TypeDependencyNamespace.ChildClassWithMember::set_ChildClassMember(System.String)" or "System.Void TypeDependencyNamespace.ChildClassWithMember::.ctor()" or "System.String TypeDependencyNamespace.OtherChildClassWithMember::get_OtherChildClassMember()" or "System.Void TypeDependencyNamespace.OtherChildClassWithMember::set_OtherChildClassMember(System.String)" or "System.Void TypeDependencyNamespace.OtherChildClassWithMember::.ctor()" or "System.Void TypeDependencyNamespace.BaseClassWithMultipleDependencies::.ctor()" or "System.Void TypeDependencyNamespace.ChildClass1::.ctor()" or "System.Void TypeDependencyNamespace.ChildClass2::.ctor()" or "System.Void TypeDependencyNamespace.OtherBaseClass::.ctor()" or "System.Void TypeDependencyNamespace.ClassWithMultipleDependencies::.ctor()" or "System.Void TypeDependencyNamespace.GenericBaseClass`1::.ctor()" or "System.Void TypeDependencyNamespace.ChildClassOfGeneric::.ctor()" or "System.Void TypeDependencyNamespace.ClassWithoutDependencies::.ctor()" or "System.Void TypeDependencyNamespace.OtherClassWithoutDependencies::.ctor()" or "System.Void TypeDependencyNamespace.Issue351::OuterFunc()" or "System.Void TypeDependencyNamespace.Issue351::.ctor()" or "System.Void MethodDependencyNamespace.MethodDependencyClass::CalledMethod()" or "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithMultipleDependencies()" or "System.Void MethodDependencyNamespace.MethodDependencyClass::CalledMethod1()" or "System.Void MethodDependencyNamespace.MethodDependencyClass::CalledMethod2()" or "System.Void MethodDependencyNamespace.MethodDependencyClass::CalledMethod3()" or "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithoutDependencies()" or "System.Void MethodDependencyNamespace.MethodDependencyClass::.ctor()" + + + ===== Empty arguments ===== +----- Conditions ----- + Query: Method members that are "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithSingleDependency()" should not call any of no methods (always true) Result: True Description: System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithSingleDependency() passed Message: All Evaluations passed +----- Predicates ----- + +Query: Method members that are "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithSingleDependency()" should be Method members that do not call one of no methods (always true) +Result: True +Description: System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithSingleDependency() passed +Message: +All Evaluations passed + +----- Predicates as conditions ----- + +Query: Method members that are "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithSingleDependency()" should be method members that do not call one of no methods (always true) +Result: True +Description: System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithSingleDependency() passed +Message: +All Evaluations passed + ===== Multiple arguments ===== +----- Conditions ----- + Query: Method members that are "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithMultipleDependencies()" should not call any "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithoutDependencies()" or "System.Void MethodDependencyNamespace.M... Result: False Description: System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithMultipleDependencies() does call System.Void MethodDependencyNamespace.MethodDependencyClass::CalledMethod1() and System.Void MethodDependencyNamespace.MethodDependencyClass::CalledMethod2() @@ -84,8 +206,68 @@ Message: +----- Predicates ----- + +Query: Method members that are "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithMultipleDependencies()" should be Method members that do not call "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithoutDependencies()" or "System.Void Metho... +Result: False +Description: System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithMultipleDependencies() is not Method members that do not call "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithoutDependencies()" or "System.Void MethodDependencyNamespace.Me... +Message: +"Method members that are "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithMultipleDependencies()" should be Method members that do not call "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithoutDependencies()" or "System.Void Metho..." failed: + System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithMultipleDependencies() is not Method members that do not call "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithoutDependencies()" or "System.Void MethodDependencyNamespace.Me... + + + +Query: Method members that are "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithMultipleDependencies()" should be Method members that do not call "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithoutDependencies()" or "System.Void Metho... +Result: False +Description: System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithMultipleDependencies() is not Method members that do not call "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithoutDependencies()" or "System.Void MethodDependencyNamespace.Me... +Message: +"Method members that are "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithMultipleDependencies()" should be Method members that do not call "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithoutDependencies()" or "System.Void Metho..." failed: + System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithMultipleDependencies() is not Method members that do not call "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithoutDependencies()" or "System.Void MethodDependencyNamespace.Me... + + + +Query: Method members that are "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithMultipleDependencies()" should be Method members that do not call Method members that are "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithoutDependencies(... +Result: False +Description: System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithMultipleDependencies() is not Method members that do not call Method members that are "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithoutDependencies()" or "System.Void Meth... +Message: +"Method members that are "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithMultipleDependencies()" should be Method members that do not call Method members that are "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithoutDependencies(..." failed: + System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithMultipleDependencies() is not Method members that do not call Method members that are "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithoutDependencies()" or "System.Void Meth... + + + +----- Predicates as conditions ----- + +Query: Method members that are "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithMultipleDependencies()" should be method members that do not call "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithoutDependencies()" or "System.Void Metho... +Result: False +Description: System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithMultipleDependencies() is not "System.Void TypeDependencyNamespace.BaseClass::.ctor()" or "System.Void TypeDependencyNamespace.ChildClass::.ctor()" or "System.Void TypeDependencyNamespace.OtherChildClass::.ctor()" or "System.String TypeDependencyNamespace.BaseClassWithMember::get_BaseClassMember()" or "System.Void TypeDependencyNamespace.BaseClassWithMember::set_BaseClassMember(System.String)" or "System.Void TypeDependencyNamespace.BaseClassWithMember::.ctor()" or "System.String TypeDependencyNamespace.ChildClassWithMember::get_ChildClassMember()" or "System.Void TypeDependencyNamespace.ChildClassWithMember::set_ChildClassMember(System.String)" or "System.Void TypeDependencyNamespace.ChildClassWithMember::.ctor()" or "System.String TypeDependencyNamespace.OtherChildClassWithMember::get_OtherChildClassMember()" or "System.Void TypeDependencyNamespace.OtherChildClassWithMember::set_OtherChildClassMember(System.String)" or "System.Void TypeDependencyNamespace.OtherChildClassWithMember::.ctor()" or "System.Void TypeDependencyNamespace.BaseClassWithMultipleDependencies::.ctor()" or "System.Void TypeDependencyNamespace.ChildClass1::.ctor()" or "System.Void TypeDependencyNamespace.ChildClass2::.ctor()" or "System.Void TypeDependencyNamespace.OtherBaseClass::.ctor()" or "System.Void TypeDependencyNamespace.ClassWithMultipleDependencies::.ctor()" or "System.Void TypeDependencyNamespace.GenericBaseClass`1::.ctor()" or "System.Void TypeDependencyNamespace.ChildClassOfGeneric::.ctor()" or "System.Void TypeDependencyNamespace.ClassWithoutDependencies::.ctor()" or "System.Void TypeDependencyNamespace.OtherClassWithoutDependencies::.ctor()" or "System.Void TypeDependencyNamespace.Issue351::OuterFunc()" or "System.Void TypeDependencyNamespace.Issue351::.ctor()" or "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithSingleDependency()" or "System.Void MethodDependencyNamespace.MethodDependencyClass::CalledMethod()" or "System.Void MethodDependencyNamespace.MethodDependencyClass::CalledMethod1()" or "System.Void MethodDependencyNamespace.MethodDependencyClass::CalledMethod2()" or "System.Void MethodDependencyNamespace.MethodDependencyClass::CalledMethod3()" or "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithoutDependencies()" or "System.Void MethodDependencyNamespace.MethodDependencyClass::.ctor()" +Message: +"Method members that are "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithMultipleDependencies()" should be method members that do not call "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithoutDependencies()" or "System.Void Metho..." failed: + System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithMultipleDependencies() is not "System.Void TypeDependencyNamespace.BaseClass::.ctor()" or "System.Void TypeDependencyNamespace.ChildClass::.ctor()" or "System.Void TypeDependencyNamespace.OtherChildClass::.ctor()" or "System.String TypeDependencyNamespace.BaseClassWithMember::get_BaseClassMember()" or "System.Void TypeDependencyNamespace.BaseClassWithMember::set_BaseClassMember(System.String)" or "System.Void TypeDependencyNamespace.BaseClassWithMember::.ctor()" or "System.String TypeDependencyNamespace.ChildClassWithMember::get_ChildClassMember()" or "System.Void TypeDependencyNamespace.ChildClassWithMember::set_ChildClassMember(System.String)" or "System.Void TypeDependencyNamespace.ChildClassWithMember::.ctor()" or "System.String TypeDependencyNamespace.OtherChildClassWithMember::get_OtherChildClassMember()" or "System.Void TypeDependencyNamespace.OtherChildClassWithMember::set_OtherChildClassMember(System.String)" or "System.Void TypeDependencyNamespace.OtherChildClassWithMember::.ctor()" or "System.Void TypeDependencyNamespace.BaseClassWithMultipleDependencies::.ctor()" or "System.Void TypeDependencyNamespace.ChildClass1::.ctor()" or "System.Void TypeDependencyNamespace.ChildClass2::.ctor()" or "System.Void TypeDependencyNamespace.OtherBaseClass::.ctor()" or "System.Void TypeDependencyNamespace.ClassWithMultipleDependencies::.ctor()" or "System.Void TypeDependencyNamespace.GenericBaseClass`1::.ctor()" or "System.Void TypeDependencyNamespace.ChildClassOfGeneric::.ctor()" or "System.Void TypeDependencyNamespace.ClassWithoutDependencies::.ctor()" or "System.Void TypeDependencyNamespace.OtherClassWithoutDependencies::.ctor()" or "System.Void TypeDependencyNamespace.Issue351::OuterFunc()" or "System.Void TypeDependencyNamespace.Issue351::.ctor()" or "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithSingleDependency()" or "System.Void MethodDependencyNamespace.MethodDependencyClass::CalledMethod()" or "System.Void MethodDependencyNamespace.MethodDependencyClass::CalledMethod1()" or "System.Void MethodDependencyNamespace.MethodDependencyClass::CalledMethod2()" or "System.Void MethodDependencyNamespace.MethodDependencyClass::CalledMethod3()" or "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithoutDependencies()" or "System.Void MethodDependencyNamespace.MethodDependencyClass::.ctor()" + + + +Query: Method members that are "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithMultipleDependencies()" should be method members that do not call "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithoutDependencies()" or "System.Void Metho... +Result: False +Description: System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithMultipleDependencies() is not "System.Void TypeDependencyNamespace.BaseClass::.ctor()" or "System.Void TypeDependencyNamespace.ChildClass::.ctor()" or "System.Void TypeDependencyNamespace.OtherChildClass::.ctor()" or "System.String TypeDependencyNamespace.BaseClassWithMember::get_BaseClassMember()" or "System.Void TypeDependencyNamespace.BaseClassWithMember::set_BaseClassMember(System.String)" or "System.Void TypeDependencyNamespace.BaseClassWithMember::.ctor()" or "System.String TypeDependencyNamespace.ChildClassWithMember::get_ChildClassMember()" or "System.Void TypeDependencyNamespace.ChildClassWithMember::set_ChildClassMember(System.String)" or "System.Void TypeDependencyNamespace.ChildClassWithMember::.ctor()" or "System.String TypeDependencyNamespace.OtherChildClassWithMember::get_OtherChildClassMember()" or "System.Void TypeDependencyNamespace.OtherChildClassWithMember::set_OtherChildClassMember(System.String)" or "System.Void TypeDependencyNamespace.OtherChildClassWithMember::.ctor()" or "System.Void TypeDependencyNamespace.BaseClassWithMultipleDependencies::.ctor()" or "System.Void TypeDependencyNamespace.ChildClass1::.ctor()" or "System.Void TypeDependencyNamespace.ChildClass2::.ctor()" or "System.Void TypeDependencyNamespace.OtherBaseClass::.ctor()" or "System.Void TypeDependencyNamespace.ClassWithMultipleDependencies::.ctor()" or "System.Void TypeDependencyNamespace.GenericBaseClass`1::.ctor()" or "System.Void TypeDependencyNamespace.ChildClassOfGeneric::.ctor()" or "System.Void TypeDependencyNamespace.ClassWithoutDependencies::.ctor()" or "System.Void TypeDependencyNamespace.OtherClassWithoutDependencies::.ctor()" or "System.Void TypeDependencyNamespace.Issue351::OuterFunc()" or "System.Void TypeDependencyNamespace.Issue351::.ctor()" or "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithSingleDependency()" or "System.Void MethodDependencyNamespace.MethodDependencyClass::CalledMethod()" or "System.Void MethodDependencyNamespace.MethodDependencyClass::CalledMethod1()" or "System.Void MethodDependencyNamespace.MethodDependencyClass::CalledMethod2()" or "System.Void MethodDependencyNamespace.MethodDependencyClass::CalledMethod3()" or "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithoutDependencies()" or "System.Void MethodDependencyNamespace.MethodDependencyClass::.ctor()" +Message: +"Method members that are "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithMultipleDependencies()" should be method members that do not call "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithoutDependencies()" or "System.Void Metho..." failed: + System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithMultipleDependencies() is not "System.Void TypeDependencyNamespace.BaseClass::.ctor()" or "System.Void TypeDependencyNamespace.ChildClass::.ctor()" or "System.Void TypeDependencyNamespace.OtherChildClass::.ctor()" or "System.String TypeDependencyNamespace.BaseClassWithMember::get_BaseClassMember()" or "System.Void TypeDependencyNamespace.BaseClassWithMember::set_BaseClassMember(System.String)" or "System.Void TypeDependencyNamespace.BaseClassWithMember::.ctor()" or "System.String TypeDependencyNamespace.ChildClassWithMember::get_ChildClassMember()" or "System.Void TypeDependencyNamespace.ChildClassWithMember::set_ChildClassMember(System.String)" or "System.Void TypeDependencyNamespace.ChildClassWithMember::.ctor()" or "System.String TypeDependencyNamespace.OtherChildClassWithMember::get_OtherChildClassMember()" or "System.Void TypeDependencyNamespace.OtherChildClassWithMember::set_OtherChildClassMember(System.String)" or "System.Void TypeDependencyNamespace.OtherChildClassWithMember::.ctor()" or "System.Void TypeDependencyNamespace.BaseClassWithMultipleDependencies::.ctor()" or "System.Void TypeDependencyNamespace.ChildClass1::.ctor()" or "System.Void TypeDependencyNamespace.ChildClass2::.ctor()" or "System.Void TypeDependencyNamespace.OtherBaseClass::.ctor()" or "System.Void TypeDependencyNamespace.ClassWithMultipleDependencies::.ctor()" or "System.Void TypeDependencyNamespace.GenericBaseClass`1::.ctor()" or "System.Void TypeDependencyNamespace.ChildClassOfGeneric::.ctor()" or "System.Void TypeDependencyNamespace.ClassWithoutDependencies::.ctor()" or "System.Void TypeDependencyNamespace.OtherClassWithoutDependencies::.ctor()" or "System.Void TypeDependencyNamespace.Issue351::OuterFunc()" or "System.Void TypeDependencyNamespace.Issue351::.ctor()" or "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithSingleDependency()" or "System.Void MethodDependencyNamespace.MethodDependencyClass::CalledMethod()" or "System.Void MethodDependencyNamespace.MethodDependencyClass::CalledMethod1()" or "System.Void MethodDependencyNamespace.MethodDependencyClass::CalledMethod2()" or "System.Void MethodDependencyNamespace.MethodDependencyClass::CalledMethod3()" or "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithoutDependencies()" or "System.Void MethodDependencyNamespace.MethodDependencyClass::.ctor()" + + + +Query: Method members that are "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithMultipleDependencies()" should be method members that do not call Method members that are "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithoutDependencies(... +Result: False +Description: System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithMultipleDependencies() is not "System.Void TypeDependencyNamespace.BaseClass::.ctor()" or "System.Void TypeDependencyNamespace.ChildClass::.ctor()" or "System.Void TypeDependencyNamespace.OtherChildClass::.ctor()" or "System.String TypeDependencyNamespace.BaseClassWithMember::get_BaseClassMember()" or "System.Void TypeDependencyNamespace.BaseClassWithMember::set_BaseClassMember(System.String)" or "System.Void TypeDependencyNamespace.BaseClassWithMember::.ctor()" or "System.String TypeDependencyNamespace.ChildClassWithMember::get_ChildClassMember()" or "System.Void TypeDependencyNamespace.ChildClassWithMember::set_ChildClassMember(System.String)" or "System.Void TypeDependencyNamespace.ChildClassWithMember::.ctor()" or "System.String TypeDependencyNamespace.OtherChildClassWithMember::get_OtherChildClassMember()" or "System.Void TypeDependencyNamespace.OtherChildClassWithMember::set_OtherChildClassMember(System.String)" or "System.Void TypeDependencyNamespace.OtherChildClassWithMember::.ctor()" or "System.Void TypeDependencyNamespace.BaseClassWithMultipleDependencies::.ctor()" or "System.Void TypeDependencyNamespace.ChildClass1::.ctor()" or "System.Void TypeDependencyNamespace.ChildClass2::.ctor()" or "System.Void TypeDependencyNamespace.OtherBaseClass::.ctor()" or "System.Void TypeDependencyNamespace.ClassWithMultipleDependencies::.ctor()" or "System.Void TypeDependencyNamespace.GenericBaseClass`1::.ctor()" or "System.Void TypeDependencyNamespace.ChildClassOfGeneric::.ctor()" or "System.Void TypeDependencyNamespace.ClassWithoutDependencies::.ctor()" or "System.Void TypeDependencyNamespace.OtherClassWithoutDependencies::.ctor()" or "System.Void TypeDependencyNamespace.Issue351::OuterFunc()" or "System.Void TypeDependencyNamespace.Issue351::.ctor()" or "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithSingleDependency()" or "System.Void MethodDependencyNamespace.MethodDependencyClass::CalledMethod()" or "System.Void MethodDependencyNamespace.MethodDependencyClass::CalledMethod1()" or "System.Void MethodDependencyNamespace.MethodDependencyClass::CalledMethod2()" or "System.Void MethodDependencyNamespace.MethodDependencyClass::CalledMethod3()" or "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithoutDependencies()" or "System.Void MethodDependencyNamespace.MethodDependencyClass::.ctor()" +Message: +"Method members that are "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithMultipleDependencies()" should be method members that do not call Method members that are "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithoutDependencies(..." failed: + System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithMultipleDependencies() is not "System.Void TypeDependencyNamespace.BaseClass::.ctor()" or "System.Void TypeDependencyNamespace.ChildClass::.ctor()" or "System.Void TypeDependencyNamespace.OtherChildClass::.ctor()" or "System.String TypeDependencyNamespace.BaseClassWithMember::get_BaseClassMember()" or "System.Void TypeDependencyNamespace.BaseClassWithMember::set_BaseClassMember(System.String)" or "System.Void TypeDependencyNamespace.BaseClassWithMember::.ctor()" or "System.String TypeDependencyNamespace.ChildClassWithMember::get_ChildClassMember()" or "System.Void TypeDependencyNamespace.ChildClassWithMember::set_ChildClassMember(System.String)" or "System.Void TypeDependencyNamespace.ChildClassWithMember::.ctor()" or "System.String TypeDependencyNamespace.OtherChildClassWithMember::get_OtherChildClassMember()" or "System.Void TypeDependencyNamespace.OtherChildClassWithMember::set_OtherChildClassMember(System.String)" or "System.Void TypeDependencyNamespace.OtherChildClassWithMember::.ctor()" or "System.Void TypeDependencyNamespace.BaseClassWithMultipleDependencies::.ctor()" or "System.Void TypeDependencyNamespace.ChildClass1::.ctor()" or "System.Void TypeDependencyNamespace.ChildClass2::.ctor()" or "System.Void TypeDependencyNamespace.OtherBaseClass::.ctor()" or "System.Void TypeDependencyNamespace.ClassWithMultipleDependencies::.ctor()" or "System.Void TypeDependencyNamespace.GenericBaseClass`1::.ctor()" or "System.Void TypeDependencyNamespace.ChildClassOfGeneric::.ctor()" or "System.Void TypeDependencyNamespace.ClassWithoutDependencies::.ctor()" or "System.Void TypeDependencyNamespace.OtherClassWithoutDependencies::.ctor()" or "System.Void TypeDependencyNamespace.Issue351::OuterFunc()" or "System.Void TypeDependencyNamespace.Issue351::.ctor()" or "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithSingleDependency()" or "System.Void MethodDependencyNamespace.MethodDependencyClass::CalledMethod()" or "System.Void MethodDependencyNamespace.MethodDependencyClass::CalledMethod1()" or "System.Void MethodDependencyNamespace.MethodDependencyClass::CalledMethod2()" or "System.Void MethodDependencyNamespace.MethodDependencyClass::CalledMethod3()" or "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithoutDependencies()" or "System.Void MethodDependencyNamespace.MethodDependencyClass::.ctor()" + + + ===== Multiple inputs ===== +----- Conditions ----- + Query: Method members that are "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithSingleDependency()" or "System.Void MethodDependencyNamespace.MethodDep... should not call any "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithoutDependencies()" Result: True Description: System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithSingleDependency() passed @@ -106,3 +288,47 @@ Message: +----- Predicates ----- + +Query: Method members that are "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithSingleDependency()" or "System.Void MethodDependencyNamespace.MethodDep... should be Method members that do not call "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithoutDependencies()" +Result: True +Description: System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithSingleDependency() passed +Result: True +Description: System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithMultipleDependencies() passed +Message: +All Evaluations passed + +Query: Method members that are "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithSingleDependency()" or "System.Void MethodDependencyNamespace.MethodDep... should be Method members that do not call "System.Void MethodDependencyNamespace.MethodDependencyClass::CalledMethod()" or "System.Void MethodDependencyNa... +Result: False +Description: System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithSingleDependency() is not Method members that do not call "System.Void MethodDependencyNamespace.MethodDependencyClass::CalledMethod()" or "System.Void MethodDependencyNamespace.MethodDependenc... +Result: False +Description: System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithMultipleDependencies() is not Method members that do not call "System.Void MethodDependencyNamespace.MethodDependencyClass::CalledMethod()" or "System.Void MethodDependencyNamespace.MethodDependenc... +Message: +"Method members that are "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithSingleDependency()" or "System.Void MethodDependencyNamespace.MethodDep... should be Method members that do not call "System.Void MethodDependencyNamespace.MethodDependencyClass::CalledMethod()" or "System.Void MethodDependencyNa..." failed: + System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithSingleDependency() is not Method members that do not call "System.Void MethodDependencyNamespace.MethodDependencyClass::CalledMethod()" or "System.Void MethodDependencyNamespace.MethodDependenc... + System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithMultipleDependencies() is not Method members that do not call "System.Void MethodDependencyNamespace.MethodDependencyClass::CalledMethod()" or "System.Void MethodDependencyNamespace.MethodDependenc... + + + +----- Predicates as conditions ----- + +Query: Method members that are "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithSingleDependency()" or "System.Void MethodDependencyNamespace.MethodDep... should be method members that do not call "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithoutDependencies()" +Result: True +Description: System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithSingleDependency() passed +Result: True +Description: System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithMultipleDependencies() passed +Message: +All Evaluations passed + +Query: Method members that are "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithSingleDependency()" or "System.Void MethodDependencyNamespace.MethodDep... should be method members that do not call "System.Void MethodDependencyNamespace.MethodDependencyClass::CalledMethod()" or "System.Void MethodDependencyNa... +Result: False +Description: System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithSingleDependency() is not "System.Void TypeDependencyNamespace.BaseClass::.ctor()" or "System.Void TypeDependencyNamespace.ChildClass::.ctor()" or "System.Void TypeDependencyNamespace.OtherChildClass::.ctor()" or "System.String TypeDependencyNamespace.BaseClassWithMember::get_BaseClassMember()" or "System.Void TypeDependencyNamespace.BaseClassWithMember::set_BaseClassMember(System.String)" or "System.Void TypeDependencyNamespace.BaseClassWithMember::.ctor()" or "System.String TypeDependencyNamespace.ChildClassWithMember::get_ChildClassMember()" or "System.Void TypeDependencyNamespace.ChildClassWithMember::set_ChildClassMember(System.String)" or "System.Void TypeDependencyNamespace.ChildClassWithMember::.ctor()" or "System.String TypeDependencyNamespace.OtherChildClassWithMember::get_OtherChildClassMember()" or "System.Void TypeDependencyNamespace.OtherChildClassWithMember::set_OtherChildClassMember(System.String)" or "System.Void TypeDependencyNamespace.OtherChildClassWithMember::.ctor()" or "System.Void TypeDependencyNamespace.BaseClassWithMultipleDependencies::.ctor()" or "System.Void TypeDependencyNamespace.ChildClass1::.ctor()" or "System.Void TypeDependencyNamespace.ChildClass2::.ctor()" or "System.Void TypeDependencyNamespace.OtherBaseClass::.ctor()" or "System.Void TypeDependencyNamespace.ClassWithMultipleDependencies::.ctor()" or "System.Void TypeDependencyNamespace.GenericBaseClass`1::.ctor()" or "System.Void TypeDependencyNamespace.ChildClassOfGeneric::.ctor()" or "System.Void TypeDependencyNamespace.ClassWithoutDependencies::.ctor()" or "System.Void TypeDependencyNamespace.OtherClassWithoutDependencies::.ctor()" or "System.Void TypeDependencyNamespace.Issue351::OuterFunc()" or "System.Void TypeDependencyNamespace.Issue351::.ctor()" or "System.Void MethodDependencyNamespace.MethodDependencyClass::CalledMethod()" or "System.Void MethodDependencyNamespace.MethodDependencyClass::CalledMethod1()" or "System.Void MethodDependencyNamespace.MethodDependencyClass::CalledMethod2()" or "System.Void MethodDependencyNamespace.MethodDependencyClass::CalledMethod3()" or "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithoutDependencies()" or "System.Void MethodDependencyNamespace.MethodDependencyClass::.ctor()" +Result: False +Description: System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithMultipleDependencies() is not "System.Void TypeDependencyNamespace.BaseClass::.ctor()" or "System.Void TypeDependencyNamespace.ChildClass::.ctor()" or "System.Void TypeDependencyNamespace.OtherChildClass::.ctor()" or "System.String TypeDependencyNamespace.BaseClassWithMember::get_BaseClassMember()" or "System.Void TypeDependencyNamespace.BaseClassWithMember::set_BaseClassMember(System.String)" or "System.Void TypeDependencyNamespace.BaseClassWithMember::.ctor()" or "System.String TypeDependencyNamespace.ChildClassWithMember::get_ChildClassMember()" or "System.Void TypeDependencyNamespace.ChildClassWithMember::set_ChildClassMember(System.String)" or "System.Void TypeDependencyNamespace.ChildClassWithMember::.ctor()" or "System.String TypeDependencyNamespace.OtherChildClassWithMember::get_OtherChildClassMember()" or "System.Void TypeDependencyNamespace.OtherChildClassWithMember::set_OtherChildClassMember(System.String)" or "System.Void TypeDependencyNamespace.OtherChildClassWithMember::.ctor()" or "System.Void TypeDependencyNamespace.BaseClassWithMultipleDependencies::.ctor()" or "System.Void TypeDependencyNamespace.ChildClass1::.ctor()" or "System.Void TypeDependencyNamespace.ChildClass2::.ctor()" or "System.Void TypeDependencyNamespace.OtherBaseClass::.ctor()" or "System.Void TypeDependencyNamespace.ClassWithMultipleDependencies::.ctor()" or "System.Void TypeDependencyNamespace.GenericBaseClass`1::.ctor()" or "System.Void TypeDependencyNamespace.ChildClassOfGeneric::.ctor()" or "System.Void TypeDependencyNamespace.ClassWithoutDependencies::.ctor()" or "System.Void TypeDependencyNamespace.OtherClassWithoutDependencies::.ctor()" or "System.Void TypeDependencyNamespace.Issue351::OuterFunc()" or "System.Void TypeDependencyNamespace.Issue351::.ctor()" or "System.Void MethodDependencyNamespace.MethodDependencyClass::CalledMethod()" or "System.Void MethodDependencyNamespace.MethodDependencyClass::CalledMethod1()" or "System.Void MethodDependencyNamespace.MethodDependencyClass::CalledMethod2()" or "System.Void MethodDependencyNamespace.MethodDependencyClass::CalledMethod3()" or "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithoutDependencies()" or "System.Void MethodDependencyNamespace.MethodDependencyClass::.ctor()" +Message: +"Method members that are "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithSingleDependency()" or "System.Void MethodDependencyNamespace.MethodDep... should be method members that do not call "System.Void MethodDependencyNamespace.MethodDependencyClass::CalledMethod()" or "System.Void MethodDependencyNa..." failed: + System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithSingleDependency() is not "System.Void TypeDependencyNamespace.BaseClass::.ctor()" or "System.Void TypeDependencyNamespace.ChildClass::.ctor()" or "System.Void TypeDependencyNamespace.OtherChildClass::.ctor()" or "System.String TypeDependencyNamespace.BaseClassWithMember::get_BaseClassMember()" or "System.Void TypeDependencyNamespace.BaseClassWithMember::set_BaseClassMember(System.String)" or "System.Void TypeDependencyNamespace.BaseClassWithMember::.ctor()" or "System.String TypeDependencyNamespace.ChildClassWithMember::get_ChildClassMember()" or "System.Void TypeDependencyNamespace.ChildClassWithMember::set_ChildClassMember(System.String)" or "System.Void TypeDependencyNamespace.ChildClassWithMember::.ctor()" or "System.String TypeDependencyNamespace.OtherChildClassWithMember::get_OtherChildClassMember()" or "System.Void TypeDependencyNamespace.OtherChildClassWithMember::set_OtherChildClassMember(System.String)" or "System.Void TypeDependencyNamespace.OtherChildClassWithMember::.ctor()" or "System.Void TypeDependencyNamespace.BaseClassWithMultipleDependencies::.ctor()" or "System.Void TypeDependencyNamespace.ChildClass1::.ctor()" or "System.Void TypeDependencyNamespace.ChildClass2::.ctor()" or "System.Void TypeDependencyNamespace.OtherBaseClass::.ctor()" or "System.Void TypeDependencyNamespace.ClassWithMultipleDependencies::.ctor()" or "System.Void TypeDependencyNamespace.GenericBaseClass`1::.ctor()" or "System.Void TypeDependencyNamespace.ChildClassOfGeneric::.ctor()" or "System.Void TypeDependencyNamespace.ClassWithoutDependencies::.ctor()" or "System.Void TypeDependencyNamespace.OtherClassWithoutDependencies::.ctor()" or "System.Void TypeDependencyNamespace.Issue351::OuterFunc()" or "System.Void TypeDependencyNamespace.Issue351::.ctor()" or "System.Void MethodDependencyNamespace.MethodDependencyClass::CalledMethod()" or "System.Void MethodDependencyNamespace.MethodDependencyClass::CalledMethod1()" or "System.Void MethodDependencyNamespace.MethodDependencyClass::CalledMethod2()" or "System.Void MethodDependencyNamespace.MethodDependencyClass::CalledMethod3()" or "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithoutDependencies()" or "System.Void MethodDependencyNamespace.MethodDependencyClass::.ctor()" + System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithMultipleDependencies() is not "System.Void TypeDependencyNamespace.BaseClass::.ctor()" or "System.Void TypeDependencyNamespace.ChildClass::.ctor()" or "System.Void TypeDependencyNamespace.OtherChildClass::.ctor()" or "System.String TypeDependencyNamespace.BaseClassWithMember::get_BaseClassMember()" or "System.Void TypeDependencyNamespace.BaseClassWithMember::set_BaseClassMember(System.String)" or "System.Void TypeDependencyNamespace.BaseClassWithMember::.ctor()" or "System.String TypeDependencyNamespace.ChildClassWithMember::get_ChildClassMember()" or "System.Void TypeDependencyNamespace.ChildClassWithMember::set_ChildClassMember(System.String)" or "System.Void TypeDependencyNamespace.ChildClassWithMember::.ctor()" or "System.String TypeDependencyNamespace.OtherChildClassWithMember::get_OtherChildClassMember()" or "System.Void TypeDependencyNamespace.OtherChildClassWithMember::set_OtherChildClassMember(System.String)" or "System.Void TypeDependencyNamespace.OtherChildClassWithMember::.ctor()" or "System.Void TypeDependencyNamespace.BaseClassWithMultipleDependencies::.ctor()" or "System.Void TypeDependencyNamespace.ChildClass1::.ctor()" or "System.Void TypeDependencyNamespace.ChildClass2::.ctor()" or "System.Void TypeDependencyNamespace.OtherBaseClass::.ctor()" or "System.Void TypeDependencyNamespace.ClassWithMultipleDependencies::.ctor()" or "System.Void TypeDependencyNamespace.GenericBaseClass`1::.ctor()" or "System.Void TypeDependencyNamespace.ChildClassOfGeneric::.ctor()" or "System.Void TypeDependencyNamespace.ClassWithoutDependencies::.ctor()" or "System.Void TypeDependencyNamespace.OtherClassWithoutDependencies::.ctor()" or "System.Void TypeDependencyNamespace.Issue351::OuterFunc()" or "System.Void TypeDependencyNamespace.Issue351::.ctor()" or "System.Void MethodDependencyNamespace.MethodDependencyClass::CalledMethod()" or "System.Void MethodDependencyNamespace.MethodDependencyClass::CalledMethod1()" or "System.Void MethodDependencyNamespace.MethodDependencyClass::CalledMethod2()" or "System.Void MethodDependencyNamespace.MethodDependencyClass::CalledMethod3()" or "System.Void MethodDependencyNamespace.MethodDependencyClass::MethodWithoutDependencies()" or "System.Void MethodDependencyNamespace.MethodDependencyClass::.ctor()" + + + diff --git a/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.NotDependOnAnyTest.verified.txt b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.NotDependOnAnyTest.verified.txt index 68a1e7ab4..c875c55b7 100644 --- a/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.NotDependOnAnyTest.verified.txt +++ b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.NotDependOnAnyTest.verified.txt @@ -1,5 +1,7 @@ ===== No violations ===== +----- Conditions ----- + Query: Types that are "TypeDependencyNamespace.ChildClass" should not depend on any "TypeDependencyNamespace.ClassWithoutDependencies" Result: True Description: TypeDependencyNamespace.ChildClass passed @@ -30,8 +32,74 @@ Description: TypeDependencyNamespace.ChildClass passed Message: All Evaluations passed +----- Predicates ----- + +Query: Types that are "TypeDependencyNamespace.ChildClass" should be Types that do not depend on "TypeDependencyNamespace.ClassWithoutDependencies" +Result: True +Description: TypeDependencyNamespace.ChildClass passed +Message: +All Evaluations passed + +Query: Types that are "TypeDependencyNamespace.ChildClass" should be Types that do not depend on "TypeDependencyNamespace.ClassWithoutDependencies" +Result: True +Description: TypeDependencyNamespace.ChildClass passed +Message: +All Evaluations passed + +Query: Types that are "TypeDependencyNamespace.ChildClass" should be Types that do not depend on "TypeDependencyNamespace.ClassWithoutDependencies" +Result: True +Description: TypeDependencyNamespace.ChildClass passed +Message: +All Evaluations passed + +Query: Types that are "TypeDependencyNamespace.ChildClass" should be Types that do not depend on "TypeDependencyNamespace.ClassWithoutDependencies" +Result: True +Description: TypeDependencyNamespace.ChildClass passed +Message: +All Evaluations passed + +Query: Types that are "TypeDependencyNamespace.ChildClass" should be Types that do not depend on "TypeDependencyNamespace.ClassWithoutDependencies" +Result: True +Description: TypeDependencyNamespace.ChildClass passed +Message: +All Evaluations passed + +----- Predicates as conditions ----- + +Query: Types that are "TypeDependencyNamespace.ChildClass" should be types that do not depend on "TypeDependencyNamespace.ClassWithoutDependencies" +Result: True +Description: TypeDependencyNamespace.ChildClass passed +Message: +All Evaluations passed + +Query: Types that are "TypeDependencyNamespace.ChildClass" should be types that do not depend on "TypeDependencyNamespace.ClassWithoutDependencies" +Result: True +Description: TypeDependencyNamespace.ChildClass passed +Message: +All Evaluations passed + +Query: Types that are "TypeDependencyNamespace.ChildClass" should be types that do not depend on any Classes that are "TypeDependencyNamespace.ClassWithoutDependencies" +Result: True +Description: TypeDependencyNamespace.ChildClass passed +Message: +All Evaluations passed + +Query: Types that are "TypeDependencyNamespace.ChildClass" should be types that do not depend on "TypeDependencyNamespace.ClassWithoutDependencies" +Result: True +Description: TypeDependencyNamespace.ChildClass passed +Message: +All Evaluations passed + +Query: Types that are "TypeDependencyNamespace.ChildClass" should be types that do not depend on "TypeDependencyNamespace.ClassWithoutDependencies" +Result: True +Description: TypeDependencyNamespace.ChildClass passed +Message: +All Evaluations passed + ===== Violations ===== +----- Conditions ----- + Query: Types that are "TypeDependencyNamespace.ChildClass" should not depend on any "TypeDependencyNamespace.BaseClass" Result: False Description: TypeDependencyNamespace.ChildClass does depend on TypeDependencyNamespace.BaseClass @@ -77,13 +145,109 @@ Message: +----- Predicates ----- + +Query: Types that are "TypeDependencyNamespace.ChildClass" should be Types that do not depend on "TypeDependencyNamespace.BaseClass" +Result: False +Description: TypeDependencyNamespace.ChildClass is not Types that do not depend on "TypeDependencyNamespace.BaseClass" +Message: +"Types that are "TypeDependencyNamespace.ChildClass" should be Types that do not depend on "TypeDependencyNamespace.BaseClass"" failed: + TypeDependencyNamespace.ChildClass is not Types that do not depend on "TypeDependencyNamespace.BaseClass" + + + +Query: Types that are "TypeDependencyNamespace.ChildClass" should be Types that do not depend on "TypeDependencyNamespace.BaseClass" +Result: False +Description: TypeDependencyNamespace.ChildClass is not Types that do not depend on "TypeDependencyNamespace.BaseClass" +Message: +"Types that are "TypeDependencyNamespace.ChildClass" should be Types that do not depend on "TypeDependencyNamespace.BaseClass"" failed: + TypeDependencyNamespace.ChildClass is not Types that do not depend on "TypeDependencyNamespace.BaseClass" + + + +Query: Types that are "TypeDependencyNamespace.ChildClass" should be Types that do not depend on any Classes that are "TypeDependencyNamespace.BaseClass" +Result: False +Description: TypeDependencyNamespace.ChildClass is not Types that do not depend on any Classes that are "TypeDependencyNamespace.BaseClass" +Message: +"Types that are "TypeDependencyNamespace.ChildClass" should be Types that do not depend on any Classes that are "TypeDependencyNamespace.BaseClass"" failed: + TypeDependencyNamespace.ChildClass is not Types that do not depend on any Classes that are "TypeDependencyNamespace.BaseClass" + + + +----- Predicates as conditions ----- + +Query: Types that are "TypeDependencyNamespace.ChildClass" should be types that do not depend on "TypeDependencyNamespace.BaseClass" +Result: False +Description: TypeDependencyNamespace.ChildClass is not "TypeDependencyNamespace.BaseClass" or "TypeDependencyNamespace.BaseClassWithMember" or "TypeDependencyNamespace.ChildClassWithMember" or "TypeDependencyNamespace.OtherChildClassWithMember" or "TypeDependencyNamespace.BaseClassWithMultipleDependencies" or "TypeDependencyNamespace.ChildClass1" or "TypeDependencyNamespace.ChildClass2" or "TypeDependencyNamespace.OtherBaseClass" or "TypeDependencyNamespace.ClassWithMultipleDependencies" or "TypeDependencyNamespace.GenericBaseClass`1" or "TypeDependencyNamespace.ChildClassOfGeneric" or "TypeDependencyNamespace.ClassWithoutDependencies" or "TypeDependencyNamespace.OtherClassWithoutDependencies" or "TypeDependencyNamespace.Issue351" or "MethodDependencyNamespace.MethodDependencyClass" or "System.Object" or "System.Void" or "System.String" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Int32" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" or "System.Collections.Generic.List`1" or "System.Func`2" or "System.IntPtr" or "System.Linq.Enumerable" or "System.Collections.Generic.IEnumerable`1" or "System.Linq.IGrouping`2" or "System.Collections.Generic.IReadOnlyCollection`1" or "System.Collections.Generic.Dictionary`2" +Message: +"Types that are "TypeDependencyNamespace.ChildClass" should be types that do not depend on "TypeDependencyNamespace.BaseClass"" failed: + TypeDependencyNamespace.ChildClass is not "TypeDependencyNamespace.BaseClass" or "TypeDependencyNamespace.BaseClassWithMember" or "TypeDependencyNamespace.ChildClassWithMember" or "TypeDependencyNamespace.OtherChildClassWithMember" or "TypeDependencyNamespace.BaseClassWithMultipleDependencies" or "TypeDependencyNamespace.ChildClass1" or "TypeDependencyNamespace.ChildClass2" or "TypeDependencyNamespace.OtherBaseClass" or "TypeDependencyNamespace.ClassWithMultipleDependencies" or "TypeDependencyNamespace.GenericBaseClass`1" or "TypeDependencyNamespace.ChildClassOfGeneric" or "TypeDependencyNamespace.ClassWithoutDependencies" or "TypeDependencyNamespace.OtherClassWithoutDependencies" or "TypeDependencyNamespace.Issue351" or "MethodDependencyNamespace.MethodDependencyClass" or "System.Object" or "System.Void" or "System.String" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Int32" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" or "System.Collections.Generic.List`1" or "System.Func`2" or "System.IntPtr" or "System.Linq.Enumerable" or "System.Collections.Generic.IEnumerable`1" or "System.Linq.IGrouping`2" or "System.Collections.Generic.IReadOnlyCollection`1" or "System.Collections.Generic.Dictionary`2" + + + +Query: Types that are "TypeDependencyNamespace.ChildClass" should be types that do not depend on "TypeDependencyNamespace.BaseClass" +Result: False +Description: TypeDependencyNamespace.ChildClass is not "TypeDependencyNamespace.BaseClass" or "TypeDependencyNamespace.BaseClassWithMember" or "TypeDependencyNamespace.ChildClassWithMember" or "TypeDependencyNamespace.OtherChildClassWithMember" or "TypeDependencyNamespace.BaseClassWithMultipleDependencies" or "TypeDependencyNamespace.ChildClass1" or "TypeDependencyNamespace.ChildClass2" or "TypeDependencyNamespace.OtherBaseClass" or "TypeDependencyNamespace.ClassWithMultipleDependencies" or "TypeDependencyNamespace.GenericBaseClass`1" or "TypeDependencyNamespace.ChildClassOfGeneric" or "TypeDependencyNamespace.ClassWithoutDependencies" or "TypeDependencyNamespace.OtherClassWithoutDependencies" or "TypeDependencyNamespace.Issue351" or "MethodDependencyNamespace.MethodDependencyClass" or "System.Object" or "System.Void" or "System.String" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Int32" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" or "System.Collections.Generic.List`1" or "System.Func`2" or "System.IntPtr" or "System.Linq.Enumerable" or "System.Collections.Generic.IEnumerable`1" or "System.Linq.IGrouping`2" or "System.Collections.Generic.IReadOnlyCollection`1" or "System.Collections.Generic.Dictionary`2" +Message: +"Types that are "TypeDependencyNamespace.ChildClass" should be types that do not depend on "TypeDependencyNamespace.BaseClass"" failed: + TypeDependencyNamespace.ChildClass is not "TypeDependencyNamespace.BaseClass" or "TypeDependencyNamespace.BaseClassWithMember" or "TypeDependencyNamespace.ChildClassWithMember" or "TypeDependencyNamespace.OtherChildClassWithMember" or "TypeDependencyNamespace.BaseClassWithMultipleDependencies" or "TypeDependencyNamespace.ChildClass1" or "TypeDependencyNamespace.ChildClass2" or "TypeDependencyNamespace.OtherBaseClass" or "TypeDependencyNamespace.ClassWithMultipleDependencies" or "TypeDependencyNamespace.GenericBaseClass`1" or "TypeDependencyNamespace.ChildClassOfGeneric" or "TypeDependencyNamespace.ClassWithoutDependencies" or "TypeDependencyNamespace.OtherClassWithoutDependencies" or "TypeDependencyNamespace.Issue351" or "MethodDependencyNamespace.MethodDependencyClass" or "System.Object" or "System.Void" or "System.String" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Int32" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" or "System.Collections.Generic.List`1" or "System.Func`2" or "System.IntPtr" or "System.Linq.Enumerable" or "System.Collections.Generic.IEnumerable`1" or "System.Linq.IGrouping`2" or "System.Collections.Generic.IReadOnlyCollection`1" or "System.Collections.Generic.Dictionary`2" + + + +Query: Types that are "TypeDependencyNamespace.ChildClass" should be types that do not depend on any Classes that are "TypeDependencyNamespace.BaseClass" +Result: False +Description: TypeDependencyNamespace.ChildClass is not "TypeDependencyNamespace.BaseClass" or "TypeDependencyNamespace.BaseClassWithMember" or "TypeDependencyNamespace.ChildClassWithMember" or "TypeDependencyNamespace.OtherChildClassWithMember" or "TypeDependencyNamespace.BaseClassWithMultipleDependencies" or "TypeDependencyNamespace.ChildClass1" or "TypeDependencyNamespace.ChildClass2" or "TypeDependencyNamespace.OtherBaseClass" or "TypeDependencyNamespace.ClassWithMultipleDependencies" or "TypeDependencyNamespace.GenericBaseClass`1" or "TypeDependencyNamespace.ChildClassOfGeneric" or "TypeDependencyNamespace.ClassWithoutDependencies" or "TypeDependencyNamespace.OtherClassWithoutDependencies" or "TypeDependencyNamespace.Issue351" or "MethodDependencyNamespace.MethodDependencyClass" or "System.Object" or "System.Void" or "System.String" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Int32" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" or "System.Collections.Generic.List`1" or "System.Func`2" or "System.IntPtr" or "System.Linq.Enumerable" or "System.Collections.Generic.IEnumerable`1" or "System.Linq.IGrouping`2" or "System.Collections.Generic.IReadOnlyCollection`1" or "System.Collections.Generic.Dictionary`2" +Message: +"Types that are "TypeDependencyNamespace.ChildClass" should be types that do not depend on any Classes that are "TypeDependencyNamespace.BaseClass"" failed: + TypeDependencyNamespace.ChildClass is not "TypeDependencyNamespace.BaseClass" or "TypeDependencyNamespace.BaseClassWithMember" or "TypeDependencyNamespace.ChildClassWithMember" or "TypeDependencyNamespace.OtherChildClassWithMember" or "TypeDependencyNamespace.BaseClassWithMultipleDependencies" or "TypeDependencyNamespace.ChildClass1" or "TypeDependencyNamespace.ChildClass2" or "TypeDependencyNamespace.OtherBaseClass" or "TypeDependencyNamespace.ClassWithMultipleDependencies" or "TypeDependencyNamespace.GenericBaseClass`1" or "TypeDependencyNamespace.ChildClassOfGeneric" or "TypeDependencyNamespace.ClassWithoutDependencies" or "TypeDependencyNamespace.OtherClassWithoutDependencies" or "TypeDependencyNamespace.Issue351" or "MethodDependencyNamespace.MethodDependencyClass" or "System.Object" or "System.Void" or "System.String" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Int32" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" or "System.Collections.Generic.List`1" or "System.Func`2" or "System.IntPtr" or "System.Linq.Enumerable" or "System.Collections.Generic.IEnumerable`1" or "System.Linq.IGrouping`2" or "System.Collections.Generic.IReadOnlyCollection`1" or "System.Collections.Generic.Dictionary`2" + + + +Query: Types that are "TypeDependencyNamespace.ChildClass" should be types that do not depend on "TypeDependencyNamespace.BaseClass" +Result: False +Description: TypeDependencyNamespace.ChildClass is not "TypeDependencyNamespace.BaseClass" or "TypeDependencyNamespace.BaseClassWithMember" or "TypeDependencyNamespace.ChildClassWithMember" or "TypeDependencyNamespace.OtherChildClassWithMember" or "TypeDependencyNamespace.BaseClassWithMultipleDependencies" or "TypeDependencyNamespace.ChildClass1" or "TypeDependencyNamespace.ChildClass2" or "TypeDependencyNamespace.OtherBaseClass" or "TypeDependencyNamespace.ClassWithMultipleDependencies" or "TypeDependencyNamespace.GenericBaseClass`1" or "TypeDependencyNamespace.ChildClassOfGeneric" or "TypeDependencyNamespace.ClassWithoutDependencies" or "TypeDependencyNamespace.OtherClassWithoutDependencies" or "TypeDependencyNamespace.Issue351" or "MethodDependencyNamespace.MethodDependencyClass" or "System.Object" or "System.Void" or "System.String" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Int32" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" or "System.Collections.Generic.List`1" or "System.Func`2" or "System.IntPtr" or "System.Linq.Enumerable" or "System.Collections.Generic.IEnumerable`1" or "System.Linq.IGrouping`2" or "System.Collections.Generic.IReadOnlyCollection`1" or "System.Collections.Generic.Dictionary`2" +Message: +"Types that are "TypeDependencyNamespace.ChildClass" should be types that do not depend on "TypeDependencyNamespace.BaseClass"" failed: + TypeDependencyNamespace.ChildClass is not "TypeDependencyNamespace.BaseClass" or "TypeDependencyNamespace.BaseClassWithMember" or "TypeDependencyNamespace.ChildClassWithMember" or "TypeDependencyNamespace.OtherChildClassWithMember" or "TypeDependencyNamespace.BaseClassWithMultipleDependencies" or "TypeDependencyNamespace.ChildClass1" or "TypeDependencyNamespace.ChildClass2" or "TypeDependencyNamespace.OtherBaseClass" or "TypeDependencyNamespace.ClassWithMultipleDependencies" or "TypeDependencyNamespace.GenericBaseClass`1" or "TypeDependencyNamespace.ChildClassOfGeneric" or "TypeDependencyNamespace.ClassWithoutDependencies" or "TypeDependencyNamespace.OtherClassWithoutDependencies" or "TypeDependencyNamespace.Issue351" or "MethodDependencyNamespace.MethodDependencyClass" or "System.Object" or "System.Void" or "System.String" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Int32" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" or "System.Collections.Generic.List`1" or "System.Func`2" or "System.IntPtr" or "System.Linq.Enumerable" or "System.Collections.Generic.IEnumerable`1" or "System.Linq.IGrouping`2" or "System.Collections.Generic.IReadOnlyCollection`1" or "System.Collections.Generic.Dictionary`2" + + + +Query: Types that are "TypeDependencyNamespace.ChildClass" should be types that do not depend on "TypeDependencyNamespace.BaseClass" +Result: False +Description: TypeDependencyNamespace.ChildClass is not "TypeDependencyNamespace.BaseClass" or "TypeDependencyNamespace.BaseClassWithMember" or "TypeDependencyNamespace.ChildClassWithMember" or "TypeDependencyNamespace.OtherChildClassWithMember" or "TypeDependencyNamespace.BaseClassWithMultipleDependencies" or "TypeDependencyNamespace.ChildClass1" or "TypeDependencyNamespace.ChildClass2" or "TypeDependencyNamespace.OtherBaseClass" or "TypeDependencyNamespace.ClassWithMultipleDependencies" or "TypeDependencyNamespace.GenericBaseClass`1" or "TypeDependencyNamespace.ChildClassOfGeneric" or "TypeDependencyNamespace.ClassWithoutDependencies" or "TypeDependencyNamespace.OtherClassWithoutDependencies" or "TypeDependencyNamespace.Issue351" or "MethodDependencyNamespace.MethodDependencyClass" or "System.Object" or "System.Void" or "System.String" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Int32" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" or "System.Collections.Generic.List`1" or "System.Func`2" or "System.IntPtr" or "System.Linq.Enumerable" or "System.Collections.Generic.IEnumerable`1" or "System.Linq.IGrouping`2" or "System.Collections.Generic.IReadOnlyCollection`1" or "System.Collections.Generic.Dictionary`2" +Message: +"Types that are "TypeDependencyNamespace.ChildClass" should be types that do not depend on "TypeDependencyNamespace.BaseClass"" failed: + TypeDependencyNamespace.ChildClass is not "TypeDependencyNamespace.BaseClass" or "TypeDependencyNamespace.BaseClassWithMember" or "TypeDependencyNamespace.ChildClassWithMember" or "TypeDependencyNamespace.OtherChildClassWithMember" or "TypeDependencyNamespace.BaseClassWithMultipleDependencies" or "TypeDependencyNamespace.ChildClass1" or "TypeDependencyNamespace.ChildClass2" or "TypeDependencyNamespace.OtherBaseClass" or "TypeDependencyNamespace.ClassWithMultipleDependencies" or "TypeDependencyNamespace.GenericBaseClass`1" or "TypeDependencyNamespace.ChildClassOfGeneric" or "TypeDependencyNamespace.ClassWithoutDependencies" or "TypeDependencyNamespace.OtherClassWithoutDependencies" or "TypeDependencyNamespace.Issue351" or "MethodDependencyNamespace.MethodDependencyClass" or "System.Object" or "System.Void" or "System.String" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Int32" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" or "System.Collections.Generic.List`1" or "System.Func`2" or "System.IntPtr" or "System.Linq.Enumerable" or "System.Collections.Generic.IEnumerable`1" or "System.Linq.IGrouping`2" or "System.Collections.Generic.IReadOnlyCollection`1" or "System.Collections.Generic.Dictionary`2" + + + ===== Type outside of architecture ===== +----- Conditions ----- + Query: Types that are "TypeDependencyNamespace.ChildClass" should not depend on any "AttributeNamespace.ClassWithoutAttributes" Exception: Type AttributeNamespace.ClassWithoutAttributes does not exist in provided architecture or is no class. +----- Predicates ----- + +Query: Types that are "TypeDependencyNamespace.ChildClass" should be Types that do not depend on "AttributeNamespace.ClassWithoutAttributes" +Result: True +Description: TypeDependencyNamespace.ChildClass passed +Message: +All Evaluations passed + +----- Predicates as conditions ----- + +Query: Types that are "TypeDependencyNamespace.ChildClass" should be types that do not depend on "AttributeNamespace.ClassWithoutAttributes" +Result: True +Description: TypeDependencyNamespace.ChildClass passed +Message: +All Evaluations passed + ===== Empty arguments ===== +----- Conditions ----- + Query: Types that are "TypeDependencyNamespace.ChildClass" should not depend on any of no types (always true) Result: True Description: TypeDependencyNamespace.ChildClass passed @@ -96,8 +260,38 @@ Description: TypeDependencyNamespace.ChildClass passed Message: All Evaluations passed +----- Predicates ----- + +Query: Types that are "TypeDependencyNamespace.ChildClass" should be Types that do not depend on no types (always true) +Result: True +Description: TypeDependencyNamespace.ChildClass passed +Message: +All Evaluations passed + +Query: Types that are "TypeDependencyNamespace.ChildClass" should be Types that do not depend on no types (always true) +Result: True +Description: TypeDependencyNamespace.ChildClass passed +Message: +All Evaluations passed + +----- Predicates as conditions ----- + +Query: Types that are "TypeDependencyNamespace.ChildClass" should be types that do not depend on no types (always true) +Result: True +Description: TypeDependencyNamespace.ChildClass passed +Message: +All Evaluations passed + +Query: Types that are "TypeDependencyNamespace.ChildClass" should be types that do not depend on no types (always true) +Result: True +Description: TypeDependencyNamespace.ChildClass passed +Message: +All Evaluations passed + ===== Multiple arguments ===== +----- Conditions ----- + Query: Types that are "TypeDependencyNamespace.ChildClass" should not depend on any "TypeDependencyNamespace.ClassWithoutDependencies" or "TypeDependencyNamespace.BaseClass" Result: False Description: TypeDependencyNamespace.ChildClass does depend on TypeDependencyNamespace.BaseClass @@ -134,8 +328,86 @@ Message: +----- Predicates ----- + +Query: Types that are "TypeDependencyNamespace.ChildClass" should be Types that do not depend on "TypeDependencyNamespace.ClassWithoutDependencies" or "TypeDependencyNamespace.BaseClass" +Result: False +Description: TypeDependencyNamespace.ChildClass is not Types that do not depend on "TypeDependencyNamespace.ClassWithoutDependencies" or "TypeDependencyNamespace.BaseClass" +Message: +"Types that are "TypeDependencyNamespace.ChildClass" should be Types that do not depend on "TypeDependencyNamespace.ClassWithoutDependencies" or "TypeDependencyNamespace.BaseClass"" failed: + TypeDependencyNamespace.ChildClass is not Types that do not depend on "TypeDependencyNamespace.ClassWithoutDependencies" or "TypeDependencyNamespace.BaseClass" + + + +Query: Types that are "TypeDependencyNamespace.ChildClass" should be Types that do not depend on "TypeDependencyNamespace.ClassWithoutDependencies" or "TypeDependencyNamespace.BaseClass" +Result: False +Description: TypeDependencyNamespace.ChildClass is not Types that do not depend on "TypeDependencyNamespace.ClassWithoutDependencies" or "TypeDependencyNamespace.BaseClass" +Message: +"Types that are "TypeDependencyNamespace.ChildClass" should be Types that do not depend on "TypeDependencyNamespace.ClassWithoutDependencies" or "TypeDependencyNamespace.BaseClass"" failed: + TypeDependencyNamespace.ChildClass is not Types that do not depend on "TypeDependencyNamespace.ClassWithoutDependencies" or "TypeDependencyNamespace.BaseClass" + + + +Query: Types that are "TypeDependencyNamespace.ChildClass" should be Types that do not depend on "TypeDependencyNamespace.ClassWithoutDependencies" or "TypeDependencyNamespace.BaseClass" +Result: False +Description: TypeDependencyNamespace.ChildClass is not Types that do not depend on "TypeDependencyNamespace.ClassWithoutDependencies" or "TypeDependencyNamespace.BaseClass" +Message: +"Types that are "TypeDependencyNamespace.ChildClass" should be Types that do not depend on "TypeDependencyNamespace.ClassWithoutDependencies" or "TypeDependencyNamespace.BaseClass"" failed: + TypeDependencyNamespace.ChildClass is not Types that do not depend on "TypeDependencyNamespace.ClassWithoutDependencies" or "TypeDependencyNamespace.BaseClass" + + + +Query: Types that are "TypeDependencyNamespace.ChildClass" should be Types that do not depend on "TypeDependencyNamespace.ClassWithoutDependencies" or "TypeDependencyNamespace.BaseClass" +Result: False +Description: TypeDependencyNamespace.ChildClass is not Types that do not depend on "TypeDependencyNamespace.ClassWithoutDependencies" or "TypeDependencyNamespace.BaseClass" +Message: +"Types that are "TypeDependencyNamespace.ChildClass" should be Types that do not depend on "TypeDependencyNamespace.ClassWithoutDependencies" or "TypeDependencyNamespace.BaseClass"" failed: + TypeDependencyNamespace.ChildClass is not Types that do not depend on "TypeDependencyNamespace.ClassWithoutDependencies" or "TypeDependencyNamespace.BaseClass" + + + +----- Predicates as conditions ----- + +Query: Types that are "TypeDependencyNamespace.ChildClass" should be types that do not depend on "TypeDependencyNamespace.ClassWithoutDependencies" or "TypeDependencyNamespace.BaseClass" +Result: False +Description: TypeDependencyNamespace.ChildClass is not "TypeDependencyNamespace.BaseClass" or "TypeDependencyNamespace.BaseClassWithMember" or "TypeDependencyNamespace.ChildClassWithMember" or "TypeDependencyNamespace.OtherChildClassWithMember" or "TypeDependencyNamespace.BaseClassWithMultipleDependencies" or "TypeDependencyNamespace.ChildClass1" or "TypeDependencyNamespace.ChildClass2" or "TypeDependencyNamespace.OtherBaseClass" or "TypeDependencyNamespace.ClassWithMultipleDependencies" or "TypeDependencyNamespace.GenericBaseClass`1" or "TypeDependencyNamespace.ChildClassOfGeneric" or "TypeDependencyNamespace.ClassWithoutDependencies" or "TypeDependencyNamespace.OtherClassWithoutDependencies" or "TypeDependencyNamespace.Issue351" or "MethodDependencyNamespace.MethodDependencyClass" or "System.Object" or "System.Void" or "System.String" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Int32" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" or "System.Collections.Generic.List`1" or "System.Func`2" or "System.IntPtr" or "System.Linq.Enumerable" or "System.Collections.Generic.IEnumerable`1" or "System.Linq.IGrouping`2" or "System.Collections.Generic.IReadOnlyCollection`1" or "System.Collections.Generic.Dictionary`2" +Message: +"Types that are "TypeDependencyNamespace.ChildClass" should be types that do not depend on "TypeDependencyNamespace.ClassWithoutDependencies" or "TypeDependencyNamespace.BaseClass"" failed: + TypeDependencyNamespace.ChildClass is not "TypeDependencyNamespace.BaseClass" or "TypeDependencyNamespace.BaseClassWithMember" or "TypeDependencyNamespace.ChildClassWithMember" or "TypeDependencyNamespace.OtherChildClassWithMember" or "TypeDependencyNamespace.BaseClassWithMultipleDependencies" or "TypeDependencyNamespace.ChildClass1" or "TypeDependencyNamespace.ChildClass2" or "TypeDependencyNamespace.OtherBaseClass" or "TypeDependencyNamespace.ClassWithMultipleDependencies" or "TypeDependencyNamespace.GenericBaseClass`1" or "TypeDependencyNamespace.ChildClassOfGeneric" or "TypeDependencyNamespace.ClassWithoutDependencies" or "TypeDependencyNamespace.OtherClassWithoutDependencies" or "TypeDependencyNamespace.Issue351" or "MethodDependencyNamespace.MethodDependencyClass" or "System.Object" or "System.Void" or "System.String" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Int32" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" or "System.Collections.Generic.List`1" or "System.Func`2" or "System.IntPtr" or "System.Linq.Enumerable" or "System.Collections.Generic.IEnumerable`1" or "System.Linq.IGrouping`2" or "System.Collections.Generic.IReadOnlyCollection`1" or "System.Collections.Generic.Dictionary`2" + + + +Query: Types that are "TypeDependencyNamespace.ChildClass" should be types that do not depend on "TypeDependencyNamespace.ClassWithoutDependencies" or "TypeDependencyNamespace.BaseClass" +Result: False +Description: TypeDependencyNamespace.ChildClass is not "TypeDependencyNamespace.BaseClass" or "TypeDependencyNamespace.BaseClassWithMember" or "TypeDependencyNamespace.ChildClassWithMember" or "TypeDependencyNamespace.OtherChildClassWithMember" or "TypeDependencyNamespace.BaseClassWithMultipleDependencies" or "TypeDependencyNamespace.ChildClass1" or "TypeDependencyNamespace.ChildClass2" or "TypeDependencyNamespace.OtherBaseClass" or "TypeDependencyNamespace.ClassWithMultipleDependencies" or "TypeDependencyNamespace.GenericBaseClass`1" or "TypeDependencyNamespace.ChildClassOfGeneric" or "TypeDependencyNamespace.ClassWithoutDependencies" or "TypeDependencyNamespace.OtherClassWithoutDependencies" or "TypeDependencyNamespace.Issue351" or "MethodDependencyNamespace.MethodDependencyClass" or "System.Object" or "System.Void" or "System.String" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Int32" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" or "System.Collections.Generic.List`1" or "System.Func`2" or "System.IntPtr" or "System.Linq.Enumerable" or "System.Collections.Generic.IEnumerable`1" or "System.Linq.IGrouping`2" or "System.Collections.Generic.IReadOnlyCollection`1" or "System.Collections.Generic.Dictionary`2" +Message: +"Types that are "TypeDependencyNamespace.ChildClass" should be types that do not depend on "TypeDependencyNamespace.ClassWithoutDependencies" or "TypeDependencyNamespace.BaseClass"" failed: + TypeDependencyNamespace.ChildClass is not "TypeDependencyNamespace.BaseClass" or "TypeDependencyNamespace.BaseClassWithMember" or "TypeDependencyNamespace.ChildClassWithMember" or "TypeDependencyNamespace.OtherChildClassWithMember" or "TypeDependencyNamespace.BaseClassWithMultipleDependencies" or "TypeDependencyNamespace.ChildClass1" or "TypeDependencyNamespace.ChildClass2" or "TypeDependencyNamespace.OtherBaseClass" or "TypeDependencyNamespace.ClassWithMultipleDependencies" or "TypeDependencyNamespace.GenericBaseClass`1" or "TypeDependencyNamespace.ChildClassOfGeneric" or "TypeDependencyNamespace.ClassWithoutDependencies" or "TypeDependencyNamespace.OtherClassWithoutDependencies" or "TypeDependencyNamespace.Issue351" or "MethodDependencyNamespace.MethodDependencyClass" or "System.Object" or "System.Void" or "System.String" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Int32" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" or "System.Collections.Generic.List`1" or "System.Func`2" or "System.IntPtr" or "System.Linq.Enumerable" or "System.Collections.Generic.IEnumerable`1" or "System.Linq.IGrouping`2" or "System.Collections.Generic.IReadOnlyCollection`1" or "System.Collections.Generic.Dictionary`2" + + + +Query: Types that are "TypeDependencyNamespace.ChildClass" should be types that do not depend on "TypeDependencyNamespace.ClassWithoutDependencies" or "TypeDependencyNamespace.BaseClass" +Result: False +Description: TypeDependencyNamespace.ChildClass is not "TypeDependencyNamespace.BaseClass" or "TypeDependencyNamespace.BaseClassWithMember" or "TypeDependencyNamespace.ChildClassWithMember" or "TypeDependencyNamespace.OtherChildClassWithMember" or "TypeDependencyNamespace.BaseClassWithMultipleDependencies" or "TypeDependencyNamespace.ChildClass1" or "TypeDependencyNamespace.ChildClass2" or "TypeDependencyNamespace.OtherBaseClass" or "TypeDependencyNamespace.ClassWithMultipleDependencies" or "TypeDependencyNamespace.GenericBaseClass`1" or "TypeDependencyNamespace.ChildClassOfGeneric" or "TypeDependencyNamespace.ClassWithoutDependencies" or "TypeDependencyNamespace.OtherClassWithoutDependencies" or "TypeDependencyNamespace.Issue351" or "MethodDependencyNamespace.MethodDependencyClass" or "System.Object" or "System.Void" or "System.String" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Int32" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" or "System.Collections.Generic.List`1" or "System.Func`2" or "System.IntPtr" or "System.Linq.Enumerable" or "System.Collections.Generic.IEnumerable`1" or "System.Linq.IGrouping`2" or "System.Collections.Generic.IReadOnlyCollection`1" or "System.Collections.Generic.Dictionary`2" +Message: +"Types that are "TypeDependencyNamespace.ChildClass" should be types that do not depend on "TypeDependencyNamespace.ClassWithoutDependencies" or "TypeDependencyNamespace.BaseClass"" failed: + TypeDependencyNamespace.ChildClass is not "TypeDependencyNamespace.BaseClass" or "TypeDependencyNamespace.BaseClassWithMember" or "TypeDependencyNamespace.ChildClassWithMember" or "TypeDependencyNamespace.OtherChildClassWithMember" or "TypeDependencyNamespace.BaseClassWithMultipleDependencies" or "TypeDependencyNamespace.ChildClass1" or "TypeDependencyNamespace.ChildClass2" or "TypeDependencyNamespace.OtherBaseClass" or "TypeDependencyNamespace.ClassWithMultipleDependencies" or "TypeDependencyNamespace.GenericBaseClass`1" or "TypeDependencyNamespace.ChildClassOfGeneric" or "TypeDependencyNamespace.ClassWithoutDependencies" or "TypeDependencyNamespace.OtherClassWithoutDependencies" or "TypeDependencyNamespace.Issue351" or "MethodDependencyNamespace.MethodDependencyClass" or "System.Object" or "System.Void" or "System.String" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Int32" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" or "System.Collections.Generic.List`1" or "System.Func`2" or "System.IntPtr" or "System.Linq.Enumerable" or "System.Collections.Generic.IEnumerable`1" or "System.Linq.IGrouping`2" or "System.Collections.Generic.IReadOnlyCollection`1" or "System.Collections.Generic.Dictionary`2" + + + +Query: Types that are "TypeDependencyNamespace.ChildClass" should be types that do not depend on "TypeDependencyNamespace.ClassWithoutDependencies" or "TypeDependencyNamespace.BaseClass" +Result: False +Description: TypeDependencyNamespace.ChildClass is not "TypeDependencyNamespace.BaseClass" or "TypeDependencyNamespace.BaseClassWithMember" or "TypeDependencyNamespace.ChildClassWithMember" or "TypeDependencyNamespace.OtherChildClassWithMember" or "TypeDependencyNamespace.BaseClassWithMultipleDependencies" or "TypeDependencyNamespace.ChildClass1" or "TypeDependencyNamespace.ChildClass2" or "TypeDependencyNamespace.OtherBaseClass" or "TypeDependencyNamespace.ClassWithMultipleDependencies" or "TypeDependencyNamespace.GenericBaseClass`1" or "TypeDependencyNamespace.ChildClassOfGeneric" or "TypeDependencyNamespace.ClassWithoutDependencies" or "TypeDependencyNamespace.OtherClassWithoutDependencies" or "TypeDependencyNamespace.Issue351" or "MethodDependencyNamespace.MethodDependencyClass" or "System.Object" or "System.Void" or "System.String" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Int32" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" or "System.Collections.Generic.List`1" or "System.Func`2" or "System.IntPtr" or "System.Linq.Enumerable" or "System.Collections.Generic.IEnumerable`1" or "System.Linq.IGrouping`2" or "System.Collections.Generic.IReadOnlyCollection`1" or "System.Collections.Generic.Dictionary`2" +Message: +"Types that are "TypeDependencyNamespace.ChildClass" should be types that do not depend on "TypeDependencyNamespace.ClassWithoutDependencies" or "TypeDependencyNamespace.BaseClass"" failed: + TypeDependencyNamespace.ChildClass is not "TypeDependencyNamespace.BaseClass" or "TypeDependencyNamespace.BaseClassWithMember" or "TypeDependencyNamespace.ChildClassWithMember" or "TypeDependencyNamespace.OtherChildClassWithMember" or "TypeDependencyNamespace.BaseClassWithMultipleDependencies" or "TypeDependencyNamespace.ChildClass1" or "TypeDependencyNamespace.ChildClass2" or "TypeDependencyNamespace.OtherBaseClass" or "TypeDependencyNamespace.ClassWithMultipleDependencies" or "TypeDependencyNamespace.GenericBaseClass`1" or "TypeDependencyNamespace.ChildClassOfGeneric" or "TypeDependencyNamespace.ClassWithoutDependencies" or "TypeDependencyNamespace.OtherClassWithoutDependencies" or "TypeDependencyNamespace.Issue351" or "MethodDependencyNamespace.MethodDependencyClass" or "System.Object" or "System.Void" or "System.String" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Int32" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" or "System.Collections.Generic.List`1" or "System.Func`2" or "System.IntPtr" or "System.Linq.Enumerable" or "System.Collections.Generic.IEnumerable`1" or "System.Linq.IGrouping`2" or "System.Collections.Generic.IReadOnlyCollection`1" or "System.Collections.Generic.Dictionary`2" + + + ===== Input with multiple dependencies ===== +----- Conditions ----- + Query: Types that are "TypeDependencyNamespace.ClassWithMultipleDependencies" should not depend on any "TypeDependencyNamespace.BaseClassWithMember" or "TypeDependencyNamespace.OtherBaseClass" Result: False Description: TypeDependencyNamespace.ClassWithMultipleDependencies does depend on TypeDependencyNamespace.BaseClassWithMember and TypeDependencyNamespace.OtherBaseClass @@ -181,3 +453,97 @@ Message: +----- Predicates ----- + +Query: Types that are "TypeDependencyNamespace.ClassWithMultipleDependencies" should be Types that do not depend on "TypeDependencyNamespace.BaseClassWithMember" or "TypeDependencyNamespace.OtherBaseClass" +Result: False +Description: TypeDependencyNamespace.ClassWithMultipleDependencies is not Types that do not depend on "TypeDependencyNamespace.BaseClassWithMember" or "TypeDependencyNamespace.OtherBaseClass" +Message: +"Types that are "TypeDependencyNamespace.ClassWithMultipleDependencies" should be Types that do not depend on "TypeDependencyNamespace.BaseClassWithMember" or "TypeDependencyNamespace.OtherBaseClass"" failed: + TypeDependencyNamespace.ClassWithMultipleDependencies is not Types that do not depend on "TypeDependencyNamespace.BaseClassWithMember" or "TypeDependencyNamespace.OtherBaseClass" + + + +Query: Types that are "TypeDependencyNamespace.ClassWithMultipleDependencies" should be Types that do not depend on "TypeDependencyNamespace.BaseClassWithMember" or "TypeDependencyNamespace.OtherBaseClass" +Result: False +Description: TypeDependencyNamespace.ClassWithMultipleDependencies is not Types that do not depend on "TypeDependencyNamespace.BaseClassWithMember" or "TypeDependencyNamespace.OtherBaseClass" +Message: +"Types that are "TypeDependencyNamespace.ClassWithMultipleDependencies" should be Types that do not depend on "TypeDependencyNamespace.BaseClassWithMember" or "TypeDependencyNamespace.OtherBaseClass"" failed: + TypeDependencyNamespace.ClassWithMultipleDependencies is not Types that do not depend on "TypeDependencyNamespace.BaseClassWithMember" or "TypeDependencyNamespace.OtherBaseClass" + + + +Query: Types that are "TypeDependencyNamespace.ClassWithMultipleDependencies" should be Types that do not depend on "TypeDependencyNamespace.BaseClassWithMember" or "TypeDependencyNamespace.OtherBaseClass" +Result: False +Description: TypeDependencyNamespace.ClassWithMultipleDependencies is not Types that do not depend on "TypeDependencyNamespace.BaseClassWithMember" or "TypeDependencyNamespace.OtherBaseClass" +Message: +"Types that are "TypeDependencyNamespace.ClassWithMultipleDependencies" should be Types that do not depend on "TypeDependencyNamespace.BaseClassWithMember" or "TypeDependencyNamespace.OtherBaseClass"" failed: + TypeDependencyNamespace.ClassWithMultipleDependencies is not Types that do not depend on "TypeDependencyNamespace.BaseClassWithMember" or "TypeDependencyNamespace.OtherBaseClass" + + + +Query: Types that are "TypeDependencyNamespace.ClassWithMultipleDependencies" should be Types that do not depend on "TypeDependencyNamespace.BaseClassWithMember" or "TypeDependencyNamespace.OtherBaseClass" +Result: False +Description: TypeDependencyNamespace.ClassWithMultipleDependencies is not Types that do not depend on "TypeDependencyNamespace.BaseClassWithMember" or "TypeDependencyNamespace.OtherBaseClass" +Message: +"Types that are "TypeDependencyNamespace.ClassWithMultipleDependencies" should be Types that do not depend on "TypeDependencyNamespace.BaseClassWithMember" or "TypeDependencyNamespace.OtherBaseClass"" failed: + TypeDependencyNamespace.ClassWithMultipleDependencies is not Types that do not depend on "TypeDependencyNamespace.BaseClassWithMember" or "TypeDependencyNamespace.OtherBaseClass" + + + +Query: Types that are "TypeDependencyNamespace.ClassWithMultipleDependencies" should be Classes that do not depend on "TypeDependencyNamespace.BaseClassWithMember" or "TypeDependencyNamespace.OtherBaseClass" +Result: False +Description: TypeDependencyNamespace.ClassWithMultipleDependencies is not Classes that do not depend on "TypeDependencyNamespace.BaseClassWithMember" or "TypeDependencyNamespace.OtherBaseClass" +Message: +"Types that are "TypeDependencyNamespace.ClassWithMultipleDependencies" should be Classes that do not depend on "TypeDependencyNamespace.BaseClassWithMember" or "TypeDependencyNamespace.OtherBaseClass"" failed: + TypeDependencyNamespace.ClassWithMultipleDependencies is not Classes that do not depend on "TypeDependencyNamespace.BaseClassWithMember" or "TypeDependencyNamespace.OtherBaseClass" + + + +----- Predicates as conditions ----- + +Query: Types that are "TypeDependencyNamespace.ClassWithMultipleDependencies" should be types that do not depend on "TypeDependencyNamespace.BaseClassWithMember" or "TypeDependencyNamespace.OtherBaseClass" +Result: False +Description: TypeDependencyNamespace.ClassWithMultipleDependencies is not "TypeDependencyNamespace.BaseClass" or "TypeDependencyNamespace.ChildClass" or "TypeDependencyNamespace.OtherChildClass" or "TypeDependencyNamespace.BaseClassWithMember" or "TypeDependencyNamespace.BaseClassWithMultipleDependencies" or "TypeDependencyNamespace.ChildClass1" or "TypeDependencyNamespace.ChildClass2" or "TypeDependencyNamespace.OtherBaseClass" or "TypeDependencyNamespace.GenericBaseClass`1" or "TypeDependencyNamespace.ChildClassOfGeneric" or "TypeDependencyNamespace.ClassWithoutDependencies" or "TypeDependencyNamespace.OtherClassWithoutDependencies" or "TypeDependencyNamespace.Issue351" or "MethodDependencyNamespace.MethodDependencyClass" or "System.Object" or "System.Void" or "System.String" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Int32" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" or "System.Collections.Generic.List`1" or "System.Func`2" or "System.IntPtr" or "System.Linq.Enumerable" or "System.Collections.Generic.IEnumerable`1" or "System.Linq.IGrouping`2" or "System.Collections.Generic.IReadOnlyCollection`1" or "System.Collections.Generic.Dictionary`2" +Message: +"Types that are "TypeDependencyNamespace.ClassWithMultipleDependencies" should be types that do not depend on "TypeDependencyNamespace.BaseClassWithMember" or "TypeDependencyNamespace.OtherBaseClass"" failed: + TypeDependencyNamespace.ClassWithMultipleDependencies is not "TypeDependencyNamespace.BaseClass" or "TypeDependencyNamespace.ChildClass" or "TypeDependencyNamespace.OtherChildClass" or "TypeDependencyNamespace.BaseClassWithMember" or "TypeDependencyNamespace.BaseClassWithMultipleDependencies" or "TypeDependencyNamespace.ChildClass1" or "TypeDependencyNamespace.ChildClass2" or "TypeDependencyNamespace.OtherBaseClass" or "TypeDependencyNamespace.GenericBaseClass`1" or "TypeDependencyNamespace.ChildClassOfGeneric" or "TypeDependencyNamespace.ClassWithoutDependencies" or "TypeDependencyNamespace.OtherClassWithoutDependencies" or "TypeDependencyNamespace.Issue351" or "MethodDependencyNamespace.MethodDependencyClass" or "System.Object" or "System.Void" or "System.String" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Int32" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" or "System.Collections.Generic.List`1" or "System.Func`2" or "System.IntPtr" or "System.Linq.Enumerable" or "System.Collections.Generic.IEnumerable`1" or "System.Linq.IGrouping`2" or "System.Collections.Generic.IReadOnlyCollection`1" or "System.Collections.Generic.Dictionary`2" + + + +Query: Types that are "TypeDependencyNamespace.ClassWithMultipleDependencies" should be types that do not depend on "TypeDependencyNamespace.BaseClassWithMember" or "TypeDependencyNamespace.OtherBaseClass" +Result: False +Description: TypeDependencyNamespace.ClassWithMultipleDependencies is not "TypeDependencyNamespace.BaseClass" or "TypeDependencyNamespace.ChildClass" or "TypeDependencyNamespace.OtherChildClass" or "TypeDependencyNamespace.BaseClassWithMember" or "TypeDependencyNamespace.BaseClassWithMultipleDependencies" or "TypeDependencyNamespace.ChildClass1" or "TypeDependencyNamespace.ChildClass2" or "TypeDependencyNamespace.OtherBaseClass" or "TypeDependencyNamespace.GenericBaseClass`1" or "TypeDependencyNamespace.ChildClassOfGeneric" or "TypeDependencyNamespace.ClassWithoutDependencies" or "TypeDependencyNamespace.OtherClassWithoutDependencies" or "TypeDependencyNamespace.Issue351" or "MethodDependencyNamespace.MethodDependencyClass" or "System.Object" or "System.Void" or "System.String" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Int32" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" or "System.Collections.Generic.List`1" or "System.Func`2" or "System.IntPtr" or "System.Linq.Enumerable" or "System.Collections.Generic.IEnumerable`1" or "System.Linq.IGrouping`2" or "System.Collections.Generic.IReadOnlyCollection`1" or "System.Collections.Generic.Dictionary`2" +Message: +"Types that are "TypeDependencyNamespace.ClassWithMultipleDependencies" should be types that do not depend on "TypeDependencyNamespace.BaseClassWithMember" or "TypeDependencyNamespace.OtherBaseClass"" failed: + TypeDependencyNamespace.ClassWithMultipleDependencies is not "TypeDependencyNamespace.BaseClass" or "TypeDependencyNamespace.ChildClass" or "TypeDependencyNamespace.OtherChildClass" or "TypeDependencyNamespace.BaseClassWithMember" or "TypeDependencyNamespace.BaseClassWithMultipleDependencies" or "TypeDependencyNamespace.ChildClass1" or "TypeDependencyNamespace.ChildClass2" or "TypeDependencyNamespace.OtherBaseClass" or "TypeDependencyNamespace.GenericBaseClass`1" or "TypeDependencyNamespace.ChildClassOfGeneric" or "TypeDependencyNamespace.ClassWithoutDependencies" or "TypeDependencyNamespace.OtherClassWithoutDependencies" or "TypeDependencyNamespace.Issue351" or "MethodDependencyNamespace.MethodDependencyClass" or "System.Object" or "System.Void" or "System.String" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Int32" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" or "System.Collections.Generic.List`1" or "System.Func`2" or "System.IntPtr" or "System.Linq.Enumerable" or "System.Collections.Generic.IEnumerable`1" or "System.Linq.IGrouping`2" or "System.Collections.Generic.IReadOnlyCollection`1" or "System.Collections.Generic.Dictionary`2" + + + +Query: Types that are "TypeDependencyNamespace.ClassWithMultipleDependencies" should be types that do not depend on "TypeDependencyNamespace.BaseClassWithMember" or "TypeDependencyNamespace.OtherBaseClass" +Result: False +Description: TypeDependencyNamespace.ClassWithMultipleDependencies is not "TypeDependencyNamespace.BaseClass" or "TypeDependencyNamespace.ChildClass" or "TypeDependencyNamespace.OtherChildClass" or "TypeDependencyNamespace.BaseClassWithMember" or "TypeDependencyNamespace.BaseClassWithMultipleDependencies" or "TypeDependencyNamespace.ChildClass1" or "TypeDependencyNamespace.ChildClass2" or "TypeDependencyNamespace.OtherBaseClass" or "TypeDependencyNamespace.GenericBaseClass`1" or "TypeDependencyNamespace.ChildClassOfGeneric" or "TypeDependencyNamespace.ClassWithoutDependencies" or "TypeDependencyNamespace.OtherClassWithoutDependencies" or "TypeDependencyNamespace.Issue351" or "MethodDependencyNamespace.MethodDependencyClass" or "System.Object" or "System.Void" or "System.String" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Int32" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" or "System.Collections.Generic.List`1" or "System.Func`2" or "System.IntPtr" or "System.Linq.Enumerable" or "System.Collections.Generic.IEnumerable`1" or "System.Linq.IGrouping`2" or "System.Collections.Generic.IReadOnlyCollection`1" or "System.Collections.Generic.Dictionary`2" +Message: +"Types that are "TypeDependencyNamespace.ClassWithMultipleDependencies" should be types that do not depend on "TypeDependencyNamespace.BaseClassWithMember" or "TypeDependencyNamespace.OtherBaseClass"" failed: + TypeDependencyNamespace.ClassWithMultipleDependencies is not "TypeDependencyNamespace.BaseClass" or "TypeDependencyNamespace.ChildClass" or "TypeDependencyNamespace.OtherChildClass" or "TypeDependencyNamespace.BaseClassWithMember" or "TypeDependencyNamespace.BaseClassWithMultipleDependencies" or "TypeDependencyNamespace.ChildClass1" or "TypeDependencyNamespace.ChildClass2" or "TypeDependencyNamespace.OtherBaseClass" or "TypeDependencyNamespace.GenericBaseClass`1" or "TypeDependencyNamespace.ChildClassOfGeneric" or "TypeDependencyNamespace.ClassWithoutDependencies" or "TypeDependencyNamespace.OtherClassWithoutDependencies" or "TypeDependencyNamespace.Issue351" or "MethodDependencyNamespace.MethodDependencyClass" or "System.Object" or "System.Void" or "System.String" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Int32" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" or "System.Collections.Generic.List`1" or "System.Func`2" or "System.IntPtr" or "System.Linq.Enumerable" or "System.Collections.Generic.IEnumerable`1" or "System.Linq.IGrouping`2" or "System.Collections.Generic.IReadOnlyCollection`1" or "System.Collections.Generic.Dictionary`2" + + + +Query: Types that are "TypeDependencyNamespace.ClassWithMultipleDependencies" should be types that do not depend on "TypeDependencyNamespace.BaseClassWithMember" or "TypeDependencyNamespace.OtherBaseClass" +Result: False +Description: TypeDependencyNamespace.ClassWithMultipleDependencies is not "TypeDependencyNamespace.BaseClass" or "TypeDependencyNamespace.ChildClass" or "TypeDependencyNamespace.OtherChildClass" or "TypeDependencyNamespace.BaseClassWithMember" or "TypeDependencyNamespace.BaseClassWithMultipleDependencies" or "TypeDependencyNamespace.ChildClass1" or "TypeDependencyNamespace.ChildClass2" or "TypeDependencyNamespace.OtherBaseClass" or "TypeDependencyNamespace.GenericBaseClass`1" or "TypeDependencyNamespace.ChildClassOfGeneric" or "TypeDependencyNamespace.ClassWithoutDependencies" or "TypeDependencyNamespace.OtherClassWithoutDependencies" or "TypeDependencyNamespace.Issue351" or "MethodDependencyNamespace.MethodDependencyClass" or "System.Object" or "System.Void" or "System.String" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Int32" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" or "System.Collections.Generic.List`1" or "System.Func`2" or "System.IntPtr" or "System.Linq.Enumerable" or "System.Collections.Generic.IEnumerable`1" or "System.Linq.IGrouping`2" or "System.Collections.Generic.IReadOnlyCollection`1" or "System.Collections.Generic.Dictionary`2" +Message: +"Types that are "TypeDependencyNamespace.ClassWithMultipleDependencies" should be types that do not depend on "TypeDependencyNamespace.BaseClassWithMember" or "TypeDependencyNamespace.OtherBaseClass"" failed: + TypeDependencyNamespace.ClassWithMultipleDependencies is not "TypeDependencyNamespace.BaseClass" or "TypeDependencyNamespace.ChildClass" or "TypeDependencyNamespace.OtherChildClass" or "TypeDependencyNamespace.BaseClassWithMember" or "TypeDependencyNamespace.BaseClassWithMultipleDependencies" or "TypeDependencyNamespace.ChildClass1" or "TypeDependencyNamespace.ChildClass2" or "TypeDependencyNamespace.OtherBaseClass" or "TypeDependencyNamespace.GenericBaseClass`1" or "TypeDependencyNamespace.ChildClassOfGeneric" or "TypeDependencyNamespace.ClassWithoutDependencies" or "TypeDependencyNamespace.OtherClassWithoutDependencies" or "TypeDependencyNamespace.Issue351" or "MethodDependencyNamespace.MethodDependencyClass" or "System.Object" or "System.Void" or "System.String" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Int32" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" or "System.Collections.Generic.List`1" or "System.Func`2" or "System.IntPtr" or "System.Linq.Enumerable" or "System.Collections.Generic.IEnumerable`1" or "System.Linq.IGrouping`2" or "System.Collections.Generic.IReadOnlyCollection`1" or "System.Collections.Generic.Dictionary`2" + + + +Query: Types that are "TypeDependencyNamespace.ClassWithMultipleDependencies" should be types that do not depend on any Classes that are "TypeDependencyNamespace.BaseClassWithMember" or "TypeDependencyNamespace.OtherBaseClass" +Result: False +Description: TypeDependencyNamespace.ClassWithMultipleDependencies is not "TypeDependencyNamespace.BaseClass" or "TypeDependencyNamespace.ChildClass" or "TypeDependencyNamespace.OtherChildClass" or "TypeDependencyNamespace.BaseClassWithMember" or "TypeDependencyNamespace.BaseClassWithMultipleDependencies" or "TypeDependencyNamespace.ChildClass1" or "TypeDependencyNamespace.ChildClass2" or "TypeDependencyNamespace.OtherBaseClass" or "TypeDependencyNamespace.GenericBaseClass`1" or "TypeDependencyNamespace.ChildClassOfGeneric" or "TypeDependencyNamespace.ClassWithoutDependencies" or "TypeDependencyNamespace.OtherClassWithoutDependencies" or "TypeDependencyNamespace.Issue351" or "MethodDependencyNamespace.MethodDependencyClass" or "System.Object" or "System.Void" or "System.String" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Int32" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" or "System.Collections.Generic.List`1" or "System.Func`2" or "System.IntPtr" or "System.Linq.Enumerable" or "System.Collections.Generic.IEnumerable`1" or "System.Linq.IGrouping`2" or "System.Collections.Generic.IReadOnlyCollection`1" or "System.Collections.Generic.Dictionary`2" +Message: +"Types that are "TypeDependencyNamespace.ClassWithMultipleDependencies" should be types that do not depend on any Classes that are "TypeDependencyNamespace.BaseClassWithMember" or "TypeDependencyNamespace.OtherBaseClass"" failed: + TypeDependencyNamespace.ClassWithMultipleDependencies is not "TypeDependencyNamespace.BaseClass" or "TypeDependencyNamespace.ChildClass" or "TypeDependencyNamespace.OtherChildClass" or "TypeDependencyNamespace.BaseClassWithMember" or "TypeDependencyNamespace.BaseClassWithMultipleDependencies" or "TypeDependencyNamespace.ChildClass1" or "TypeDependencyNamespace.ChildClass2" or "TypeDependencyNamespace.OtherBaseClass" or "TypeDependencyNamespace.GenericBaseClass`1" or "TypeDependencyNamespace.ChildClassOfGeneric" or "TypeDependencyNamespace.ClassWithoutDependencies" or "TypeDependencyNamespace.OtherClassWithoutDependencies" or "TypeDependencyNamespace.Issue351" or "MethodDependencyNamespace.MethodDependencyClass" or "System.Object" or "System.Void" or "System.String" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Int32" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" or "System.Collections.Generic.List`1" or "System.Func`2" or "System.IntPtr" or "System.Linq.Enumerable" or "System.Collections.Generic.IEnumerable`1" or "System.Linq.IGrouping`2" or "System.Collections.Generic.IReadOnlyCollection`1" or "System.Collections.Generic.Dictionary`2" + + + diff --git a/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.NotHaveAnyAttributesTest.verified.txt b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.NotHaveAnyAttributesTest.verified.txt index 5a92b57df..ed5aca96e 100644 --- a/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.NotHaveAnyAttributesTest.verified.txt +++ b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.NotHaveAnyAttributesTest.verified.txt @@ -1,5 +1,7 @@ ===== No violations ===== +----- Conditions ----- + Query: Types that are "AttributeNamespace.ClassWithSingleAttribute" should not have any "AttributeNamespace.UnusedAttribute" Result: True Description: AttributeNamespace.ClassWithSingleAttribute passed @@ -30,8 +32,74 @@ Description: AttributeNamespace.ClassWithSingleAttribute passed Message: All Evaluations passed +----- Predicates ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttribute" should be Types that do not have attribute "AttributeNamespace.UnusedAttribute" +Result: True +Description: AttributeNamespace.ClassWithSingleAttribute passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithSingleAttribute" should be Types that do not have attribute "AttributeNamespace.UnusedAttribute" +Result: True +Description: AttributeNamespace.ClassWithSingleAttribute passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithSingleAttribute" should be Types that do not have attribute "AttributeNamespace.UnusedAttribute" +Result: True +Description: AttributeNamespace.ClassWithSingleAttribute passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithSingleAttribute" should be Types that do not have attribute "AttributeNamespace.UnusedAttribute" +Result: True +Description: AttributeNamespace.ClassWithSingleAttribute passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithSingleAttribute" should be Types that do not have any Attributes that are "AttributeNamespace.UnusedAttribute" +Result: True +Description: AttributeNamespace.ClassWithSingleAttribute passed +Message: +All Evaluations passed + +----- Predicates as conditions ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttribute" should be types that do not have attribute "AttributeNamespace.UnusedAttribute" +Result: True +Description: AttributeNamespace.ClassWithSingleAttribute passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithSingleAttribute" should be types that do not have attribute "AttributeNamespace.UnusedAttribute" +Result: True +Description: AttributeNamespace.ClassWithSingleAttribute passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithSingleAttribute" should be types that do not have attribute "AttributeNamespace.UnusedAttribute" +Result: True +Description: AttributeNamespace.ClassWithSingleAttribute passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithSingleAttribute" should be types that do not have attribute "AttributeNamespace.UnusedAttribute" +Result: True +Description: AttributeNamespace.ClassWithSingleAttribute passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithSingleAttribute" should be types that do not have any Attributes that are "AttributeNamespace.UnusedAttribute" +Result: True +Description: AttributeNamespace.ClassWithSingleAttribute passed +Message: +All Evaluations passed + ===== Violations ===== +----- Conditions ----- + Query: Types that are "AttributeNamespace.ClassWithSingleAttribute" should not have any "AttributeNamespace.Attribute1" Result: False Description: AttributeNamespace.ClassWithSingleAttribute does have attribute AttributeNamespace.Attribute1 @@ -77,13 +145,127 @@ Message: +----- Predicates ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttribute" should be Types that do not have attribute "AttributeNamespace.Attribute1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttribute is not Types that do not have attribute "AttributeNamespace.Attribute1" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttribute" should be Types that do not have attribute "AttributeNamespace.Attribute1"" failed: + AttributeNamespace.ClassWithSingleAttribute is not Types that do not have attribute "AttributeNamespace.Attribute1" + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttribute" should be Types that do not have attribute "AttributeNamespace.Attribute1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttribute is not Types that do not have attribute "AttributeNamespace.Attribute1" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttribute" should be Types that do not have attribute "AttributeNamespace.Attribute1"" failed: + AttributeNamespace.ClassWithSingleAttribute is not Types that do not have attribute "AttributeNamespace.Attribute1" + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttribute" should be Types that do not have attribute "AttributeNamespace.Attribute1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttribute is not Types that do not have attribute "AttributeNamespace.Attribute1" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttribute" should be Types that do not have attribute "AttributeNamespace.Attribute1"" failed: + AttributeNamespace.ClassWithSingleAttribute is not Types that do not have attribute "AttributeNamespace.Attribute1" + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttribute" should be Types that do not have attribute "AttributeNamespace.Attribute1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttribute is not Types that do not have attribute "AttributeNamespace.Attribute1" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttribute" should be Types that do not have attribute "AttributeNamespace.Attribute1"" failed: + AttributeNamespace.ClassWithSingleAttribute is not Types that do not have attribute "AttributeNamespace.Attribute1" + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttribute" should be Types that do not have any Attributes that are "AttributeNamespace.Attribute1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttribute is not Types that do not have any Attributes that are "AttributeNamespace.Attribute1" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttribute" should be Types that do not have any Attributes that are "AttributeNamespace.Attribute1"" failed: + AttributeNamespace.ClassWithSingleAttribute is not Types that do not have any Attributes that are "AttributeNamespace.Attribute1" + + + +----- Predicates as conditions ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttribute" should be types that do not have attribute "AttributeNamespace.Attribute1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttribute is not "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" or "AttributeNamespace.Attribute3" or "AttributeNamespace.UnusedAttribute" or "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "AttributeNamespace.OnceUsedAttribute" or "AttributeNamespace.ClassWithSingleUniquelyUsedAttribute" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttribute" should be types that do not have attribute "AttributeNamespace.Attribute1"" failed: + AttributeNamespace.ClassWithSingleAttribute is not "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" or "AttributeNamespace.Attribute3" or "AttributeNamespace.UnusedAttribute" or "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "AttributeNamespace.OnceUsedAttribute" or "AttributeNamespace.ClassWithSingleUniquelyUsedAttribute" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttribute" should be types that do not have attribute "AttributeNamespace.Attribute1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttribute is not "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" or "AttributeNamespace.Attribute3" or "AttributeNamespace.UnusedAttribute" or "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "AttributeNamespace.OnceUsedAttribute" or "AttributeNamespace.ClassWithSingleUniquelyUsedAttribute" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttribute" should be types that do not have attribute "AttributeNamespace.Attribute1"" failed: + AttributeNamespace.ClassWithSingleAttribute is not "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" or "AttributeNamespace.Attribute3" or "AttributeNamespace.UnusedAttribute" or "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "AttributeNamespace.OnceUsedAttribute" or "AttributeNamespace.ClassWithSingleUniquelyUsedAttribute" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttribute" should be types that do not have attribute "AttributeNamespace.Attribute1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttribute is not "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" or "AttributeNamespace.Attribute3" or "AttributeNamespace.UnusedAttribute" or "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "AttributeNamespace.OnceUsedAttribute" or "AttributeNamespace.ClassWithSingleUniquelyUsedAttribute" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttribute" should be types that do not have attribute "AttributeNamespace.Attribute1"" failed: + AttributeNamespace.ClassWithSingleAttribute is not "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" or "AttributeNamespace.Attribute3" or "AttributeNamespace.UnusedAttribute" or "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "AttributeNamespace.OnceUsedAttribute" or "AttributeNamespace.ClassWithSingleUniquelyUsedAttribute" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttribute" should be types that do not have attribute "AttributeNamespace.Attribute1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttribute is not "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" or "AttributeNamespace.Attribute3" or "AttributeNamespace.UnusedAttribute" or "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "AttributeNamespace.OnceUsedAttribute" or "AttributeNamespace.ClassWithSingleUniquelyUsedAttribute" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttribute" should be types that do not have attribute "AttributeNamespace.Attribute1"" failed: + AttributeNamespace.ClassWithSingleAttribute is not "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" or "AttributeNamespace.Attribute3" or "AttributeNamespace.UnusedAttribute" or "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "AttributeNamespace.OnceUsedAttribute" or "AttributeNamespace.ClassWithSingleUniquelyUsedAttribute" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttribute" should be types that do not have any Attributes that are "AttributeNamespace.Attribute1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttribute is not "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" or "AttributeNamespace.Attribute3" or "AttributeNamespace.UnusedAttribute" or "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "AttributeNamespace.OnceUsedAttribute" or "AttributeNamespace.ClassWithSingleUniquelyUsedAttribute" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttribute" should be types that do not have any Attributes that are "AttributeNamespace.Attribute1"" failed: + AttributeNamespace.ClassWithSingleAttribute is not "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" or "AttributeNamespace.Attribute3" or "AttributeNamespace.UnusedAttribute" or "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "AttributeNamespace.OnceUsedAttribute" or "AttributeNamespace.ClassWithSingleUniquelyUsedAttribute" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" + + + ===== Type outside of architecture ===== +----- Conditions ----- + Query: Types that are "AttributeNamespace.ClassWithTwoAttributes" should not have any "TypeDependencyNamespace.BaseClass" Exception: Type TypeDependencyNamespace.BaseClass does not exist in provided architecture or is no class. +----- Predicates ----- + +Query: Types that are "AttributeNamespace.ClassWithTwoAttributes" should be Types that do not have attribute "TypeDependencyNamespace.BaseClass" +Result: True +Description: AttributeNamespace.ClassWithTwoAttributes passed +Message: +All Evaluations passed + +----- Predicates as conditions ----- + +Query: Types that are "AttributeNamespace.ClassWithTwoAttributes" should be types that do not have attribute "TypeDependencyNamespace.BaseClass" +Result: True +Description: AttributeNamespace.ClassWithTwoAttributes passed +Message: +All Evaluations passed + ===== Empty arguments ===== +----- Conditions ----- + Query: Types that are "AttributeNamespace.ClassWithoutAttributes" should not have any of no attributes (always true) Result: True Description: AttributeNamespace.ClassWithoutAttributes passed @@ -102,20 +284,50 @@ Description: AttributeNamespace.ClassWithoutAttributes passed Message: All Evaluations passed -Query: Types that have full name "NotTheNameOfAnyObject" should not have any of no attributes (always true) +----- Predicates ----- + +Query: Types that are "AttributeNamespace.ClassWithoutAttributes" should be Types that do not have one of no attributes (always true) +Result: True +Description: AttributeNamespace.ClassWithoutAttributes passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithoutAttributes" should be Types that do not have one of no attributes (always true) +Result: True +Description: AttributeNamespace.ClassWithoutAttributes passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithoutAttributes" should be Types that do not have any Attributes that have full name "NotTheNameOfAnyObject" +Result: True +Description: AttributeNamespace.ClassWithoutAttributes passed +Message: +All Evaluations passed + +----- Predicates as conditions ----- + +Query: Types that are "AttributeNamespace.ClassWithoutAttributes" should be types that do not have one of no attributes (always true) +Result: True +Description: AttributeNamespace.ClassWithoutAttributes passed Message: All Evaluations passed -Query: Types that have full name "NotTheNameOfAnyObject" should not have any of no attributes (always true) +Query: Types that are "AttributeNamespace.ClassWithoutAttributes" should be types that do not have one of no attributes (always true) +Result: True +Description: AttributeNamespace.ClassWithoutAttributes passed Message: All Evaluations passed -Query: Types that have full name "NotTheNameOfAnyObject" should not have any Attributes that have full name "NotTheNameOfAnyObject" +Query: Types that are "AttributeNamespace.ClassWithoutAttributes" should be types that do not have any Attributes that have full name "NotTheNameOfAnyObject" +Result: True +Description: AttributeNamespace.ClassWithoutAttributes passed Message: All Evaluations passed ===== Multiple arguments ===== +----- Conditions ----- + Query: Types that are "AttributeNamespace.ClassWithTwoAttributes" should not have any "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" Result: False Description: AttributeNamespace.ClassWithTwoAttributes does have attribute AttributeNamespace.Attribute1 and AttributeNamespace.Attribute2 @@ -161,8 +373,104 @@ Message: +----- Predicates ----- + +Query: Types that are "AttributeNamespace.ClassWithTwoAttributes" should be Types that do not have attribute "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" +Result: False +Description: AttributeNamespace.ClassWithTwoAttributes is not Types that do not have attribute "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" +Message: +"Types that are "AttributeNamespace.ClassWithTwoAttributes" should be Types that do not have attribute "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2"" failed: + AttributeNamespace.ClassWithTwoAttributes is not Types that do not have attribute "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" + + + +Query: Types that are "AttributeNamespace.ClassWithTwoAttributes" should be Types that do not have attribute "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" +Result: False +Description: AttributeNamespace.ClassWithTwoAttributes is not Types that do not have attribute "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" +Message: +"Types that are "AttributeNamespace.ClassWithTwoAttributes" should be Types that do not have attribute "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2"" failed: + AttributeNamespace.ClassWithTwoAttributes is not Types that do not have attribute "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" + + + +Query: Types that are "AttributeNamespace.ClassWithTwoAttributes" should be Types that do not have attribute "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" +Result: False +Description: AttributeNamespace.ClassWithTwoAttributes is not Types that do not have attribute "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" +Message: +"Types that are "AttributeNamespace.ClassWithTwoAttributes" should be Types that do not have attribute "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2"" failed: + AttributeNamespace.ClassWithTwoAttributes is not Types that do not have attribute "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" + + + +Query: Types that are "AttributeNamespace.ClassWithTwoAttributes" should be Types that do not have attribute "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" +Result: False +Description: AttributeNamespace.ClassWithTwoAttributes is not Types that do not have attribute "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" +Message: +"Types that are "AttributeNamespace.ClassWithTwoAttributes" should be Types that do not have attribute "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2"" failed: + AttributeNamespace.ClassWithTwoAttributes is not Types that do not have attribute "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" + + + +Query: Types that are "AttributeNamespace.ClassWithTwoAttributes" should be Types that do not have any Attributes that are "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" +Result: False +Description: AttributeNamespace.ClassWithTwoAttributes is not Types that do not have any Attributes that are "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" +Message: +"Types that are "AttributeNamespace.ClassWithTwoAttributes" should be Types that do not have any Attributes that are "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2"" failed: + AttributeNamespace.ClassWithTwoAttributes is not Types that do not have any Attributes that are "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" + + + +----- Predicates as conditions ----- + +Query: Types that are "AttributeNamespace.ClassWithTwoAttributes" should be types that do not have attribute "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" +Result: False +Description: AttributeNamespace.ClassWithTwoAttributes is not "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" or "AttributeNamespace.Attribute3" or "AttributeNamespace.UnusedAttribute" or "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "AttributeNamespace.OnceUsedAttribute" or "AttributeNamespace.ClassWithSingleUniquelyUsedAttribute" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" +Message: +"Types that are "AttributeNamespace.ClassWithTwoAttributes" should be types that do not have attribute "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2"" failed: + AttributeNamespace.ClassWithTwoAttributes is not "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" or "AttributeNamespace.Attribute3" or "AttributeNamespace.UnusedAttribute" or "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "AttributeNamespace.OnceUsedAttribute" or "AttributeNamespace.ClassWithSingleUniquelyUsedAttribute" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" + + + +Query: Types that are "AttributeNamespace.ClassWithTwoAttributes" should be types that do not have attribute "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" +Result: False +Description: AttributeNamespace.ClassWithTwoAttributes is not "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" or "AttributeNamespace.Attribute3" or "AttributeNamespace.UnusedAttribute" or "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "AttributeNamespace.OnceUsedAttribute" or "AttributeNamespace.ClassWithSingleUniquelyUsedAttribute" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" +Message: +"Types that are "AttributeNamespace.ClassWithTwoAttributes" should be types that do not have attribute "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2"" failed: + AttributeNamespace.ClassWithTwoAttributes is not "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" or "AttributeNamespace.Attribute3" or "AttributeNamespace.UnusedAttribute" or "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "AttributeNamespace.OnceUsedAttribute" or "AttributeNamespace.ClassWithSingleUniquelyUsedAttribute" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" + + + +Query: Types that are "AttributeNamespace.ClassWithTwoAttributes" should be types that do not have attribute "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" +Result: False +Description: AttributeNamespace.ClassWithTwoAttributes is not "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" or "AttributeNamespace.Attribute3" or "AttributeNamespace.UnusedAttribute" or "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "AttributeNamespace.OnceUsedAttribute" or "AttributeNamespace.ClassWithSingleUniquelyUsedAttribute" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" +Message: +"Types that are "AttributeNamespace.ClassWithTwoAttributes" should be types that do not have attribute "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2"" failed: + AttributeNamespace.ClassWithTwoAttributes is not "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" or "AttributeNamespace.Attribute3" or "AttributeNamespace.UnusedAttribute" or "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "AttributeNamespace.OnceUsedAttribute" or "AttributeNamespace.ClassWithSingleUniquelyUsedAttribute" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" + + + +Query: Types that are "AttributeNamespace.ClassWithTwoAttributes" should be types that do not have attribute "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" +Result: False +Description: AttributeNamespace.ClassWithTwoAttributes is not "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" or "AttributeNamespace.Attribute3" or "AttributeNamespace.UnusedAttribute" or "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "AttributeNamespace.OnceUsedAttribute" or "AttributeNamespace.ClassWithSingleUniquelyUsedAttribute" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" +Message: +"Types that are "AttributeNamespace.ClassWithTwoAttributes" should be types that do not have attribute "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2"" failed: + AttributeNamespace.ClassWithTwoAttributes is not "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" or "AttributeNamespace.Attribute3" or "AttributeNamespace.UnusedAttribute" or "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "AttributeNamespace.OnceUsedAttribute" or "AttributeNamespace.ClassWithSingleUniquelyUsedAttribute" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" + + + +Query: Types that are "AttributeNamespace.ClassWithTwoAttributes" should be types that do not have any Attributes that are "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" +Result: False +Description: AttributeNamespace.ClassWithTwoAttributes is not "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" or "AttributeNamespace.Attribute3" or "AttributeNamespace.UnusedAttribute" or "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "AttributeNamespace.OnceUsedAttribute" or "AttributeNamespace.ClassWithSingleUniquelyUsedAttribute" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" +Message: +"Types that are "AttributeNamespace.ClassWithTwoAttributes" should be types that do not have any Attributes that are "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2"" failed: + AttributeNamespace.ClassWithTwoAttributes is not "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" or "AttributeNamespace.Attribute3" or "AttributeNamespace.UnusedAttribute" or "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "AttributeNamespace.OnceUsedAttribute" or "AttributeNamespace.ClassWithSingleUniquelyUsedAttribute" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" + + + ===== Multiple inputs ===== +----- Conditions ----- + Query: Types that are "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.ClassWithSingleAttribute" should not have any "AttributeNamespace.Attribute2" Result: True Description: AttributeNamespace.ClassWithoutAttributes passed @@ -182,3 +490,45 @@ Message: +----- Predicates ----- + +Query: Types that are "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.ClassWithSingleAttribute" should be Types that do not have attribute "AttributeNamespace.Attribute2" +Result: True +Description: AttributeNamespace.ClassWithoutAttributes passed +Result: True +Description: AttributeNamespace.ClassWithSingleAttribute passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.ClassWithSingleAttribute" should be Types that do not have attribute "AttributeNamespace.Attribute1" +Result: True +Description: AttributeNamespace.ClassWithoutAttributes passed +Result: False +Description: AttributeNamespace.ClassWithSingleAttribute is not Types that do not have attribute "AttributeNamespace.Attribute1" +Message: +"Types that are "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.ClassWithSingleAttribute" should be Types that do not have attribute "AttributeNamespace.Attribute1"" failed: + AttributeNamespace.ClassWithSingleAttribute is not Types that do not have attribute "AttributeNamespace.Attribute1" + + + +----- Predicates as conditions ----- + +Query: Types that are "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.ClassWithSingleAttribute" should be types that do not have attribute "AttributeNamespace.Attribute2" +Result: True +Description: AttributeNamespace.ClassWithoutAttributes passed +Result: True +Description: AttributeNamespace.ClassWithSingleAttribute passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.ClassWithSingleAttribute" should be types that do not have attribute "AttributeNamespace.Attribute1" +Result: True +Description: AttributeNamespace.ClassWithoutAttributes passed +Result: False +Description: AttributeNamespace.ClassWithSingleAttribute is not "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" or "AttributeNamespace.Attribute3" or "AttributeNamespace.UnusedAttribute" or "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "AttributeNamespace.OnceUsedAttribute" or "AttributeNamespace.ClassWithSingleUniquelyUsedAttribute" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" +Message: +"Types that are "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.ClassWithSingleAttribute" should be types that do not have attribute "AttributeNamespace.Attribute1"" failed: + AttributeNamespace.ClassWithSingleAttribute is not "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" or "AttributeNamespace.Attribute3" or "AttributeNamespace.UnusedAttribute" or "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "AttributeNamespace.OnceUsedAttribute" or "AttributeNamespace.ClassWithSingleUniquelyUsedAttribute" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" + + + diff --git a/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.NotHaveAnyAttributesWithArgumentsTest.verified.txt b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.NotHaveAnyAttributesWithArgumentsTest.verified.txt index a33c088c1..97c61cdfd 100644 --- a/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.NotHaveAnyAttributesWithArgumentsTest.verified.txt +++ b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.NotHaveAnyAttributesWithArgumentsTest.verified.txt @@ -1,5 +1,7 @@ ===== No violations with type arguments ===== +----- Conditions ----- + Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should not have any attributes with arguments "AttributeNamespace.UnusedTypeArgument" Result: True Description: AttributeNamespace.ClassWithSingleAttributeWithArguments passed @@ -12,8 +14,38 @@ Description: AttributeNamespace.ClassWithSingleAttributeWithArguments passed Message: All Evaluations passed +----- Predicates ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be Types that do not have any attributes with arguments "AttributeNamespace.UnusedTypeArgument" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be Types that do not have any attributes with arguments "AttributeNamespace.UnusedTypeArgument" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments passed +Message: +All Evaluations passed + +----- Predicates as conditions ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be types that do not have any attributes with arguments "AttributeNamespace.UnusedTypeArgument" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be types that do not have any attributes with arguments "AttributeNamespace.UnusedTypeArgument" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments passed +Message: +All Evaluations passed + ===== No violations with value arguments ===== +----- Conditions ----- + Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should not have any attributes with arguments "NotTheValueOfAnyAttribute" Result: True Description: AttributeNamespace.ClassWithSingleAttributeWithArguments passed @@ -26,8 +58,38 @@ Description: AttributeNamespace.ClassWithSingleAttributeWithArguments passed Message: All Evaluations passed +----- Predicates ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be Types that do not have any attributes with arguments "NotTheValueOfAnyAttribute" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be Types that do not have any attributes with arguments "NotTheValueOfAnyAttribute" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments passed +Message: +All Evaluations passed + +----- Predicates as conditions ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be types that do not have any attributes with arguments "NotTheValueOfAnyAttribute" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be types that do not have any attributes with arguments "NotTheValueOfAnyAttribute" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments passed +Message: +All Evaluations passed + ===== Violations with type arguments ===== +----- Conditions ----- + Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should not have any attributes with arguments "AttributeNamespace.TypeArgument1" Result: False Description: AttributeNamespace.ClassWithSingleAttributeWithArguments does have attributes with argument values "Argument1" and "Argument1" and "1" and "ArchUnitNET.Domain.TypeInstance`1[ArchUnitNET.Domain.Class]" @@ -46,8 +108,50 @@ Message: +----- Predicates ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be Types that do not have any attributes with arguments "AttributeNamespace.TypeArgument1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments is not Types that do not have any attributes with arguments "AttributeNamespace.TypeArgument1" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be Types that do not have any attributes with arguments "AttributeNamespace.TypeArgument1"" failed: + AttributeNamespace.ClassWithSingleAttributeWithArguments is not Types that do not have any attributes with arguments "AttributeNamespace.TypeArgument1" + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be Types that do not have any attributes with arguments "AttributeNamespace.TypeArgument1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments is not Types that do not have any attributes with arguments "AttributeNamespace.TypeArgument1" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be Types that do not have any attributes with arguments "AttributeNamespace.TypeArgument1"" failed: + AttributeNamespace.ClassWithSingleAttributeWithArguments is not Types that do not have any attributes with arguments "AttributeNamespace.TypeArgument1" + + + +----- Predicates as conditions ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be types that do not have any attributes with arguments "AttributeNamespace.TypeArgument1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments is not "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" or "AttributeNamespace.Attribute3" or "AttributeNamespace.UnusedAttribute" or "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.ClassWithSingleAttribute" or "AttributeNamespace.ClassWithTwoAttributes" or "AttributeNamespace.ClassWithThreeAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "AttributeNamespace.OnceUsedAttribute" or "AttributeNamespace.ClassWithSingleUniquelyUsedAttribute" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be types that do not have any attributes with arguments "AttributeNamespace.TypeArgument1"" failed: + AttributeNamespace.ClassWithSingleAttributeWithArguments is not "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" or "AttributeNamespace.Attribute3" or "AttributeNamespace.UnusedAttribute" or "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.ClassWithSingleAttribute" or "AttributeNamespace.ClassWithTwoAttributes" or "AttributeNamespace.ClassWithThreeAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "AttributeNamespace.OnceUsedAttribute" or "AttributeNamespace.ClassWithSingleUniquelyUsedAttribute" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be types that do not have any attributes with arguments "AttributeNamespace.TypeArgument1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments is not "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" or "AttributeNamespace.Attribute3" or "AttributeNamespace.UnusedAttribute" or "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.ClassWithSingleAttribute" or "AttributeNamespace.ClassWithTwoAttributes" or "AttributeNamespace.ClassWithThreeAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "AttributeNamespace.OnceUsedAttribute" or "AttributeNamespace.ClassWithSingleUniquelyUsedAttribute" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be types that do not have any attributes with arguments "AttributeNamespace.TypeArgument1"" failed: + AttributeNamespace.ClassWithSingleAttributeWithArguments is not "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" or "AttributeNamespace.Attribute3" or "AttributeNamespace.UnusedAttribute" or "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.ClassWithSingleAttribute" or "AttributeNamespace.ClassWithTwoAttributes" or "AttributeNamespace.ClassWithThreeAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "AttributeNamespace.OnceUsedAttribute" or "AttributeNamespace.ClassWithSingleUniquelyUsedAttribute" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" + + + ===== Violations with value arguments ===== +----- Conditions ----- + Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should not have any attributes with arguments "1" Result: False Description: AttributeNamespace.ClassWithSingleAttributeWithArguments does have attributes with argument values "Argument1" and "Argument1" and "1" and "ArchUnitNET.Domain.TypeInstance`1[ArchUnitNET.Domain.Class]" @@ -66,32 +170,128 @@ Message: +----- Predicates ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be Types that do not have any attributes with arguments "1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments is not Types that do not have any attributes with arguments "1" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be Types that do not have any attributes with arguments "1"" failed: + AttributeNamespace.ClassWithSingleAttributeWithArguments is not Types that do not have any attributes with arguments "1" + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be Types that do not have any attributes with arguments "1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments is not Types that do not have any attributes with arguments "1" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be Types that do not have any attributes with arguments "1"" failed: + AttributeNamespace.ClassWithSingleAttributeWithArguments is not Types that do not have any attributes with arguments "1" + + + +----- Predicates as conditions ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be types that do not have any attributes with arguments "1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments is not "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" or "AttributeNamespace.Attribute3" or "AttributeNamespace.UnusedAttribute" or "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.ClassWithSingleAttribute" or "AttributeNamespace.ClassWithTwoAttributes" or "AttributeNamespace.ClassWithThreeAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "AttributeNamespace.OnceUsedAttribute" or "AttributeNamespace.ClassWithSingleUniquelyUsedAttribute" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be types that do not have any attributes with arguments "1"" failed: + AttributeNamespace.ClassWithSingleAttributeWithArguments is not "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" or "AttributeNamespace.Attribute3" or "AttributeNamespace.UnusedAttribute" or "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.ClassWithSingleAttribute" or "AttributeNamespace.ClassWithTwoAttributes" or "AttributeNamespace.ClassWithThreeAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "AttributeNamespace.OnceUsedAttribute" or "AttributeNamespace.ClassWithSingleUniquelyUsedAttribute" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be types that do not have any attributes with arguments "1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments is not "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" or "AttributeNamespace.Attribute3" or "AttributeNamespace.UnusedAttribute" or "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.ClassWithSingleAttribute" or "AttributeNamespace.ClassWithTwoAttributes" or "AttributeNamespace.ClassWithThreeAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "AttributeNamespace.OnceUsedAttribute" or "AttributeNamespace.ClassWithSingleUniquelyUsedAttribute" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be types that do not have any attributes with arguments "1"" failed: + AttributeNamespace.ClassWithSingleAttributeWithArguments is not "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" or "AttributeNamespace.Attribute3" or "AttributeNamespace.UnusedAttribute" or "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.ClassWithSingleAttribute" or "AttributeNamespace.ClassWithTwoAttributes" or "AttributeNamespace.ClassWithThreeAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "AttributeNamespace.OnceUsedAttribute" or "AttributeNamespace.ClassWithSingleUniquelyUsedAttribute" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" + + + ===== Type without attributes ===== +----- Conditions ----- + Query: Types that are "AttributeNamespace.ClassWithoutAttributes" should not have any attributes with arguments "Argument1" Result: True Description: AttributeNamespace.ClassWithoutAttributes passed Message: All Evaluations passed +----- Predicates ----- + +Query: Types that are "AttributeNamespace.ClassWithoutAttributes" should be Types that do not have any attributes with arguments "Argument1" +Result: True +Description: AttributeNamespace.ClassWithoutAttributes passed +Message: +All Evaluations passed + +----- Predicates as conditions ----- + +Query: Types that are "AttributeNamespace.ClassWithoutAttributes" should be types that do not have any attributes with arguments "Argument1" +Result: True +Description: AttributeNamespace.ClassWithoutAttributes passed +Message: +All Evaluations passed + ===== Null argument ===== +----- Conditions ----- + Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should not have any attributes with arguments "" Result: True Description: AttributeNamespace.ClassWithSingleAttributeWithArguments passed Message: All Evaluations passed +----- Predicates ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be Types that do not have any attributes with arguments "" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments passed +Message: +All Evaluations passed + +----- Predicates as conditions ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be types that do not have any attributes with arguments "" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments passed +Message: +All Evaluations passed + ===== Empty arguments ===== +----- Conditions ----- + Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should not have no or any attributes with arguments (impossible) Result: True Description: AttributeNamespace.ClassWithSingleAttributeWithArguments passed Message: All Evaluations passed +----- Predicates ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be Types that do not have no or any attributes with arguments (impossible) +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments passed +Message: +All Evaluations passed + +----- Predicates as conditions ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be types that do not have no or any attributes with arguments (impossible) +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments passed +Message: +All Evaluations passed + ===== Multiple arguments ===== +----- Conditions ----- + Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should not have any attributes with arguments "AttributeNamespace.UnusedTypeArgument" and "Argument1" Result: False Description: AttributeNamespace.ClassWithSingleAttributeWithArguments does have attributes with argument values "Argument1" and "Argument1" and "1" and "ArchUnitNET.Domain.TypeInstance`1[ArchUnitNET.Domain.Class]" @@ -110,8 +310,50 @@ Message: +----- Predicates ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be Types that do not have any attributes with arguments "AttributeNamespace.UnusedTypeArgument" and "Argument1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments is not Types that do not have any attributes with arguments "AttributeNamespace.UnusedTypeArgument" and "Argument1" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be Types that do not have any attributes with arguments "AttributeNamespace.UnusedTypeArgument" and "Argument1"" failed: + AttributeNamespace.ClassWithSingleAttributeWithArguments is not Types that do not have any attributes with arguments "AttributeNamespace.UnusedTypeArgument" and "Argument1" + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be Types that do not have any attributes with arguments "AttributeNamespace.UnusedTypeArgument" and "Argument1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments is not Types that do not have any attributes with arguments "AttributeNamespace.UnusedTypeArgument" and "Argument1" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be Types that do not have any attributes with arguments "AttributeNamespace.UnusedTypeArgument" and "Argument1"" failed: + AttributeNamespace.ClassWithSingleAttributeWithArguments is not Types that do not have any attributes with arguments "AttributeNamespace.UnusedTypeArgument" and "Argument1" + + + +----- Predicates as conditions ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be types that do not have any attributes with arguments "AttributeNamespace.UnusedTypeArgument" and "Argument1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments is not "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" or "AttributeNamespace.Attribute3" or "AttributeNamespace.UnusedAttribute" or "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.ClassWithSingleAttribute" or "AttributeNamespace.ClassWithTwoAttributes" or "AttributeNamespace.ClassWithThreeAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "AttributeNamespace.OnceUsedAttribute" or "AttributeNamespace.ClassWithSingleUniquelyUsedAttribute" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be types that do not have any attributes with arguments "AttributeNamespace.UnusedTypeArgument" and "Argument1"" failed: + AttributeNamespace.ClassWithSingleAttributeWithArguments is not "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" or "AttributeNamespace.Attribute3" or "AttributeNamespace.UnusedAttribute" or "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.ClassWithSingleAttribute" or "AttributeNamespace.ClassWithTwoAttributes" or "AttributeNamespace.ClassWithThreeAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "AttributeNamespace.OnceUsedAttribute" or "AttributeNamespace.ClassWithSingleUniquelyUsedAttribute" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be types that do not have any attributes with arguments "AttributeNamespace.UnusedTypeArgument" and "Argument1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments is not "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" or "AttributeNamespace.Attribute3" or "AttributeNamespace.UnusedAttribute" or "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.ClassWithSingleAttribute" or "AttributeNamespace.ClassWithTwoAttributes" or "AttributeNamespace.ClassWithThreeAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "AttributeNamespace.OnceUsedAttribute" or "AttributeNamespace.ClassWithSingleUniquelyUsedAttribute" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be types that do not have any attributes with arguments "AttributeNamespace.UnusedTypeArgument" and "Argument1"" failed: + AttributeNamespace.ClassWithSingleAttributeWithArguments is not "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" or "AttributeNamespace.Attribute3" or "AttributeNamespace.UnusedAttribute" or "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.ClassWithSingleAttribute" or "AttributeNamespace.ClassWithTwoAttributes" or "AttributeNamespace.ClassWithThreeAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "AttributeNamespace.OnceUsedAttribute" or "AttributeNamespace.ClassWithSingleUniquelyUsedAttribute" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" + + + ===== Multiple inputs ===== +----- Conditions ----- + Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" or "AttributeNamespace.ClassWithTwoAttributesWithArguments" should not have any attributes with arguments "Argument1" Result: False Description: AttributeNamespace.ClassWithSingleAttributeWithArguments does have attributes with argument values "Argument1" and "Argument1" and "1" and "ArchUnitNET.Domain.TypeInstance`1[ArchUnitNET.Domain.Class]" @@ -136,3 +378,55 @@ Message: +----- Predicates ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" or "AttributeNamespace.ClassWithTwoAttributesWithArguments" should be Types that do not have any attributes with arguments "Argument1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments is not Types that do not have any attributes with arguments "Argument1" +Result: False +Description: AttributeNamespace.ClassWithTwoAttributesWithArguments is not Types that do not have any attributes with arguments "Argument1" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" or "AttributeNamespace.ClassWithTwoAttributesWithArguments" should be Types that do not have any attributes with arguments "Argument1"" failed: + AttributeNamespace.ClassWithSingleAttributeWithArguments is not Types that do not have any attributes with arguments "Argument1" + AttributeNamespace.ClassWithTwoAttributesWithArguments is not Types that do not have any attributes with arguments "Argument1" + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" or "AttributeNamespace.ClassWithTwoAttributesWithArguments" should be Types that do not have any attributes with arguments "Argument1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments is not Types that do not have any attributes with arguments "Argument1" +Result: False +Description: AttributeNamespace.ClassWithTwoAttributesWithArguments is not Types that do not have any attributes with arguments "Argument1" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" or "AttributeNamespace.ClassWithTwoAttributesWithArguments" should be Types that do not have any attributes with arguments "Argument1"" failed: + AttributeNamespace.ClassWithSingleAttributeWithArguments is not Types that do not have any attributes with arguments "Argument1" + AttributeNamespace.ClassWithTwoAttributesWithArguments is not Types that do not have any attributes with arguments "Argument1" + + + +----- Predicates as conditions ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" or "AttributeNamespace.ClassWithTwoAttributesWithArguments" should be types that do not have any attributes with arguments "Argument1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments is not "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" or "AttributeNamespace.Attribute3" or "AttributeNamespace.UnusedAttribute" or "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.ClassWithSingleAttribute" or "AttributeNamespace.ClassWithTwoAttributes" or "AttributeNamespace.ClassWithThreeAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "AttributeNamespace.OnceUsedAttribute" or "AttributeNamespace.ClassWithSingleUniquelyUsedAttribute" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" +Result: False +Description: AttributeNamespace.ClassWithTwoAttributesWithArguments is not "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" or "AttributeNamespace.Attribute3" or "AttributeNamespace.UnusedAttribute" or "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.ClassWithSingleAttribute" or "AttributeNamespace.ClassWithTwoAttributes" or "AttributeNamespace.ClassWithThreeAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "AttributeNamespace.OnceUsedAttribute" or "AttributeNamespace.ClassWithSingleUniquelyUsedAttribute" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" or "AttributeNamespace.ClassWithTwoAttributesWithArguments" should be types that do not have any attributes with arguments "Argument1"" failed: + AttributeNamespace.ClassWithSingleAttributeWithArguments is not "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" or "AttributeNamespace.Attribute3" or "AttributeNamespace.UnusedAttribute" or "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.ClassWithSingleAttribute" or "AttributeNamespace.ClassWithTwoAttributes" or "AttributeNamespace.ClassWithThreeAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "AttributeNamespace.OnceUsedAttribute" or "AttributeNamespace.ClassWithSingleUniquelyUsedAttribute" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" + AttributeNamespace.ClassWithTwoAttributesWithArguments is not "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" or "AttributeNamespace.Attribute3" or "AttributeNamespace.UnusedAttribute" or "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.ClassWithSingleAttribute" or "AttributeNamespace.ClassWithTwoAttributes" or "AttributeNamespace.ClassWithThreeAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "AttributeNamespace.OnceUsedAttribute" or "AttributeNamespace.ClassWithSingleUniquelyUsedAttribute" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" or "AttributeNamespace.ClassWithTwoAttributesWithArguments" should be types that do not have any attributes with arguments "Argument1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments is not "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" or "AttributeNamespace.Attribute3" or "AttributeNamespace.UnusedAttribute" or "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.ClassWithSingleAttribute" or "AttributeNamespace.ClassWithTwoAttributes" or "AttributeNamespace.ClassWithThreeAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "AttributeNamespace.OnceUsedAttribute" or "AttributeNamespace.ClassWithSingleUniquelyUsedAttribute" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" +Result: False +Description: AttributeNamespace.ClassWithTwoAttributesWithArguments is not "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" or "AttributeNamespace.Attribute3" or "AttributeNamespace.UnusedAttribute" or "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.ClassWithSingleAttribute" or "AttributeNamespace.ClassWithTwoAttributes" or "AttributeNamespace.ClassWithThreeAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "AttributeNamespace.OnceUsedAttribute" or "AttributeNamespace.ClassWithSingleUniquelyUsedAttribute" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" or "AttributeNamespace.ClassWithTwoAttributesWithArguments" should be types that do not have any attributes with arguments "Argument1"" failed: + AttributeNamespace.ClassWithSingleAttributeWithArguments is not "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" or "AttributeNamespace.Attribute3" or "AttributeNamespace.UnusedAttribute" or "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.ClassWithSingleAttribute" or "AttributeNamespace.ClassWithTwoAttributes" or "AttributeNamespace.ClassWithThreeAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "AttributeNamespace.OnceUsedAttribute" or "AttributeNamespace.ClassWithSingleUniquelyUsedAttribute" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" + AttributeNamespace.ClassWithTwoAttributesWithArguments is not "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" or "AttributeNamespace.Attribute3" or "AttributeNamespace.UnusedAttribute" or "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.ClassWithSingleAttribute" or "AttributeNamespace.ClassWithTwoAttributes" or "AttributeNamespace.ClassWithThreeAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "AttributeNamespace.OnceUsedAttribute" or "AttributeNamespace.ClassWithSingleUniquelyUsedAttribute" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" + + + diff --git a/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.NotHaveAnyAttributesWithNamedArgumentsTest.verified.txt b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.NotHaveAnyAttributesWithNamedArgumentsTest.verified.txt index 940da8f6b..f04fddd6c 100644 --- a/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.NotHaveAnyAttributesWithNamedArgumentsTest.verified.txt +++ b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.NotHaveAnyAttributesWithNamedArgumentsTest.verified.txt @@ -1,5 +1,7 @@ ===== No violations with type arguments ===== +----- Conditions ----- + Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should not have any attributes with named arguments "InvalidName=AttributeNamespace.TypeArgument1" Result: True Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments passed @@ -24,8 +26,62 @@ Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments passe Message: All Evaluations passed +----- Predicates ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be Types that do not have any attributes with named arguments "InvalidName=AttributeNamespace.TypeArgument1" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be Types that do not have any attributes with named arguments "InvalidName=AttributeNamespace.TypeArgument1" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be Types that do not have any attributes with named arguments "NamedParameter1=AttributeNamespace.UnusedTypeArgument" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be Types that do not have any attributes with named arguments "NamedParameter1=AttributeNamespace.UnusedTypeArgument" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments passed +Message: +All Evaluations passed + +----- Predicates as conditions ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be types that do not have any attributes with named arguments "InvalidName=AttributeNamespace.TypeArgument1" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be types that do not have any attributes with named arguments "InvalidName=AttributeNamespace.TypeArgument1" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be types that do not have any attributes with named arguments "NamedParameter1=AttributeNamespace.UnusedTypeArgument" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be types that do not have any attributes with named arguments "NamedParameter1=AttributeNamespace.UnusedTypeArgument" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments passed +Message: +All Evaluations passed + ===== No violations with value arguments ===== +----- Conditions ----- + Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should not have any attributes with named arguments "InvalidName=Argument1" Result: True Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments passed @@ -50,8 +106,62 @@ Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments passe Message: All Evaluations passed +----- Predicates ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be Types that do not have any attributes with named arguments "InvalidName=Argument1" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be Types that do not have any attributes with named arguments "InvalidName=Argument1" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be Types that do not have any attributes with named arguments "NamedParameter2=NotTheValueOfAnyAttribute" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be Types that do not have any attributes with named arguments "NamedParameter2=NotTheValueOfAnyAttribute" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments passed +Message: +All Evaluations passed + +----- Predicates as conditions ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be types that do not have any attributes with named arguments "InvalidName=Argument1" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be types that do not have any attributes with named arguments "InvalidName=Argument1" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be types that do not have any attributes with named arguments "NamedParameter2=NotTheValueOfAnyAttribute" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be types that do not have any attributes with named arguments "NamedParameter2=NotTheValueOfAnyAttribute" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments passed +Message: +All Evaluations passed + ===== Violations with type arguments ===== +----- Conditions ----- + Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should not have any attributes with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" Result: False Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments does have attributes with named arguments "NamedParameter1=ArchUnitNET.Domain.TypeInstance`1[ArchUnitNET.Domain.Class]" and "NamedParameter1=ArchUnitNET.Domain.TypeInstance`1[ArchUnitNET.Domain.Class]" and "NamedParameter2=Argument1" and "NamedParameter3=1" @@ -70,8 +180,50 @@ Message: +----- Predicates ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be Types that do not have any attributes with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not Types that do not have any attributes with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be Types that do not have any attributes with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1"" failed: + AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not Types that do not have any attributes with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be Types that do not have any attributes with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not Types that do not have any attributes with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be Types that do not have any attributes with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1"" failed: + AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not Types that do not have any attributes with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" + + + +----- Predicates as conditions ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be types that do not have any attributes with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" or "AttributeNamespace.Attribute3" or "AttributeNamespace.UnusedAttribute" or "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.ClassWithSingleAttribute" or "AttributeNamespace.ClassWithTwoAttributes" or "AttributeNamespace.ClassWithThreeAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "AttributeNamespace.ClassWithSingleAttributeWithArguments" or "AttributeNamespace.ClassWithTwoAttributesWithArguments" or "AttributeNamespace.ClassWithThreeAttributesWithArguments" or "AttributeNamespace.OnceUsedAttribute" or "AttributeNamespace.ClassWithSingleUniquelyUsedAttribute" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be types that do not have any attributes with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1"" failed: + AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" or "AttributeNamespace.Attribute3" or "AttributeNamespace.UnusedAttribute" or "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.ClassWithSingleAttribute" or "AttributeNamespace.ClassWithTwoAttributes" or "AttributeNamespace.ClassWithThreeAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "AttributeNamespace.ClassWithSingleAttributeWithArguments" or "AttributeNamespace.ClassWithTwoAttributesWithArguments" or "AttributeNamespace.ClassWithThreeAttributesWithArguments" or "AttributeNamespace.OnceUsedAttribute" or "AttributeNamespace.ClassWithSingleUniquelyUsedAttribute" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be types that do not have any attributes with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" or "AttributeNamespace.Attribute3" or "AttributeNamespace.UnusedAttribute" or "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.ClassWithSingleAttribute" or "AttributeNamespace.ClassWithTwoAttributes" or "AttributeNamespace.ClassWithThreeAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "AttributeNamespace.ClassWithSingleAttributeWithArguments" or "AttributeNamespace.ClassWithTwoAttributesWithArguments" or "AttributeNamespace.ClassWithThreeAttributesWithArguments" or "AttributeNamespace.OnceUsedAttribute" or "AttributeNamespace.ClassWithSingleUniquelyUsedAttribute" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be types that do not have any attributes with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1"" failed: + AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" or "AttributeNamespace.Attribute3" or "AttributeNamespace.UnusedAttribute" or "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.ClassWithSingleAttribute" or "AttributeNamespace.ClassWithTwoAttributes" or "AttributeNamespace.ClassWithThreeAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "AttributeNamespace.ClassWithSingleAttributeWithArguments" or "AttributeNamespace.ClassWithTwoAttributesWithArguments" or "AttributeNamespace.ClassWithThreeAttributesWithArguments" or "AttributeNamespace.OnceUsedAttribute" or "AttributeNamespace.ClassWithSingleUniquelyUsedAttribute" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" + + + ===== Violations with value arguments ===== +----- Conditions ----- + Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should not have any attributes with named arguments "NamedParameter2=Argument1" Result: False Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments does have attributes with named arguments "NamedParameter1=ArchUnitNET.Domain.TypeInstance`1[ArchUnitNET.Domain.Class]" and "NamedParameter1=ArchUnitNET.Domain.TypeInstance`1[ArchUnitNET.Domain.Class]" and "NamedParameter2=Argument1" and "NamedParameter3=1" @@ -90,16 +242,76 @@ Message: +----- Predicates ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be Types that do not have any attributes with named arguments "NamedParameter2=Argument1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not Types that do not have any attributes with named arguments "NamedParameter2=Argument1" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be Types that do not have any attributes with named arguments "NamedParameter2=Argument1"" failed: + AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not Types that do not have any attributes with named arguments "NamedParameter2=Argument1" + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be Types that do not have any attributes with named arguments "NamedParameter2=Argument1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not Types that do not have any attributes with named arguments "NamedParameter2=Argument1" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be Types that do not have any attributes with named arguments "NamedParameter2=Argument1"" failed: + AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not Types that do not have any attributes with named arguments "NamedParameter2=Argument1" + + + +----- Predicates as conditions ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be types that do not have any attributes with named arguments "NamedParameter2=Argument1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" or "AttributeNamespace.Attribute3" or "AttributeNamespace.UnusedAttribute" or "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.ClassWithSingleAttribute" or "AttributeNamespace.ClassWithTwoAttributes" or "AttributeNamespace.ClassWithThreeAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "AttributeNamespace.ClassWithSingleAttributeWithArguments" or "AttributeNamespace.ClassWithTwoAttributesWithArguments" or "AttributeNamespace.ClassWithThreeAttributesWithArguments" or "AttributeNamespace.OnceUsedAttribute" or "AttributeNamespace.ClassWithSingleUniquelyUsedAttribute" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be types that do not have any attributes with named arguments "NamedParameter2=Argument1"" failed: + AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" or "AttributeNamespace.Attribute3" or "AttributeNamespace.UnusedAttribute" or "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.ClassWithSingleAttribute" or "AttributeNamespace.ClassWithTwoAttributes" or "AttributeNamespace.ClassWithThreeAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "AttributeNamespace.ClassWithSingleAttributeWithArguments" or "AttributeNamespace.ClassWithTwoAttributesWithArguments" or "AttributeNamespace.ClassWithThreeAttributesWithArguments" or "AttributeNamespace.OnceUsedAttribute" or "AttributeNamespace.ClassWithSingleUniquelyUsedAttribute" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be types that do not have any attributes with named arguments "NamedParameter2=Argument1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" or "AttributeNamespace.Attribute3" or "AttributeNamespace.UnusedAttribute" or "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.ClassWithSingleAttribute" or "AttributeNamespace.ClassWithTwoAttributes" or "AttributeNamespace.ClassWithThreeAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "AttributeNamespace.ClassWithSingleAttributeWithArguments" or "AttributeNamespace.ClassWithTwoAttributesWithArguments" or "AttributeNamespace.ClassWithThreeAttributesWithArguments" or "AttributeNamespace.OnceUsedAttribute" or "AttributeNamespace.ClassWithSingleUniquelyUsedAttribute" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be types that do not have any attributes with named arguments "NamedParameter2=Argument1"" failed: + AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" or "AttributeNamespace.Attribute3" or "AttributeNamespace.UnusedAttribute" or "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.ClassWithSingleAttribute" or "AttributeNamespace.ClassWithTwoAttributes" or "AttributeNamespace.ClassWithThreeAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "AttributeNamespace.ClassWithSingleAttributeWithArguments" or "AttributeNamespace.ClassWithTwoAttributesWithArguments" or "AttributeNamespace.ClassWithThreeAttributesWithArguments" or "AttributeNamespace.OnceUsedAttribute" or "AttributeNamespace.ClassWithSingleUniquelyUsedAttribute" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" + + + ===== Empty arguments ===== +----- Conditions ----- + Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should not have no or any attributes with named arguments (impossible) Result: True Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments passed Message: All Evaluations passed +----- Predicates ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be Types that do not have no or any attributes with named arguments (impossible) +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments passed +Message: +All Evaluations passed + +----- Predicates as conditions ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be types that do not have no or any attributes with named arguments (impossible) +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments passed +Message: +All Evaluations passed + ===== Multiple arguments ===== +----- Conditions ----- + Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should not have any attributes with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" and "NamedParameter2=Argument1" Result: False Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments does have attributes with named arguments "NamedParameter1=ArchUnitNET.Domain.TypeInstance`1[ArchUnitNET.Domain.Class]" and "NamedParameter1=ArchUnitNET.Domain.TypeInstance`1[ArchUnitNET.Domain.Class]" and "NamedParameter2=Argument1" and "NamedParameter3=1" @@ -118,8 +330,30 @@ Message: +----- Predicates ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be Types that do not have any attributes with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" and "NamedParameter2=Argument1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not Types that do not have any attributes with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" and "NamedParameter2=Argument1" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be Types that do not have any attributes with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" and "NamedParameter2=Argument1"" failed: + AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not Types that do not have any attributes with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" and "NamedParameter2=Argument1" + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be Types that do not have any attributes with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" and "NamedParameter2=Argument1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not Types that do not have any attributes with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" and "NamedParameter2=Argument1" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be Types that do not have any attributes with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" and "NamedParameter2=Argument1"" failed: + AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not Types that do not have any attributes with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" and "NamedParameter2=Argument1" + + + ===== Multiple inputs ===== +----- Conditions ----- + Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" or "AttributeNamespace.ClassWithTwoAttributesWithNamedArguments" should not have any attributes with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" Result: False Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments does have attributes with named arguments "NamedParameter1=ArchUnitNET.Domain.TypeInstance`1[ArchUnitNET.Domain.Class]" and "NamedParameter1=ArchUnitNET.Domain.TypeInstance`1[ArchUnitNET.Domain.Class]" and "NamedParameter2=Argument1" and "NamedParameter3=1" @@ -144,3 +378,55 @@ Message: +----- Predicates ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" or "AttributeNamespace.ClassWithTwoAttributesWithNamedArguments" should be Types that do not have any attributes with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not Types that do not have any attributes with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" +Result: False +Description: AttributeNamespace.ClassWithTwoAttributesWithNamedArguments is not Types that do not have any attributes with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" or "AttributeNamespace.ClassWithTwoAttributesWithNamedArguments" should be Types that do not have any attributes with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1"" failed: + AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not Types that do not have any attributes with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" + AttributeNamespace.ClassWithTwoAttributesWithNamedArguments is not Types that do not have any attributes with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" or "AttributeNamespace.ClassWithTwoAttributesWithNamedArguments" should be Types that do not have any attributes with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not Types that do not have any attributes with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" +Result: False +Description: AttributeNamespace.ClassWithTwoAttributesWithNamedArguments is not Types that do not have any attributes with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" or "AttributeNamespace.ClassWithTwoAttributesWithNamedArguments" should be Types that do not have any attributes with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1"" failed: + AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not Types that do not have any attributes with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" + AttributeNamespace.ClassWithTwoAttributesWithNamedArguments is not Types that do not have any attributes with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" + + + +----- Predicates as conditions ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" or "AttributeNamespace.ClassWithTwoAttributesWithNamedArguments" should be types that do not have any attributes with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" or "AttributeNamespace.Attribute3" or "AttributeNamespace.UnusedAttribute" or "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.ClassWithSingleAttribute" or "AttributeNamespace.ClassWithTwoAttributes" or "AttributeNamespace.ClassWithThreeAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "AttributeNamespace.ClassWithSingleAttributeWithArguments" or "AttributeNamespace.ClassWithTwoAttributesWithArguments" or "AttributeNamespace.ClassWithThreeAttributesWithArguments" or "AttributeNamespace.OnceUsedAttribute" or "AttributeNamespace.ClassWithSingleUniquelyUsedAttribute" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" +Result: False +Description: AttributeNamespace.ClassWithTwoAttributesWithNamedArguments is not "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" or "AttributeNamespace.Attribute3" or "AttributeNamespace.UnusedAttribute" or "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.ClassWithSingleAttribute" or "AttributeNamespace.ClassWithTwoAttributes" or "AttributeNamespace.ClassWithThreeAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "AttributeNamespace.ClassWithSingleAttributeWithArguments" or "AttributeNamespace.ClassWithTwoAttributesWithArguments" or "AttributeNamespace.ClassWithThreeAttributesWithArguments" or "AttributeNamespace.OnceUsedAttribute" or "AttributeNamespace.ClassWithSingleUniquelyUsedAttribute" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" or "AttributeNamespace.ClassWithTwoAttributesWithNamedArguments" should be types that do not have any attributes with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1"" failed: + AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" or "AttributeNamespace.Attribute3" or "AttributeNamespace.UnusedAttribute" or "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.ClassWithSingleAttribute" or "AttributeNamespace.ClassWithTwoAttributes" or "AttributeNamespace.ClassWithThreeAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "AttributeNamespace.ClassWithSingleAttributeWithArguments" or "AttributeNamespace.ClassWithTwoAttributesWithArguments" or "AttributeNamespace.ClassWithThreeAttributesWithArguments" or "AttributeNamespace.OnceUsedAttribute" or "AttributeNamespace.ClassWithSingleUniquelyUsedAttribute" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" + AttributeNamespace.ClassWithTwoAttributesWithNamedArguments is not "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" or "AttributeNamespace.Attribute3" or "AttributeNamespace.UnusedAttribute" or "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.ClassWithSingleAttribute" or "AttributeNamespace.ClassWithTwoAttributes" or "AttributeNamespace.ClassWithThreeAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "AttributeNamespace.ClassWithSingleAttributeWithArguments" or "AttributeNamespace.ClassWithTwoAttributesWithArguments" or "AttributeNamespace.ClassWithThreeAttributesWithArguments" or "AttributeNamespace.OnceUsedAttribute" or "AttributeNamespace.ClassWithSingleUniquelyUsedAttribute" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" or "AttributeNamespace.ClassWithTwoAttributesWithNamedArguments" should be types that do not have any attributes with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" or "AttributeNamespace.Attribute3" or "AttributeNamespace.UnusedAttribute" or "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.ClassWithSingleAttribute" or "AttributeNamespace.ClassWithTwoAttributes" or "AttributeNamespace.ClassWithThreeAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "AttributeNamespace.ClassWithSingleAttributeWithArguments" or "AttributeNamespace.ClassWithTwoAttributesWithArguments" or "AttributeNamespace.ClassWithThreeAttributesWithArguments" or "AttributeNamespace.OnceUsedAttribute" or "AttributeNamespace.ClassWithSingleUniquelyUsedAttribute" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" +Result: False +Description: AttributeNamespace.ClassWithTwoAttributesWithNamedArguments is not "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" or "AttributeNamespace.Attribute3" or "AttributeNamespace.UnusedAttribute" or "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.ClassWithSingleAttribute" or "AttributeNamespace.ClassWithTwoAttributes" or "AttributeNamespace.ClassWithThreeAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "AttributeNamespace.ClassWithSingleAttributeWithArguments" or "AttributeNamespace.ClassWithTwoAttributesWithArguments" or "AttributeNamespace.ClassWithThreeAttributesWithArguments" or "AttributeNamespace.OnceUsedAttribute" or "AttributeNamespace.ClassWithSingleUniquelyUsedAttribute" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" or "AttributeNamespace.ClassWithTwoAttributesWithNamedArguments" should be types that do not have any attributes with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1"" failed: + AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" or "AttributeNamespace.Attribute3" or "AttributeNamespace.UnusedAttribute" or "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.ClassWithSingleAttribute" or "AttributeNamespace.ClassWithTwoAttributes" or "AttributeNamespace.ClassWithThreeAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "AttributeNamespace.ClassWithSingleAttributeWithArguments" or "AttributeNamespace.ClassWithTwoAttributesWithArguments" or "AttributeNamespace.ClassWithThreeAttributesWithArguments" or "AttributeNamespace.OnceUsedAttribute" or "AttributeNamespace.ClassWithSingleUniquelyUsedAttribute" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" + AttributeNamespace.ClassWithTwoAttributesWithNamedArguments is not "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" or "AttributeNamespace.Attribute3" or "AttributeNamespace.UnusedAttribute" or "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.ClassWithSingleAttribute" or "AttributeNamespace.ClassWithTwoAttributes" or "AttributeNamespace.ClassWithThreeAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "AttributeNamespace.ClassWithSingleAttributeWithArguments" or "AttributeNamespace.ClassWithTwoAttributesWithArguments" or "AttributeNamespace.ClassWithThreeAttributesWithArguments" or "AttributeNamespace.OnceUsedAttribute" or "AttributeNamespace.ClassWithSingleUniquelyUsedAttribute" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" + + + diff --git a/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.NotHaveAttributeWithArgumentsTest.verified.txt b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.NotHaveAttributeWithArgumentsTest.verified.txt index 9a519f612..71c4a528a 100644 --- a/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.NotHaveAttributeWithArgumentsTest.verified.txt +++ b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.NotHaveAttributeWithArgumentsTest.verified.txt @@ -1,5 +1,7 @@ ===== No violations with type arguments ===== +----- Conditions ----- + Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should does have attribute "AttributeNamespace.Attribute1" with arguments "AttributeNamespace.TypeArgument2" Result: True Description: AttributeNamespace.ClassWithSingleAttributeWithArguments passed @@ -24,8 +26,62 @@ Description: AttributeNamespace.ClassWithSingleAttributeWithArguments passed Message: All Evaluations passed +----- Predicates ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be Types that do not have attribute "AttributeNamespace.Attribute1" with arguments "AttributeNamespace.TypeArgument2" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be Types that do not have attribute "AttributeNamespace.Attribute1" with arguments "AttributeNamespace.TypeArgument2" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be Types that do not have attribute "AttributeNamespace.Attribute1" with arguments "AttributeNamespace.TypeArgument2" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be Types that do not have attribute "AttributeNamespace.Attribute1" with arguments "AttributeNamespace.TypeArgument2" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments passed +Message: +All Evaluations passed + +----- Predicates as conditions ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be types that do not have attribute "AttributeNamespace.Attribute1" with arguments "AttributeNamespace.TypeArgument2" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be types that do not have attribute "AttributeNamespace.Attribute1" with arguments "AttributeNamespace.TypeArgument2" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be types that do not have attribute "AttributeNamespace.Attribute1" with arguments "AttributeNamespace.TypeArgument2" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be types that do not have attribute "AttributeNamespace.Attribute1" with arguments "AttributeNamespace.TypeArgument2" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments passed +Message: +All Evaluations passed + ===== No violations with value arguments ===== +----- Conditions ----- + Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should does have attribute "AttributeNamespace.Attribute1" with arguments "Argument2" Result: True Description: AttributeNamespace.ClassWithSingleAttributeWithArguments passed @@ -50,46 +106,178 @@ Description: AttributeNamespace.ClassWithSingleAttributeWithArguments passed Message: All Evaluations passed +----- Predicates ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be Types that do not have attribute "AttributeNamespace.Attribute1" with arguments "Argument2" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be Types that do not have attribute "AttributeNamespace.Attribute1" with arguments "Argument2" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be Types that do not have attribute "AttributeNamespace.Attribute1" with arguments "Argument2" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be Types that do not have attribute "AttributeNamespace.Attribute1" with arguments "Argument2" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments passed +Message: +All Evaluations passed + +----- Predicates as conditions ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be types that do not have attribute "AttributeNamespace.Attribute1" with arguments "Argument2" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be types that do not have attribute "AttributeNamespace.Attribute1" with arguments "Argument2" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be types that do not have attribute "AttributeNamespace.Attribute1" with arguments "Argument2" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be types that do not have attribute "AttributeNamespace.Attribute1" with arguments "Argument2" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments passed +Message: +All Evaluations passed + ===== Violations with type arguments ===== -Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should does have attribute "AttributeNamespace.Attribute1" with arguments "Argument1" +----- Conditions ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should does have attribute "AttributeNamespace.Attribute1" with arguments "AttributeNamespace.TypeArgument1" Result: False -Description: AttributeNamespace.ClassWithSingleAttributeWithArguments not have attribute "AttributeNamespace.Attribute1" with arguments "Argument1" +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments not have attribute "AttributeNamespace.Attribute1" with arguments "AttributeNamespace.TypeArgument1" Message: -"Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should does have attribute "AttributeNamespace.Attribute1" with arguments "Argument1"" failed: - AttributeNamespace.ClassWithSingleAttributeWithArguments not have attribute "AttributeNamespace.Attribute1" with arguments "Argument1" +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should does have attribute "AttributeNamespace.Attribute1" with arguments "AttributeNamespace.TypeArgument1"" failed: + AttributeNamespace.ClassWithSingleAttributeWithArguments not have attribute "AttributeNamespace.Attribute1" with arguments "AttributeNamespace.TypeArgument1" -Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should does have attribute "AttributeNamespace.Attribute1" with arguments "Argument1" +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should does have attribute "AttributeNamespace.Attribute1" with arguments "AttributeNamespace.TypeArgument1" Result: False -Description: AttributeNamespace.ClassWithSingleAttributeWithArguments not have attribute "AttributeNamespace.Attribute1" with arguments "Argument1" +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments not have attribute "AttributeNamespace.Attribute1" with arguments "AttributeNamespace.TypeArgument1" Message: -"Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should does have attribute "AttributeNamespace.Attribute1" with arguments "Argument1"" failed: - AttributeNamespace.ClassWithSingleAttributeWithArguments not have attribute "AttributeNamespace.Attribute1" with arguments "Argument1" +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should does have attribute "AttributeNamespace.Attribute1" with arguments "AttributeNamespace.TypeArgument1"" failed: + AttributeNamespace.ClassWithSingleAttributeWithArguments not have attribute "AttributeNamespace.Attribute1" with arguments "AttributeNamespace.TypeArgument1" -Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should does have attribute "AttributeNamespace.Attribute1" with arguments "Argument1" +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should does have attribute "AttributeNamespace.Attribute1" with arguments "AttributeNamespace.TypeArgument1" Result: False -Description: AttributeNamespace.ClassWithSingleAttributeWithArguments not have attribute "AttributeNamespace.Attribute1" with arguments "Argument1" +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments not have attribute "AttributeNamespace.Attribute1" with arguments "AttributeNamespace.TypeArgument1" Message: -"Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should does have attribute "AttributeNamespace.Attribute1" with arguments "Argument1"" failed: - AttributeNamespace.ClassWithSingleAttributeWithArguments not have attribute "AttributeNamespace.Attribute1" with arguments "Argument1" +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should does have attribute "AttributeNamespace.Attribute1" with arguments "AttributeNamespace.TypeArgument1"" failed: + AttributeNamespace.ClassWithSingleAttributeWithArguments not have attribute "AttributeNamespace.Attribute1" with arguments "AttributeNamespace.TypeArgument1" -Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should does have attribute "AttributeNamespace.Attribute1" with arguments "Argument1" +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should does have attribute "AttributeNamespace.Attribute1" with arguments "AttributeNamespace.TypeArgument1" Result: False -Description: AttributeNamespace.ClassWithSingleAttributeWithArguments not have attribute "AttributeNamespace.Attribute1" with arguments "Argument1" +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments not have attribute "AttributeNamespace.Attribute1" with arguments "AttributeNamespace.TypeArgument1" Message: -"Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should does have attribute "AttributeNamespace.Attribute1" with arguments "Argument1"" failed: - AttributeNamespace.ClassWithSingleAttributeWithArguments not have attribute "AttributeNamespace.Attribute1" with arguments "Argument1" +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should does have attribute "AttributeNamespace.Attribute1" with arguments "AttributeNamespace.TypeArgument1"" failed: + AttributeNamespace.ClassWithSingleAttributeWithArguments not have attribute "AttributeNamespace.Attribute1" with arguments "AttributeNamespace.TypeArgument1" + + + +----- Predicates ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be Types that do not have attribute "AttributeNamespace.Attribute1" with arguments "AttributeNamespace.TypeArgument1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments is not Types that do not have attribute "AttributeNamespace.Attribute1" with arguments "AttributeNamespace.TypeArgument1" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be Types that do not have attribute "AttributeNamespace.Attribute1" with arguments "AttributeNamespace.TypeArgument1"" failed: + AttributeNamespace.ClassWithSingleAttributeWithArguments is not Types that do not have attribute "AttributeNamespace.Attribute1" with arguments "AttributeNamespace.TypeArgument1" + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be Types that do not have attribute "AttributeNamespace.Attribute1" with arguments "AttributeNamespace.TypeArgument1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments is not Types that do not have attribute "AttributeNamespace.Attribute1" with arguments "AttributeNamespace.TypeArgument1" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be Types that do not have attribute "AttributeNamespace.Attribute1" with arguments "AttributeNamespace.TypeArgument1"" failed: + AttributeNamespace.ClassWithSingleAttributeWithArguments is not Types that do not have attribute "AttributeNamespace.Attribute1" with arguments "AttributeNamespace.TypeArgument1" + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be Types that do not have attribute "AttributeNamespace.Attribute1" with arguments "AttributeNamespace.TypeArgument1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments is not Types that do not have attribute "AttributeNamespace.Attribute1" with arguments "AttributeNamespace.TypeArgument1" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be Types that do not have attribute "AttributeNamespace.Attribute1" with arguments "AttributeNamespace.TypeArgument1"" failed: + AttributeNamespace.ClassWithSingleAttributeWithArguments is not Types that do not have attribute "AttributeNamespace.Attribute1" with arguments "AttributeNamespace.TypeArgument1" + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be Types that do not have attribute "AttributeNamespace.Attribute1" with arguments "AttributeNamespace.TypeArgument1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments is not Types that do not have attribute "AttributeNamespace.Attribute1" with arguments "AttributeNamespace.TypeArgument1" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be Types that do not have attribute "AttributeNamespace.Attribute1" with arguments "AttributeNamespace.TypeArgument1"" failed: + AttributeNamespace.ClassWithSingleAttributeWithArguments is not Types that do not have attribute "AttributeNamespace.Attribute1" with arguments "AttributeNamespace.TypeArgument1" + + + +----- Predicates as conditions ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be types that do not have attribute "AttributeNamespace.Attribute1" with arguments "AttributeNamespace.TypeArgument1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments is not "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" or "AttributeNamespace.Attribute3" or "AttributeNamespace.UnusedAttribute" or "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.ClassWithSingleAttribute" or "AttributeNamespace.ClassWithTwoAttributes" or "AttributeNamespace.ClassWithThreeAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "AttributeNamespace.OnceUsedAttribute" or "AttributeNamespace.ClassWithSingleUniquelyUsedAttribute" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be types that do not have attribute "AttributeNamespace.Attribute1" with arguments "AttributeNamespace.TypeArgument1"" failed: + AttributeNamespace.ClassWithSingleAttributeWithArguments is not "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" or "AttributeNamespace.Attribute3" or "AttributeNamespace.UnusedAttribute" or "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.ClassWithSingleAttribute" or "AttributeNamespace.ClassWithTwoAttributes" or "AttributeNamespace.ClassWithThreeAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "AttributeNamespace.OnceUsedAttribute" or "AttributeNamespace.ClassWithSingleUniquelyUsedAttribute" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be types that do not have attribute "AttributeNamespace.Attribute1" with arguments "AttributeNamespace.TypeArgument1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments is not "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" or "AttributeNamespace.Attribute3" or "AttributeNamespace.UnusedAttribute" or "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.ClassWithSingleAttribute" or "AttributeNamespace.ClassWithTwoAttributes" or "AttributeNamespace.ClassWithThreeAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "AttributeNamespace.OnceUsedAttribute" or "AttributeNamespace.ClassWithSingleUniquelyUsedAttribute" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be types that do not have attribute "AttributeNamespace.Attribute1" with arguments "AttributeNamespace.TypeArgument1"" failed: + AttributeNamespace.ClassWithSingleAttributeWithArguments is not "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" or "AttributeNamespace.Attribute3" or "AttributeNamespace.UnusedAttribute" or "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.ClassWithSingleAttribute" or "AttributeNamespace.ClassWithTwoAttributes" or "AttributeNamespace.ClassWithThreeAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "AttributeNamespace.OnceUsedAttribute" or "AttributeNamespace.ClassWithSingleUniquelyUsedAttribute" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be types that do not have attribute "AttributeNamespace.Attribute1" with arguments "AttributeNamespace.TypeArgument1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments is not "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" or "AttributeNamespace.Attribute3" or "AttributeNamespace.UnusedAttribute" or "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.ClassWithSingleAttribute" or "AttributeNamespace.ClassWithTwoAttributes" or "AttributeNamespace.ClassWithThreeAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "AttributeNamespace.OnceUsedAttribute" or "AttributeNamespace.ClassWithSingleUniquelyUsedAttribute" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be types that do not have attribute "AttributeNamespace.Attribute1" with arguments "AttributeNamespace.TypeArgument1"" failed: + AttributeNamespace.ClassWithSingleAttributeWithArguments is not "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" or "AttributeNamespace.Attribute3" or "AttributeNamespace.UnusedAttribute" or "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.ClassWithSingleAttribute" or "AttributeNamespace.ClassWithTwoAttributes" or "AttributeNamespace.ClassWithThreeAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "AttributeNamespace.OnceUsedAttribute" or "AttributeNamespace.ClassWithSingleUniquelyUsedAttribute" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be types that do not have attribute "AttributeNamespace.Attribute1" with arguments "AttributeNamespace.TypeArgument1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments is not "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" or "AttributeNamespace.Attribute3" or "AttributeNamespace.UnusedAttribute" or "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.ClassWithSingleAttribute" or "AttributeNamespace.ClassWithTwoAttributes" or "AttributeNamespace.ClassWithThreeAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "AttributeNamespace.OnceUsedAttribute" or "AttributeNamespace.ClassWithSingleUniquelyUsedAttribute" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be types that do not have attribute "AttributeNamespace.Attribute1" with arguments "AttributeNamespace.TypeArgument1"" failed: + AttributeNamespace.ClassWithSingleAttributeWithArguments is not "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" or "AttributeNamespace.Attribute3" or "AttributeNamespace.UnusedAttribute" or "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.ClassWithSingleAttribute" or "AttributeNamespace.ClassWithTwoAttributes" or "AttributeNamespace.ClassWithThreeAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "AttributeNamespace.OnceUsedAttribute" or "AttributeNamespace.ClassWithSingleUniquelyUsedAttribute" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" ===== Violations with value arguments ===== +----- Conditions ----- + Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should does have attribute "AttributeNamespace.Attribute1" with arguments "1" Result: False Description: AttributeNamespace.ClassWithSingleAttributeWithArguments not have attribute "AttributeNamespace.Attribute1" with arguments "1" @@ -126,8 +314,86 @@ Message: +----- Predicates ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be Types that do not have attribute "AttributeNamespace.Attribute1" with arguments "1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments is not Types that do not have attribute "AttributeNamespace.Attribute1" with arguments "1" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be Types that do not have attribute "AttributeNamespace.Attribute1" with arguments "1"" failed: + AttributeNamespace.ClassWithSingleAttributeWithArguments is not Types that do not have attribute "AttributeNamespace.Attribute1" with arguments "1" + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be Types that do not have attribute "AttributeNamespace.Attribute1" with arguments "1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments is not Types that do not have attribute "AttributeNamespace.Attribute1" with arguments "1" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be Types that do not have attribute "AttributeNamespace.Attribute1" with arguments "1"" failed: + AttributeNamespace.ClassWithSingleAttributeWithArguments is not Types that do not have attribute "AttributeNamespace.Attribute1" with arguments "1" + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be Types that do not have attribute "AttributeNamespace.Attribute1" with arguments "1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments is not Types that do not have attribute "AttributeNamespace.Attribute1" with arguments "1" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be Types that do not have attribute "AttributeNamespace.Attribute1" with arguments "1"" failed: + AttributeNamespace.ClassWithSingleAttributeWithArguments is not Types that do not have attribute "AttributeNamespace.Attribute1" with arguments "1" + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be Types that do not have attribute "AttributeNamespace.Attribute1" with arguments "1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments is not Types that do not have attribute "AttributeNamespace.Attribute1" with arguments "1" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be Types that do not have attribute "AttributeNamespace.Attribute1" with arguments "1"" failed: + AttributeNamespace.ClassWithSingleAttributeWithArguments is not Types that do not have attribute "AttributeNamespace.Attribute1" with arguments "1" + + + +----- Predicates as conditions ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be types that do not have attribute "AttributeNamespace.Attribute1" with arguments "1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments is not "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" or "AttributeNamespace.Attribute3" or "AttributeNamespace.UnusedAttribute" or "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.ClassWithSingleAttribute" or "AttributeNamespace.ClassWithTwoAttributes" or "AttributeNamespace.ClassWithThreeAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "AttributeNamespace.OnceUsedAttribute" or "AttributeNamespace.ClassWithSingleUniquelyUsedAttribute" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be types that do not have attribute "AttributeNamespace.Attribute1" with arguments "1"" failed: + AttributeNamespace.ClassWithSingleAttributeWithArguments is not "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" or "AttributeNamespace.Attribute3" or "AttributeNamespace.UnusedAttribute" or "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.ClassWithSingleAttribute" or "AttributeNamespace.ClassWithTwoAttributes" or "AttributeNamespace.ClassWithThreeAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "AttributeNamespace.OnceUsedAttribute" or "AttributeNamespace.ClassWithSingleUniquelyUsedAttribute" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be types that do not have attribute "AttributeNamespace.Attribute1" with arguments "1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments is not "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" or "AttributeNamespace.Attribute3" or "AttributeNamespace.UnusedAttribute" or "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.ClassWithSingleAttribute" or "AttributeNamespace.ClassWithTwoAttributes" or "AttributeNamespace.ClassWithThreeAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "AttributeNamespace.OnceUsedAttribute" or "AttributeNamespace.ClassWithSingleUniquelyUsedAttribute" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be types that do not have attribute "AttributeNamespace.Attribute1" with arguments "1"" failed: + AttributeNamespace.ClassWithSingleAttributeWithArguments is not "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" or "AttributeNamespace.Attribute3" or "AttributeNamespace.UnusedAttribute" or "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.ClassWithSingleAttribute" or "AttributeNamespace.ClassWithTwoAttributes" or "AttributeNamespace.ClassWithThreeAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "AttributeNamespace.OnceUsedAttribute" or "AttributeNamespace.ClassWithSingleUniquelyUsedAttribute" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be types that do not have attribute "AttributeNamespace.Attribute1" with arguments "1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments is not "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" or "AttributeNamespace.Attribute3" or "AttributeNamespace.UnusedAttribute" or "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.ClassWithSingleAttribute" or "AttributeNamespace.ClassWithTwoAttributes" or "AttributeNamespace.ClassWithThreeAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "AttributeNamespace.OnceUsedAttribute" or "AttributeNamespace.ClassWithSingleUniquelyUsedAttribute" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be types that do not have attribute "AttributeNamespace.Attribute1" with arguments "1"" failed: + AttributeNamespace.ClassWithSingleAttributeWithArguments is not "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" or "AttributeNamespace.Attribute3" or "AttributeNamespace.UnusedAttribute" or "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.ClassWithSingleAttribute" or "AttributeNamespace.ClassWithTwoAttributes" or "AttributeNamespace.ClassWithThreeAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "AttributeNamespace.OnceUsedAttribute" or "AttributeNamespace.ClassWithSingleUniquelyUsedAttribute" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be types that do not have attribute "AttributeNamespace.Attribute1" with arguments "1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments is not "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" or "AttributeNamespace.Attribute3" or "AttributeNamespace.UnusedAttribute" or "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.ClassWithSingleAttribute" or "AttributeNamespace.ClassWithTwoAttributes" or "AttributeNamespace.ClassWithThreeAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "AttributeNamespace.OnceUsedAttribute" or "AttributeNamespace.ClassWithSingleUniquelyUsedAttribute" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be types that do not have attribute "AttributeNamespace.Attribute1" with arguments "1"" failed: + AttributeNamespace.ClassWithSingleAttributeWithArguments is not "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" or "AttributeNamespace.Attribute3" or "AttributeNamespace.UnusedAttribute" or "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.ClassWithSingleAttribute" or "AttributeNamespace.ClassWithTwoAttributes" or "AttributeNamespace.ClassWithThreeAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "AttributeNamespace.OnceUsedAttribute" or "AttributeNamespace.ClassWithSingleUniquelyUsedAttribute" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" + + + ===== Unused attribute ===== +----- Conditions ----- + Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should does have attribute "AttributeNamespace.UnusedAttribute" with arguments "Argument1" Result: True Description: AttributeNamespace.ClassWithSingleAttributeWithArguments passed @@ -152,16 +418,88 @@ Description: AttributeNamespace.ClassWithSingleAttributeWithArguments passed Message: All Evaluations passed +----- Predicates ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be Types that do not have attribute "AttributeNamespace.UnusedAttribute" with arguments "Argument1" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be Types that do not have attribute "AttributeNamespace.UnusedAttribute" with arguments "Argument1" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be Types that do not have attribute "AttributeNamespace.UnusedAttribute" with arguments "Argument1" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be Types that do not have attribute "AttributeNamespace.UnusedAttribute" with arguments "Argument1" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments passed +Message: +All Evaluations passed + +----- Predicates as conditions ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be types that do not have attribute "AttributeNamespace.UnusedAttribute" with arguments "Argument1" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be types that do not have attribute "AttributeNamespace.UnusedAttribute" with arguments "Argument1" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be types that do not have attribute "AttributeNamespace.UnusedAttribute" with arguments "Argument1" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be types that do not have attribute "AttributeNamespace.UnusedAttribute" with arguments "Argument1" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments passed +Message: +All Evaluations passed + ===== Type outside of architecture ===== +----- Conditions ----- + Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should does have attribute "TypeDependencyNamespace.BaseClass" with arguments "1" Result: True Description: AttributeNamespace.ClassWithSingleAttributeWithArguments passed Message: All Evaluations passed +----- Predicates ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be Types that do not have attribute "TypeDependencyNamespace.BaseClass" with arguments "1" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments passed +Message: +All Evaluations passed + +----- Predicates as conditions ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be types that do not have attribute "TypeDependencyNamespace.BaseClass" with arguments "1" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments passed +Message: +All Evaluations passed + ===== Null argument ===== +----- Conditions ----- + Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should does have attribute "AttributeNamespace.UnusedAttribute" with arguments "" Result: True Description: AttributeNamespace.ClassWithSingleAttributeWithArguments passed @@ -174,6 +512,34 @@ Description: AttributeNamespace.ClassWithSingleAttributeWithArguments passed Message: All Evaluations passed +----- Predicates ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be Types that do not have attribute "AttributeNamespace.UnusedAttribute" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be Types that do not have attribute "AttributeNamespace.UnusedAttribute" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments passed +Message: +All Evaluations passed + +----- Predicates as conditions ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be types that do not have attribute "AttributeNamespace.UnusedAttribute" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be types that do not have attribute "AttributeNamespace.UnusedAttribute" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments passed +Message: +All Evaluations passed + ===== Empty arguments ===== Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should does have attribute "AttributeNamespace.Attribute1" @@ -196,6 +562,8 @@ Message: ===== Multiple arguments ===== +----- Conditions ----- + Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should does have attribute "AttributeNamespace.Attribute1" with arguments "AttributeNamespace.TypeArgument1" and "1" Result: False Description: AttributeNamespace.ClassWithSingleAttributeWithArguments not have attribute "AttributeNamespace.Attribute1" with arguments "AttributeNamespace.TypeArgument1" and "1" @@ -232,8 +600,86 @@ Message: +----- Predicates ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be Types that do not have attribute "AttributeNamespace.Attribute1" with arguments "AttributeNamespace.TypeArgument1" and "1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments is not Types that do not have attribute "AttributeNamespace.Attribute1" with arguments "AttributeNamespace.TypeArgument1" and "1" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be Types that do not have attribute "AttributeNamespace.Attribute1" with arguments "AttributeNamespace.TypeArgument1" and "1"" failed: + AttributeNamespace.ClassWithSingleAttributeWithArguments is not Types that do not have attribute "AttributeNamespace.Attribute1" with arguments "AttributeNamespace.TypeArgument1" and "1" + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be Types that do not have attribute "AttributeNamespace.Attribute1" with arguments "AttributeNamespace.TypeArgument1" and "1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments is not Types that do not have attribute "AttributeNamespace.Attribute1" with arguments "AttributeNamespace.TypeArgument1" and "1" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be Types that do not have attribute "AttributeNamespace.Attribute1" with arguments "AttributeNamespace.TypeArgument1" and "1"" failed: + AttributeNamespace.ClassWithSingleAttributeWithArguments is not Types that do not have attribute "AttributeNamespace.Attribute1" with arguments "AttributeNamespace.TypeArgument1" and "1" + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be Types that do not have attribute "AttributeNamespace.Attribute1" with arguments "AttributeNamespace.TypeArgument1" and "1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments is not Types that do not have attribute "AttributeNamespace.Attribute1" with arguments "AttributeNamespace.TypeArgument1" and "1" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be Types that do not have attribute "AttributeNamespace.Attribute1" with arguments "AttributeNamespace.TypeArgument1" and "1"" failed: + AttributeNamespace.ClassWithSingleAttributeWithArguments is not Types that do not have attribute "AttributeNamespace.Attribute1" with arguments "AttributeNamespace.TypeArgument1" and "1" + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be Types that do not have attribute "AttributeNamespace.Attribute1" with arguments "AttributeNamespace.TypeArgument1" and "1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments is not Types that do not have attribute "AttributeNamespace.Attribute1" with arguments "AttributeNamespace.TypeArgument1" and "1" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be Types that do not have attribute "AttributeNamespace.Attribute1" with arguments "AttributeNamespace.TypeArgument1" and "1"" failed: + AttributeNamespace.ClassWithSingleAttributeWithArguments is not Types that do not have attribute "AttributeNamespace.Attribute1" with arguments "AttributeNamespace.TypeArgument1" and "1" + + + +----- Predicates as conditions ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be types that do not have attribute "AttributeNamespace.Attribute1" with arguments "AttributeNamespace.TypeArgument1" and "1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments is not "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" or "AttributeNamespace.Attribute3" or "AttributeNamespace.UnusedAttribute" or "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.ClassWithSingleAttribute" or "AttributeNamespace.ClassWithTwoAttributes" or "AttributeNamespace.ClassWithThreeAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "AttributeNamespace.OnceUsedAttribute" or "AttributeNamespace.ClassWithSingleUniquelyUsedAttribute" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be types that do not have attribute "AttributeNamespace.Attribute1" with arguments "AttributeNamespace.TypeArgument1" and "1"" failed: + AttributeNamespace.ClassWithSingleAttributeWithArguments is not "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" or "AttributeNamespace.Attribute3" or "AttributeNamespace.UnusedAttribute" or "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.ClassWithSingleAttribute" or "AttributeNamespace.ClassWithTwoAttributes" or "AttributeNamespace.ClassWithThreeAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "AttributeNamespace.OnceUsedAttribute" or "AttributeNamespace.ClassWithSingleUniquelyUsedAttribute" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be types that do not have attribute "AttributeNamespace.Attribute1" with arguments "AttributeNamespace.TypeArgument1" and "1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments is not "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" or "AttributeNamespace.Attribute3" or "AttributeNamespace.UnusedAttribute" or "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.ClassWithSingleAttribute" or "AttributeNamespace.ClassWithTwoAttributes" or "AttributeNamespace.ClassWithThreeAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "AttributeNamespace.OnceUsedAttribute" or "AttributeNamespace.ClassWithSingleUniquelyUsedAttribute" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be types that do not have attribute "AttributeNamespace.Attribute1" with arguments "AttributeNamespace.TypeArgument1" and "1"" failed: + AttributeNamespace.ClassWithSingleAttributeWithArguments is not "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" or "AttributeNamespace.Attribute3" or "AttributeNamespace.UnusedAttribute" or "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.ClassWithSingleAttribute" or "AttributeNamespace.ClassWithTwoAttributes" or "AttributeNamespace.ClassWithThreeAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "AttributeNamespace.OnceUsedAttribute" or "AttributeNamespace.ClassWithSingleUniquelyUsedAttribute" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be types that do not have attribute "AttributeNamespace.Attribute1" with arguments "AttributeNamespace.TypeArgument1" and "1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments is not "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" or "AttributeNamespace.Attribute3" or "AttributeNamespace.UnusedAttribute" or "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.ClassWithSingleAttribute" or "AttributeNamespace.ClassWithTwoAttributes" or "AttributeNamespace.ClassWithThreeAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "AttributeNamespace.OnceUsedAttribute" or "AttributeNamespace.ClassWithSingleUniquelyUsedAttribute" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be types that do not have attribute "AttributeNamespace.Attribute1" with arguments "AttributeNamespace.TypeArgument1" and "1"" failed: + AttributeNamespace.ClassWithSingleAttributeWithArguments is not "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" or "AttributeNamespace.Attribute3" or "AttributeNamespace.UnusedAttribute" or "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.ClassWithSingleAttribute" or "AttributeNamespace.ClassWithTwoAttributes" or "AttributeNamespace.ClassWithThreeAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "AttributeNamespace.OnceUsedAttribute" or "AttributeNamespace.ClassWithSingleUniquelyUsedAttribute" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be types that do not have attribute "AttributeNamespace.Attribute1" with arguments "AttributeNamespace.TypeArgument1" and "1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments is not "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" or "AttributeNamespace.Attribute3" or "AttributeNamespace.UnusedAttribute" or "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.ClassWithSingleAttribute" or "AttributeNamespace.ClassWithTwoAttributes" or "AttributeNamespace.ClassWithThreeAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "AttributeNamespace.OnceUsedAttribute" or "AttributeNamespace.ClassWithSingleUniquelyUsedAttribute" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" should be types that do not have attribute "AttributeNamespace.Attribute1" with arguments "AttributeNamespace.TypeArgument1" and "1"" failed: + AttributeNamespace.ClassWithSingleAttributeWithArguments is not "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" or "AttributeNamespace.Attribute3" or "AttributeNamespace.UnusedAttribute" or "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.ClassWithSingleAttribute" or "AttributeNamespace.ClassWithTwoAttributes" or "AttributeNamespace.ClassWithThreeAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "AttributeNamespace.OnceUsedAttribute" or "AttributeNamespace.ClassWithSingleUniquelyUsedAttribute" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" + + + ===== Multiple inputs ===== +----- Conditions ----- + Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" or "AttributeNamespace.ClassWithTwoAttributesWithNamedArguments" should does have attribute "AttributeNamespace.Attribute1" with arguments "Argument1" Result: False Description: AttributeNamespace.ClassWithSingleAttributeWithArguments not have attribute "AttributeNamespace.Attribute1" with arguments "Argument1" @@ -282,3 +728,103 @@ Message: +----- Predicates ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" or "AttributeNamespace.ClassWithTwoAttributesWithNamedArguments" should be Types that do not have attribute "AttributeNamespace.Attribute1" with arguments "Argument1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments is not Types that do not have attribute "AttributeNamespace.Attribute1" with arguments "Argument1" +Result: False +Description: AttributeNamespace.ClassWithTwoAttributesWithNamedArguments is not Types that do not have attribute "AttributeNamespace.Attribute1" with arguments "Argument1" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" or "AttributeNamespace.ClassWithTwoAttributesWithNamedArguments" should be Types that do not have attribute "AttributeNamespace.Attribute1" with arguments "Argument1"" failed: + AttributeNamespace.ClassWithSingleAttributeWithArguments is not Types that do not have attribute "AttributeNamespace.Attribute1" with arguments "Argument1" + AttributeNamespace.ClassWithTwoAttributesWithNamedArguments is not Types that do not have attribute "AttributeNamespace.Attribute1" with arguments "Argument1" + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" or "AttributeNamespace.ClassWithTwoAttributesWithNamedArguments" should be Types that do not have attribute "AttributeNamespace.Attribute1" with arguments "Argument1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments is not Types that do not have attribute "AttributeNamespace.Attribute1" with arguments "Argument1" +Result: False +Description: AttributeNamespace.ClassWithTwoAttributesWithNamedArguments is not Types that do not have attribute "AttributeNamespace.Attribute1" with arguments "Argument1" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" or "AttributeNamespace.ClassWithTwoAttributesWithNamedArguments" should be Types that do not have attribute "AttributeNamespace.Attribute1" with arguments "Argument1"" failed: + AttributeNamespace.ClassWithSingleAttributeWithArguments is not Types that do not have attribute "AttributeNamespace.Attribute1" with arguments "Argument1" + AttributeNamespace.ClassWithTwoAttributesWithNamedArguments is not Types that do not have attribute "AttributeNamespace.Attribute1" with arguments "Argument1" + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" or "AttributeNamespace.ClassWithTwoAttributesWithNamedArguments" should be Types that do not have attribute "AttributeNamespace.Attribute1" with arguments "Argument1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments is not Types that do not have attribute "AttributeNamespace.Attribute1" with arguments "Argument1" +Result: False +Description: AttributeNamespace.ClassWithTwoAttributesWithNamedArguments is not Types that do not have attribute "AttributeNamespace.Attribute1" with arguments "Argument1" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" or "AttributeNamespace.ClassWithTwoAttributesWithNamedArguments" should be Types that do not have attribute "AttributeNamespace.Attribute1" with arguments "Argument1"" failed: + AttributeNamespace.ClassWithSingleAttributeWithArguments is not Types that do not have attribute "AttributeNamespace.Attribute1" with arguments "Argument1" + AttributeNamespace.ClassWithTwoAttributesWithNamedArguments is not Types that do not have attribute "AttributeNamespace.Attribute1" with arguments "Argument1" + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" or "AttributeNamespace.ClassWithTwoAttributesWithNamedArguments" should be Types that do not have attribute "AttributeNamespace.Attribute1" with arguments "Argument1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments is not Types that do not have attribute "AttributeNamespace.Attribute1" with arguments "Argument1" +Result: False +Description: AttributeNamespace.ClassWithTwoAttributesWithNamedArguments is not Types that do not have attribute "AttributeNamespace.Attribute1" with arguments "Argument1" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" or "AttributeNamespace.ClassWithTwoAttributesWithNamedArguments" should be Types that do not have attribute "AttributeNamespace.Attribute1" with arguments "Argument1"" failed: + AttributeNamespace.ClassWithSingleAttributeWithArguments is not Types that do not have attribute "AttributeNamespace.Attribute1" with arguments "Argument1" + AttributeNamespace.ClassWithTwoAttributesWithNamedArguments is not Types that do not have attribute "AttributeNamespace.Attribute1" with arguments "Argument1" + + + +----- Predicates as conditions ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" or "AttributeNamespace.ClassWithTwoAttributesWithNamedArguments" should be types that do not have attribute "AttributeNamespace.Attribute1" with arguments "Argument1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments is not "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" or "AttributeNamespace.Attribute3" or "AttributeNamespace.UnusedAttribute" or "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.ClassWithSingleAttribute" or "AttributeNamespace.ClassWithTwoAttributes" or "AttributeNamespace.ClassWithThreeAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "AttributeNamespace.OnceUsedAttribute" or "AttributeNamespace.ClassWithSingleUniquelyUsedAttribute" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" +Result: False +Description: AttributeNamespace.ClassWithTwoAttributesWithNamedArguments is not "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" or "AttributeNamespace.Attribute3" or "AttributeNamespace.UnusedAttribute" or "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.ClassWithSingleAttribute" or "AttributeNamespace.ClassWithTwoAttributes" or "AttributeNamespace.ClassWithThreeAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "AttributeNamespace.OnceUsedAttribute" or "AttributeNamespace.ClassWithSingleUniquelyUsedAttribute" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" or "AttributeNamespace.ClassWithTwoAttributesWithNamedArguments" should be types that do not have attribute "AttributeNamespace.Attribute1" with arguments "Argument1"" failed: + AttributeNamespace.ClassWithSingleAttributeWithArguments is not "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" or "AttributeNamespace.Attribute3" or "AttributeNamespace.UnusedAttribute" or "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.ClassWithSingleAttribute" or "AttributeNamespace.ClassWithTwoAttributes" or "AttributeNamespace.ClassWithThreeAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "AttributeNamespace.OnceUsedAttribute" or "AttributeNamespace.ClassWithSingleUniquelyUsedAttribute" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" + AttributeNamespace.ClassWithTwoAttributesWithNamedArguments is not "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" or "AttributeNamespace.Attribute3" or "AttributeNamespace.UnusedAttribute" or "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.ClassWithSingleAttribute" or "AttributeNamespace.ClassWithTwoAttributes" or "AttributeNamespace.ClassWithThreeAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "AttributeNamespace.OnceUsedAttribute" or "AttributeNamespace.ClassWithSingleUniquelyUsedAttribute" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" or "AttributeNamespace.ClassWithTwoAttributesWithNamedArguments" should be types that do not have attribute "AttributeNamespace.Attribute1" with arguments "Argument1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments is not "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" or "AttributeNamespace.Attribute3" or "AttributeNamespace.UnusedAttribute" or "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.ClassWithSingleAttribute" or "AttributeNamespace.ClassWithTwoAttributes" or "AttributeNamespace.ClassWithThreeAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "AttributeNamespace.OnceUsedAttribute" or "AttributeNamespace.ClassWithSingleUniquelyUsedAttribute" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" +Result: False +Description: AttributeNamespace.ClassWithTwoAttributesWithNamedArguments is not "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" or "AttributeNamespace.Attribute3" or "AttributeNamespace.UnusedAttribute" or "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.ClassWithSingleAttribute" or "AttributeNamespace.ClassWithTwoAttributes" or "AttributeNamespace.ClassWithThreeAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "AttributeNamespace.OnceUsedAttribute" or "AttributeNamespace.ClassWithSingleUniquelyUsedAttribute" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" or "AttributeNamespace.ClassWithTwoAttributesWithNamedArguments" should be types that do not have attribute "AttributeNamespace.Attribute1" with arguments "Argument1"" failed: + AttributeNamespace.ClassWithSingleAttributeWithArguments is not "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" or "AttributeNamespace.Attribute3" or "AttributeNamespace.UnusedAttribute" or "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.ClassWithSingleAttribute" or "AttributeNamespace.ClassWithTwoAttributes" or "AttributeNamespace.ClassWithThreeAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "AttributeNamespace.OnceUsedAttribute" or "AttributeNamespace.ClassWithSingleUniquelyUsedAttribute" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" + AttributeNamespace.ClassWithTwoAttributesWithNamedArguments is not "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" or "AttributeNamespace.Attribute3" or "AttributeNamespace.UnusedAttribute" or "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.ClassWithSingleAttribute" or "AttributeNamespace.ClassWithTwoAttributes" or "AttributeNamespace.ClassWithThreeAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "AttributeNamespace.OnceUsedAttribute" or "AttributeNamespace.ClassWithSingleUniquelyUsedAttribute" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" or "AttributeNamespace.ClassWithTwoAttributesWithNamedArguments" should be types that do not have attribute "AttributeNamespace.Attribute1" with arguments "Argument1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments is not "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" or "AttributeNamespace.Attribute3" or "AttributeNamespace.UnusedAttribute" or "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.ClassWithSingleAttribute" or "AttributeNamespace.ClassWithTwoAttributes" or "AttributeNamespace.ClassWithThreeAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "AttributeNamespace.OnceUsedAttribute" or "AttributeNamespace.ClassWithSingleUniquelyUsedAttribute" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" +Result: False +Description: AttributeNamespace.ClassWithTwoAttributesWithNamedArguments is not "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" or "AttributeNamespace.Attribute3" or "AttributeNamespace.UnusedAttribute" or "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.ClassWithSingleAttribute" or "AttributeNamespace.ClassWithTwoAttributes" or "AttributeNamespace.ClassWithThreeAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "AttributeNamespace.OnceUsedAttribute" or "AttributeNamespace.ClassWithSingleUniquelyUsedAttribute" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" or "AttributeNamespace.ClassWithTwoAttributesWithNamedArguments" should be types that do not have attribute "AttributeNamespace.Attribute1" with arguments "Argument1"" failed: + AttributeNamespace.ClassWithSingleAttributeWithArguments is not "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" or "AttributeNamespace.Attribute3" or "AttributeNamespace.UnusedAttribute" or "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.ClassWithSingleAttribute" or "AttributeNamespace.ClassWithTwoAttributes" or "AttributeNamespace.ClassWithThreeAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "AttributeNamespace.OnceUsedAttribute" or "AttributeNamespace.ClassWithSingleUniquelyUsedAttribute" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" + AttributeNamespace.ClassWithTwoAttributesWithNamedArguments is not "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" or "AttributeNamespace.Attribute3" or "AttributeNamespace.UnusedAttribute" or "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.ClassWithSingleAttribute" or "AttributeNamespace.ClassWithTwoAttributes" or "AttributeNamespace.ClassWithThreeAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "AttributeNamespace.OnceUsedAttribute" or "AttributeNamespace.ClassWithSingleUniquelyUsedAttribute" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" or "AttributeNamespace.ClassWithTwoAttributesWithNamedArguments" should be types that do not have attribute "AttributeNamespace.Attribute1" with arguments "Argument1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithArguments is not "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" or "AttributeNamespace.Attribute3" or "AttributeNamespace.UnusedAttribute" or "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.ClassWithSingleAttribute" or "AttributeNamespace.ClassWithTwoAttributes" or "AttributeNamespace.ClassWithThreeAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "AttributeNamespace.OnceUsedAttribute" or "AttributeNamespace.ClassWithSingleUniquelyUsedAttribute" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" +Result: False +Description: AttributeNamespace.ClassWithTwoAttributesWithNamedArguments is not "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" or "AttributeNamespace.Attribute3" or "AttributeNamespace.UnusedAttribute" or "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.ClassWithSingleAttribute" or "AttributeNamespace.ClassWithTwoAttributes" or "AttributeNamespace.ClassWithThreeAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "AttributeNamespace.OnceUsedAttribute" or "AttributeNamespace.ClassWithSingleUniquelyUsedAttribute" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithArguments" or "AttributeNamespace.ClassWithTwoAttributesWithNamedArguments" should be types that do not have attribute "AttributeNamespace.Attribute1" with arguments "Argument1"" failed: + AttributeNamespace.ClassWithSingleAttributeWithArguments is not "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" or "AttributeNamespace.Attribute3" or "AttributeNamespace.UnusedAttribute" or "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.ClassWithSingleAttribute" or "AttributeNamespace.ClassWithTwoAttributes" or "AttributeNamespace.ClassWithThreeAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "AttributeNamespace.OnceUsedAttribute" or "AttributeNamespace.ClassWithSingleUniquelyUsedAttribute" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" + AttributeNamespace.ClassWithTwoAttributesWithNamedArguments is not "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" or "AttributeNamespace.Attribute3" or "AttributeNamespace.UnusedAttribute" or "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.ClassWithSingleAttribute" or "AttributeNamespace.ClassWithTwoAttributes" or "AttributeNamespace.ClassWithThreeAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "AttributeNamespace.OnceUsedAttribute" or "AttributeNamespace.ClassWithSingleUniquelyUsedAttribute" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" + + + diff --git a/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.NotHaveAttributeWithNamedArgumentsTest.verified.txt b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.NotHaveAttributeWithNamedArgumentsTest.verified.txt index dc6d38b75..00ea8db8f 100644 --- a/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.NotHaveAttributeWithNamedArgumentsTest.verified.txt +++ b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.NotHaveAttributeWithNamedArgumentsTest.verified.txt @@ -1,24 +1,78 @@ ===== No violations with type arguments ===== -Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should does have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument2" +----- Conditions ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument2" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument2" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument2" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument2" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments passed +Message: +All Evaluations passed + +----- Predicates ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be Types that do not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument2" Result: True Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments passed Message: All Evaluations passed -Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should does have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument2" +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be Types that do not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument2" Result: True Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments passed Message: All Evaluations passed -Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should does have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument2" +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be Types that do not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument2" Result: True Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments passed Message: All Evaluations passed -Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should does have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument2" +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be Types that do not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument2" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments passed +Message: +All Evaluations passed + +----- Predicates as conditions ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be types that do not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument2" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be types that do not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument2" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be types that do not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument2" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be types that do not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument2" Result: True Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments passed Message: @@ -26,25 +80,79 @@ All Evaluations passed ===== No violations with value arguments ===== -Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should does have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter2=Argument2" +----- Conditions ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter2=Argument2" Result: True Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments passed Message: All Evaluations passed -Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should does have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter2=Argument2" +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter2=Argument2" Result: True Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments passed Message: All Evaluations passed -Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should does have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter2=Argument2" +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter2=Argument2" Result: True Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments passed Message: All Evaluations passed -Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should does have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter2=Argument2" +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter2=Argument2" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments passed +Message: +All Evaluations passed + +----- Predicates ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be Types that do not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter2=Argument2" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be Types that do not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter2=Argument2" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be Types that do not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter2=Argument2" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be Types that do not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter2=Argument2" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments passed +Message: +All Evaluations passed + +----- Predicates as conditions ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be types that do not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter2=Argument2" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be types that do not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter2=Argument2" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be types that do not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter2=Argument2" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be types that do not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter2=Argument2" Result: True Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments passed Message: @@ -52,101 +160,311 @@ All Evaluations passed ===== Violations with type arguments ===== -Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should does have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" +----- Conditions ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" Result: False -Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments does have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" Message: -"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should does have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1"" failed: - AttributeNamespace.ClassWithSingleAttributeWithNamedArguments not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1"" failed: + AttributeNamespace.ClassWithSingleAttributeWithNamedArguments does have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" -Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should does have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" Result: False -Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments does have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" Message: -"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should does have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1"" failed: - AttributeNamespace.ClassWithSingleAttributeWithNamedArguments not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1"" failed: + AttributeNamespace.ClassWithSingleAttributeWithNamedArguments does have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" -Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should does have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" Result: False -Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments does have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" Message: -"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should does have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1"" failed: - AttributeNamespace.ClassWithSingleAttributeWithNamedArguments not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1"" failed: + AttributeNamespace.ClassWithSingleAttributeWithNamedArguments does have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" -Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should does have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" Result: False -Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments does have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" Message: -"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should does have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1"" failed: - AttributeNamespace.ClassWithSingleAttributeWithNamedArguments not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1"" failed: + AttributeNamespace.ClassWithSingleAttributeWithNamedArguments does have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" + + + +----- Predicates ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be Types that do not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not Types that do not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be Types that do not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1"" failed: + AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not Types that do not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be Types that do not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not Types that do not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be Types that do not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1"" failed: + AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not Types that do not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be Types that do not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not Types that do not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be Types that do not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1"" failed: + AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not Types that do not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be Types that do not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not Types that do not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be Types that do not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1"" failed: + AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not Types that do not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" + + + +----- Predicates as conditions ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be types that do not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" or "AttributeNamespace.Attribute3" or "AttributeNamespace.UnusedAttribute" or "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.ClassWithSingleAttribute" or "AttributeNamespace.ClassWithTwoAttributes" or "AttributeNamespace.ClassWithThreeAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "AttributeNamespace.ClassWithSingleAttributeWithArguments" or "AttributeNamespace.ClassWithTwoAttributesWithArguments" or "AttributeNamespace.ClassWithThreeAttributesWithArguments" or "AttributeNamespace.OnceUsedAttribute" or "AttributeNamespace.ClassWithSingleUniquelyUsedAttribute" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be types that do not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1"" failed: + AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" or "AttributeNamespace.Attribute3" or "AttributeNamespace.UnusedAttribute" or "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.ClassWithSingleAttribute" or "AttributeNamespace.ClassWithTwoAttributes" or "AttributeNamespace.ClassWithThreeAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "AttributeNamespace.ClassWithSingleAttributeWithArguments" or "AttributeNamespace.ClassWithTwoAttributesWithArguments" or "AttributeNamespace.ClassWithThreeAttributesWithArguments" or "AttributeNamespace.OnceUsedAttribute" or "AttributeNamespace.ClassWithSingleUniquelyUsedAttribute" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be types that do not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" or "AttributeNamespace.Attribute3" or "AttributeNamespace.UnusedAttribute" or "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.ClassWithSingleAttribute" or "AttributeNamespace.ClassWithTwoAttributes" or "AttributeNamespace.ClassWithThreeAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "AttributeNamespace.ClassWithSingleAttributeWithArguments" or "AttributeNamespace.ClassWithTwoAttributesWithArguments" or "AttributeNamespace.ClassWithThreeAttributesWithArguments" or "AttributeNamespace.OnceUsedAttribute" or "AttributeNamespace.ClassWithSingleUniquelyUsedAttribute" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be types that do not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1"" failed: + AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" or "AttributeNamespace.Attribute3" or "AttributeNamespace.UnusedAttribute" or "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.ClassWithSingleAttribute" or "AttributeNamespace.ClassWithTwoAttributes" or "AttributeNamespace.ClassWithThreeAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "AttributeNamespace.ClassWithSingleAttributeWithArguments" or "AttributeNamespace.ClassWithTwoAttributesWithArguments" or "AttributeNamespace.ClassWithThreeAttributesWithArguments" or "AttributeNamespace.OnceUsedAttribute" or "AttributeNamespace.ClassWithSingleUniquelyUsedAttribute" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be types that do not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" or "AttributeNamespace.Attribute3" or "AttributeNamespace.UnusedAttribute" or "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.ClassWithSingleAttribute" or "AttributeNamespace.ClassWithTwoAttributes" or "AttributeNamespace.ClassWithThreeAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "AttributeNamespace.ClassWithSingleAttributeWithArguments" or "AttributeNamespace.ClassWithTwoAttributesWithArguments" or "AttributeNamespace.ClassWithThreeAttributesWithArguments" or "AttributeNamespace.OnceUsedAttribute" or "AttributeNamespace.ClassWithSingleUniquelyUsedAttribute" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be types that do not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1"" failed: + AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" or "AttributeNamespace.Attribute3" or "AttributeNamespace.UnusedAttribute" or "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.ClassWithSingleAttribute" or "AttributeNamespace.ClassWithTwoAttributes" or "AttributeNamespace.ClassWithThreeAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "AttributeNamespace.ClassWithSingleAttributeWithArguments" or "AttributeNamespace.ClassWithTwoAttributesWithArguments" or "AttributeNamespace.ClassWithThreeAttributesWithArguments" or "AttributeNamespace.OnceUsedAttribute" or "AttributeNamespace.ClassWithSingleUniquelyUsedAttribute" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be types that do not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" or "AttributeNamespace.Attribute3" or "AttributeNamespace.UnusedAttribute" or "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.ClassWithSingleAttribute" or "AttributeNamespace.ClassWithTwoAttributes" or "AttributeNamespace.ClassWithThreeAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "AttributeNamespace.ClassWithSingleAttributeWithArguments" or "AttributeNamespace.ClassWithTwoAttributesWithArguments" or "AttributeNamespace.ClassWithThreeAttributesWithArguments" or "AttributeNamespace.OnceUsedAttribute" or "AttributeNamespace.ClassWithSingleUniquelyUsedAttribute" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be types that do not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1"" failed: + AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" or "AttributeNamespace.Attribute3" or "AttributeNamespace.UnusedAttribute" or "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.ClassWithSingleAttribute" or "AttributeNamespace.ClassWithTwoAttributes" or "AttributeNamespace.ClassWithThreeAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "AttributeNamespace.ClassWithSingleAttributeWithArguments" or "AttributeNamespace.ClassWithTwoAttributesWithArguments" or "AttributeNamespace.ClassWithThreeAttributesWithArguments" or "AttributeNamespace.OnceUsedAttribute" or "AttributeNamespace.ClassWithSingleUniquelyUsedAttribute" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" ===== Violations with value arguments ===== -Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should does have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter2=Argument1" +----- Conditions ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter2=Argument1" Result: False -Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter2=Argument1" +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments does have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter2=Argument1" Message: -"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should does have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter2=Argument1"" failed: - AttributeNamespace.ClassWithSingleAttributeWithNamedArguments not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter2=Argument1" +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter2=Argument1"" failed: + AttributeNamespace.ClassWithSingleAttributeWithNamedArguments does have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter2=Argument1" -Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should does have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter2=Argument1" +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter2=Argument1" Result: False -Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter2=Argument1" +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments does have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter2=Argument1" Message: -"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should does have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter2=Argument1"" failed: - AttributeNamespace.ClassWithSingleAttributeWithNamedArguments not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter2=Argument1" +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter2=Argument1"" failed: + AttributeNamespace.ClassWithSingleAttributeWithNamedArguments does have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter2=Argument1" -Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should does have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter2=Argument1" +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter2=Argument1" Result: False -Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter2=Argument1" +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments does have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter2=Argument1" Message: -"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should does have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter2=Argument1"" failed: - AttributeNamespace.ClassWithSingleAttributeWithNamedArguments not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter2=Argument1" +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter2=Argument1"" failed: + AttributeNamespace.ClassWithSingleAttributeWithNamedArguments does have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter2=Argument1" -Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should does have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter2=Argument1" +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter2=Argument1" Result: False -Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter2=Argument1" +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments does have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter2=Argument1" Message: -"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should does have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter2=Argument1"" failed: - AttributeNamespace.ClassWithSingleAttributeWithNamedArguments not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter2=Argument1" +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter2=Argument1"" failed: + AttributeNamespace.ClassWithSingleAttributeWithNamedArguments does have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter2=Argument1" + + + +----- Predicates ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be Types that do not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter2=Argument1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not Types that do not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter2=Argument1" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be Types that do not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter2=Argument1"" failed: + AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not Types that do not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter2=Argument1" + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be Types that do not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter2=Argument1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not Types that do not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter2=Argument1" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be Types that do not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter2=Argument1"" failed: + AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not Types that do not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter2=Argument1" + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be Types that do not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter2=Argument1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not Types that do not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter2=Argument1" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be Types that do not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter2=Argument1"" failed: + AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not Types that do not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter2=Argument1" + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be Types that do not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter2=Argument1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not Types that do not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter2=Argument1" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be Types that do not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter2=Argument1"" failed: + AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not Types that do not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter2=Argument1" + + + +----- Predicates as conditions ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be types that do not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter2=Argument1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" or "AttributeNamespace.Attribute3" or "AttributeNamespace.UnusedAttribute" or "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.ClassWithSingleAttribute" or "AttributeNamespace.ClassWithTwoAttributes" or "AttributeNamespace.ClassWithThreeAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "AttributeNamespace.ClassWithSingleAttributeWithArguments" or "AttributeNamespace.ClassWithTwoAttributesWithArguments" or "AttributeNamespace.ClassWithThreeAttributesWithArguments" or "AttributeNamespace.OnceUsedAttribute" or "AttributeNamespace.ClassWithSingleUniquelyUsedAttribute" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be types that do not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter2=Argument1"" failed: + AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" or "AttributeNamespace.Attribute3" or "AttributeNamespace.UnusedAttribute" or "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.ClassWithSingleAttribute" or "AttributeNamespace.ClassWithTwoAttributes" or "AttributeNamespace.ClassWithThreeAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "AttributeNamespace.ClassWithSingleAttributeWithArguments" or "AttributeNamespace.ClassWithTwoAttributesWithArguments" or "AttributeNamespace.ClassWithThreeAttributesWithArguments" or "AttributeNamespace.OnceUsedAttribute" or "AttributeNamespace.ClassWithSingleUniquelyUsedAttribute" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be types that do not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter2=Argument1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" or "AttributeNamespace.Attribute3" or "AttributeNamespace.UnusedAttribute" or "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.ClassWithSingleAttribute" or "AttributeNamespace.ClassWithTwoAttributes" or "AttributeNamespace.ClassWithThreeAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "AttributeNamespace.ClassWithSingleAttributeWithArguments" or "AttributeNamespace.ClassWithTwoAttributesWithArguments" or "AttributeNamespace.ClassWithThreeAttributesWithArguments" or "AttributeNamespace.OnceUsedAttribute" or "AttributeNamespace.ClassWithSingleUniquelyUsedAttribute" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be types that do not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter2=Argument1"" failed: + AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" or "AttributeNamespace.Attribute3" or "AttributeNamespace.UnusedAttribute" or "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.ClassWithSingleAttribute" or "AttributeNamespace.ClassWithTwoAttributes" or "AttributeNamespace.ClassWithThreeAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "AttributeNamespace.ClassWithSingleAttributeWithArguments" or "AttributeNamespace.ClassWithTwoAttributesWithArguments" or "AttributeNamespace.ClassWithThreeAttributesWithArguments" or "AttributeNamespace.OnceUsedAttribute" or "AttributeNamespace.ClassWithSingleUniquelyUsedAttribute" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be types that do not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter2=Argument1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" or "AttributeNamespace.Attribute3" or "AttributeNamespace.UnusedAttribute" or "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.ClassWithSingleAttribute" or "AttributeNamespace.ClassWithTwoAttributes" or "AttributeNamespace.ClassWithThreeAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "AttributeNamespace.ClassWithSingleAttributeWithArguments" or "AttributeNamespace.ClassWithTwoAttributesWithArguments" or "AttributeNamespace.ClassWithThreeAttributesWithArguments" or "AttributeNamespace.OnceUsedAttribute" or "AttributeNamespace.ClassWithSingleUniquelyUsedAttribute" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be types that do not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter2=Argument1"" failed: + AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" or "AttributeNamespace.Attribute3" or "AttributeNamespace.UnusedAttribute" or "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.ClassWithSingleAttribute" or "AttributeNamespace.ClassWithTwoAttributes" or "AttributeNamespace.ClassWithThreeAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "AttributeNamespace.ClassWithSingleAttributeWithArguments" or "AttributeNamespace.ClassWithTwoAttributesWithArguments" or "AttributeNamespace.ClassWithThreeAttributesWithArguments" or "AttributeNamespace.OnceUsedAttribute" or "AttributeNamespace.ClassWithSingleUniquelyUsedAttribute" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be types that do not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter2=Argument1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" or "AttributeNamespace.Attribute3" or "AttributeNamespace.UnusedAttribute" or "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.ClassWithSingleAttribute" or "AttributeNamespace.ClassWithTwoAttributes" or "AttributeNamespace.ClassWithThreeAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "AttributeNamespace.ClassWithSingleAttributeWithArguments" or "AttributeNamespace.ClassWithTwoAttributesWithArguments" or "AttributeNamespace.ClassWithThreeAttributesWithArguments" or "AttributeNamespace.OnceUsedAttribute" or "AttributeNamespace.ClassWithSingleUniquelyUsedAttribute" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be types that do not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter2=Argument1"" failed: + AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" or "AttributeNamespace.Attribute3" or "AttributeNamespace.UnusedAttribute" or "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.ClassWithSingleAttribute" or "AttributeNamespace.ClassWithTwoAttributes" or "AttributeNamespace.ClassWithThreeAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "AttributeNamespace.ClassWithSingleAttributeWithArguments" or "AttributeNamespace.ClassWithTwoAttributesWithArguments" or "AttributeNamespace.ClassWithThreeAttributesWithArguments" or "AttributeNamespace.OnceUsedAttribute" or "AttributeNamespace.ClassWithSingleUniquelyUsedAttribute" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" ===== Unused attribute ===== -Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should does have attribute "AttributeNamespace.UnusedAttribute" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" +----- Conditions ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should not have attribute "AttributeNamespace.UnusedAttribute" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" Result: True Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments passed Message: All Evaluations passed -Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should does have attribute "AttributeNamespace.UnusedAttribute" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should not have attribute "AttributeNamespace.UnusedAttribute" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" Result: True Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments passed Message: All Evaluations passed -Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should does have attribute "AttributeNamespace.UnusedAttribute" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should not have attribute "AttributeNamespace.UnusedAttribute" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" Result: True Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments passed Message: All Evaluations passed -Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should does have attribute "AttributeNamespace.UnusedAttribute" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should not have attribute "AttributeNamespace.UnusedAttribute" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments passed +Message: +All Evaluations passed + +----- Predicates ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be Types that do not have attribute "AttributeNamespace.UnusedAttribute" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be Types that do not have attribute "AttributeNamespace.UnusedAttribute" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be Types that do not have attribute "AttributeNamespace.UnusedAttribute" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be Types that do not have attribute "AttributeNamespace.UnusedAttribute" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments passed +Message: +All Evaluations passed + +----- Predicates as conditions ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be types that do not have attribute "AttributeNamespace.UnusedAttribute" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be types that do not have attribute "AttributeNamespace.UnusedAttribute" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be types that do not have attribute "AttributeNamespace.UnusedAttribute" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be types that do not have attribute "AttributeNamespace.UnusedAttribute" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" Result: True Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments passed Message: @@ -154,7 +472,25 @@ All Evaluations passed ===== Type outside of architecture ===== -Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should does have attribute "TypeDependencyNamespace.BaseClass" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" +----- Conditions ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should not have attribute "TypeDependencyNamespace.BaseClass" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments passed +Message: +All Evaluations passed + +----- Predicates ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be Types that do not have attribute "TypeDependencyNamespace.BaseClass" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" +Result: True +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments passed +Message: +All Evaluations passed + +----- Predicates as conditions ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be types that do not have attribute "TypeDependencyNamespace.BaseClass" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" Result: True Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments passed Message: @@ -162,109 +498,331 @@ All Evaluations passed ===== Empty arguments ===== -Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should does have attribute "AttributeNamespace.Attribute1" +----- Conditions ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should not have attribute "AttributeNamespace.Attribute1" Result: False -Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments not have attribute "AttributeNamespace.Attribute1" +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments does have attribute "AttributeNamespace.Attribute1" Message: -"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should does have attribute "AttributeNamespace.Attribute1"" failed: - AttributeNamespace.ClassWithSingleAttributeWithNamedArguments not have attribute "AttributeNamespace.Attribute1" +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should not have attribute "AttributeNamespace.Attribute1"" failed: + AttributeNamespace.ClassWithSingleAttributeWithNamedArguments does have attribute "AttributeNamespace.Attribute1" -Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should does have attribute "AttributeNamespace.Attribute1" +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should not have attribute "AttributeNamespace.Attribute1" Result: False -Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments not have attribute "AttributeNamespace.Attribute1" +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments does have attribute "AttributeNamespace.Attribute1" Message: -"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should does have attribute "AttributeNamespace.Attribute1"" failed: - AttributeNamespace.ClassWithSingleAttributeWithNamedArguments not have attribute "AttributeNamespace.Attribute1" +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should not have attribute "AttributeNamespace.Attribute1"" failed: + AttributeNamespace.ClassWithSingleAttributeWithNamedArguments does have attribute "AttributeNamespace.Attribute1" + + + +----- Predicates ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be Types that do not have attribute "AttributeNamespace.Attribute1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not Types that do not have attribute "AttributeNamespace.Attribute1" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be Types that do not have attribute "AttributeNamespace.Attribute1"" failed: + AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not Types that do not have attribute "AttributeNamespace.Attribute1" + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be Types that do not have attribute "AttributeNamespace.Attribute1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not Types that do not have attribute "AttributeNamespace.Attribute1" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be Types that do not have attribute "AttributeNamespace.Attribute1"" failed: + AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not Types that do not have attribute "AttributeNamespace.Attribute1" + + + +----- Predicates as conditions ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be types that do not have attribute "AttributeNamespace.Attribute1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" or "AttributeNamespace.Attribute3" or "AttributeNamespace.UnusedAttribute" or "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "AttributeNamespace.OnceUsedAttribute" or "AttributeNamespace.ClassWithSingleUniquelyUsedAttribute" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be types that do not have attribute "AttributeNamespace.Attribute1"" failed: + AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" or "AttributeNamespace.Attribute3" or "AttributeNamespace.UnusedAttribute" or "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "AttributeNamespace.OnceUsedAttribute" or "AttributeNamespace.ClassWithSingleUniquelyUsedAttribute" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be types that do not have attribute "AttributeNamespace.Attribute1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" or "AttributeNamespace.Attribute3" or "AttributeNamespace.UnusedAttribute" or "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "AttributeNamespace.OnceUsedAttribute" or "AttributeNamespace.ClassWithSingleUniquelyUsedAttribute" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be types that do not have attribute "AttributeNamespace.Attribute1"" failed: + AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" or "AttributeNamespace.Attribute3" or "AttributeNamespace.UnusedAttribute" or "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "AttributeNamespace.OnceUsedAttribute" or "AttributeNamespace.ClassWithSingleUniquelyUsedAttribute" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" ===== Multiple arguments ===== -Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should does have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" and "NamedParameter2=Ar... +----- Conditions ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" and "NamedParameter2=Arg... +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments does have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" and "NamedParameter2=Argument1" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" and "NamedParameter2=Arg..." failed: + AttributeNamespace.ClassWithSingleAttributeWithNamedArguments does have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" and "NamedParameter2=Argument1" + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" and "NamedParameter2=Arg... +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments does have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" and "NamedParameter2=Argument1" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" and "NamedParameter2=Arg..." failed: + AttributeNamespace.ClassWithSingleAttributeWithNamedArguments does have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" and "NamedParameter2=Argument1" + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" and "NamedParameter2=Arg... +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments does have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" and "NamedParameter2=Argument1" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" and "NamedParameter2=Arg..." failed: + AttributeNamespace.ClassWithSingleAttributeWithNamedArguments does have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" and "NamedParameter2=Argument1" + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" and "NamedParameter2=Arg... +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments does have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" and "NamedParameter2=Argument1" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" and "NamedParameter2=Arg..." failed: + AttributeNamespace.ClassWithSingleAttributeWithNamedArguments does have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" and "NamedParameter2=Argument1" + + + +----- Predicates ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be Types that do not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" and "Na... Result: False -Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" and "NamedParameter2=Argument1" +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not Types that do not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" and "NamedParameter2=... Message: -"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should does have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" and "NamedParameter2=Ar..." failed: - AttributeNamespace.ClassWithSingleAttributeWithNamedArguments not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" and "NamedParameter2=Argument1" +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be Types that do not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" and "Na..." failed: + AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not Types that do not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" and "NamedParameter2=... -Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should does have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" and "NamedParameter2=Ar... +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be Types that do not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" and "Na... Result: False -Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" and "NamedParameter2=Argument1" +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not Types that do not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" and "NamedParameter2=... Message: -"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should does have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" and "NamedParameter2=Ar..." failed: - AttributeNamespace.ClassWithSingleAttributeWithNamedArguments not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" and "NamedParameter2=Argument1" +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be Types that do not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" and "Na..." failed: + AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not Types that do not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" and "NamedParameter2=... -Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should does have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" and "NamedParameter2=Ar... +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be Types that do not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" and "Na... Result: False -Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" and "NamedParameter2=Argument1" +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not Types that do not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" and "NamedParameter2=... Message: -"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should does have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" and "NamedParameter2=Ar..." failed: - AttributeNamespace.ClassWithSingleAttributeWithNamedArguments not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" and "NamedParameter2=Argument1" +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be Types that do not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" and "Na..." failed: + AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not Types that do not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" and "NamedParameter2=... -Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should does have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" and "NamedParameter2=Ar... +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be Types that do not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" and "Na... Result: False -Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" and "NamedParameter2=Argument1" +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not Types that do not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" and "NamedParameter2=... Message: -"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should does have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" and "NamedParameter2=Ar..." failed: - AttributeNamespace.ClassWithSingleAttributeWithNamedArguments not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" and "NamedParameter2=Argument1" +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be Types that do not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" and "Na..." failed: + AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not Types that do not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" and "NamedParameter2=... + + + +----- Predicates as conditions ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be types that do not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" and "Na... +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" or "AttributeNamespace.Attribute3" or "AttributeNamespace.UnusedAttribute" or "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.ClassWithSingleAttribute" or "AttributeNamespace.ClassWithTwoAttributes" or "AttributeNamespace.ClassWithThreeAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "AttributeNamespace.ClassWithSingleAttributeWithArguments" or "AttributeNamespace.ClassWithTwoAttributesWithArguments" or "AttributeNamespace.ClassWithThreeAttributesWithArguments" or "AttributeNamespace.OnceUsedAttribute" or "AttributeNamespace.ClassWithSingleUniquelyUsedAttribute" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be types that do not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" and "Na..." failed: + AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" or "AttributeNamespace.Attribute3" or "AttributeNamespace.UnusedAttribute" or "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.ClassWithSingleAttribute" or "AttributeNamespace.ClassWithTwoAttributes" or "AttributeNamespace.ClassWithThreeAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "AttributeNamespace.ClassWithSingleAttributeWithArguments" or "AttributeNamespace.ClassWithTwoAttributesWithArguments" or "AttributeNamespace.ClassWithThreeAttributesWithArguments" or "AttributeNamespace.OnceUsedAttribute" or "AttributeNamespace.ClassWithSingleUniquelyUsedAttribute" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be types that do not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" and "Na... +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" or "AttributeNamespace.Attribute3" or "AttributeNamespace.UnusedAttribute" or "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.ClassWithSingleAttribute" or "AttributeNamespace.ClassWithTwoAttributes" or "AttributeNamespace.ClassWithThreeAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "AttributeNamespace.ClassWithSingleAttributeWithArguments" or "AttributeNamespace.ClassWithTwoAttributesWithArguments" or "AttributeNamespace.ClassWithThreeAttributesWithArguments" or "AttributeNamespace.OnceUsedAttribute" or "AttributeNamespace.ClassWithSingleUniquelyUsedAttribute" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be types that do not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" and "Na..." failed: + AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" or "AttributeNamespace.Attribute3" or "AttributeNamespace.UnusedAttribute" or "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.ClassWithSingleAttribute" or "AttributeNamespace.ClassWithTwoAttributes" or "AttributeNamespace.ClassWithThreeAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "AttributeNamespace.ClassWithSingleAttributeWithArguments" or "AttributeNamespace.ClassWithTwoAttributesWithArguments" or "AttributeNamespace.ClassWithThreeAttributesWithArguments" or "AttributeNamespace.OnceUsedAttribute" or "AttributeNamespace.ClassWithSingleUniquelyUsedAttribute" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be types that do not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" and "Na... +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" or "AttributeNamespace.Attribute3" or "AttributeNamespace.UnusedAttribute" or "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.ClassWithSingleAttribute" or "AttributeNamespace.ClassWithTwoAttributes" or "AttributeNamespace.ClassWithThreeAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "AttributeNamespace.ClassWithSingleAttributeWithArguments" or "AttributeNamespace.ClassWithTwoAttributesWithArguments" or "AttributeNamespace.ClassWithThreeAttributesWithArguments" or "AttributeNamespace.OnceUsedAttribute" or "AttributeNamespace.ClassWithSingleUniquelyUsedAttribute" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be types that do not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" and "Na..." failed: + AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" or "AttributeNamespace.Attribute3" or "AttributeNamespace.UnusedAttribute" or "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.ClassWithSingleAttribute" or "AttributeNamespace.ClassWithTwoAttributes" or "AttributeNamespace.ClassWithThreeAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "AttributeNamespace.ClassWithSingleAttributeWithArguments" or "AttributeNamespace.ClassWithTwoAttributesWithArguments" or "AttributeNamespace.ClassWithThreeAttributesWithArguments" or "AttributeNamespace.OnceUsedAttribute" or "AttributeNamespace.ClassWithSingleUniquelyUsedAttribute" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be types that do not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" and "Na... +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" or "AttributeNamespace.Attribute3" or "AttributeNamespace.UnusedAttribute" or "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.ClassWithSingleAttribute" or "AttributeNamespace.ClassWithTwoAttributes" or "AttributeNamespace.ClassWithThreeAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "AttributeNamespace.ClassWithSingleAttributeWithArguments" or "AttributeNamespace.ClassWithTwoAttributesWithArguments" or "AttributeNamespace.ClassWithThreeAttributesWithArguments" or "AttributeNamespace.OnceUsedAttribute" or "AttributeNamespace.ClassWithSingleUniquelyUsedAttribute" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" should be types that do not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" and "Na..." failed: + AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" or "AttributeNamespace.Attribute3" or "AttributeNamespace.UnusedAttribute" or "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.ClassWithSingleAttribute" or "AttributeNamespace.ClassWithTwoAttributes" or "AttributeNamespace.ClassWithThreeAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "AttributeNamespace.ClassWithSingleAttributeWithArguments" or "AttributeNamespace.ClassWithTwoAttributesWithArguments" or "AttributeNamespace.ClassWithThreeAttributesWithArguments" or "AttributeNamespace.OnceUsedAttribute" or "AttributeNamespace.ClassWithSingleUniquelyUsedAttribute" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" ===== Multiple inputs ===== -Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" or "AttributeNamespace.ClassWithTwoAttributesWithNamedArguments" should does have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" +----- Conditions ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" or "AttributeNamespace.ClassWithTwoAttributesWithNamedArguments" should not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments does have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" +Result: False +Description: AttributeNamespace.ClassWithTwoAttributesWithNamedArguments does have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" or "AttributeNamespace.ClassWithTwoAttributesWithNamedArguments" should not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1"" failed: + AttributeNamespace.ClassWithSingleAttributeWithNamedArguments does have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" + AttributeNamespace.ClassWithTwoAttributesWithNamedArguments does have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" or "AttributeNamespace.ClassWithTwoAttributesWithNamedArguments" should not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments does have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" +Result: False +Description: AttributeNamespace.ClassWithTwoAttributesWithNamedArguments does have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" or "AttributeNamespace.ClassWithTwoAttributesWithNamedArguments" should not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1"" failed: + AttributeNamespace.ClassWithSingleAttributeWithNamedArguments does have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" + AttributeNamespace.ClassWithTwoAttributesWithNamedArguments does have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" or "AttributeNamespace.ClassWithTwoAttributesWithNamedArguments" should not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments does have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" +Result: False +Description: AttributeNamespace.ClassWithTwoAttributesWithNamedArguments does have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" or "AttributeNamespace.ClassWithTwoAttributesWithNamedArguments" should not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1"" failed: + AttributeNamespace.ClassWithSingleAttributeWithNamedArguments does have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" + AttributeNamespace.ClassWithTwoAttributesWithNamedArguments does have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" or "AttributeNamespace.ClassWithTwoAttributesWithNamedArguments" should not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments does have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" +Result: False +Description: AttributeNamespace.ClassWithTwoAttributesWithNamedArguments does have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" or "AttributeNamespace.ClassWithTwoAttributesWithNamedArguments" should not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1"" failed: + AttributeNamespace.ClassWithSingleAttributeWithNamedArguments does have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" + AttributeNamespace.ClassWithTwoAttributesWithNamedArguments does have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" + + + +----- Predicates ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" or "AttributeNamespace.ClassWithTwoAttributesWithNamedArguments" should be Types that do not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not Types that do not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" +Result: False +Description: AttributeNamespace.ClassWithTwoAttributesWithNamedArguments is not Types that do not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" or "AttributeNamespace.ClassWithTwoAttributesWithNamedArguments" should be Types that do not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1"" failed: + AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not Types that do not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" + AttributeNamespace.ClassWithTwoAttributesWithNamedArguments is not Types that do not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" or "AttributeNamespace.ClassWithTwoAttributesWithNamedArguments" should be Types that do not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not Types that do not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" +Result: False +Description: AttributeNamespace.ClassWithTwoAttributesWithNamedArguments is not Types that do not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" or "AttributeNamespace.ClassWithTwoAttributesWithNamedArguments" should be Types that do not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1"" failed: + AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not Types that do not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" + AttributeNamespace.ClassWithTwoAttributesWithNamedArguments is not Types that do not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" or "AttributeNamespace.ClassWithTwoAttributesWithNamedArguments" should be Types that do not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not Types that do not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" +Result: False +Description: AttributeNamespace.ClassWithTwoAttributesWithNamedArguments is not Types that do not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" or "AttributeNamespace.ClassWithTwoAttributesWithNamedArguments" should be Types that do not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1"" failed: + AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not Types that do not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" + AttributeNamespace.ClassWithTwoAttributesWithNamedArguments is not Types that do not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" or "AttributeNamespace.ClassWithTwoAttributesWithNamedArguments" should be Types that do not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" +Result: False +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not Types that do not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" +Result: False +Description: AttributeNamespace.ClassWithTwoAttributesWithNamedArguments is not Types that do not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" or "AttributeNamespace.ClassWithTwoAttributesWithNamedArguments" should be Types that do not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1"" failed: + AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not Types that do not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" + AttributeNamespace.ClassWithTwoAttributesWithNamedArguments is not Types that do not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" + + + +----- Predicates as conditions ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" or "AttributeNamespace.ClassWithTwoAttributesWithNamedArguments" should be types that do not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" Result: False -Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" or "AttributeNamespace.Attribute3" or "AttributeNamespace.UnusedAttribute" or "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.ClassWithSingleAttribute" or "AttributeNamespace.ClassWithTwoAttributes" or "AttributeNamespace.ClassWithThreeAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "AttributeNamespace.ClassWithSingleAttributeWithArguments" or "AttributeNamespace.ClassWithTwoAttributesWithArguments" or "AttributeNamespace.ClassWithThreeAttributesWithArguments" or "AttributeNamespace.OnceUsedAttribute" or "AttributeNamespace.ClassWithSingleUniquelyUsedAttribute" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" Result: False -Description: AttributeNamespace.ClassWithTwoAttributesWithNamedArguments not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" +Description: AttributeNamespace.ClassWithTwoAttributesWithNamedArguments is not "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" or "AttributeNamespace.Attribute3" or "AttributeNamespace.UnusedAttribute" or "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.ClassWithSingleAttribute" or "AttributeNamespace.ClassWithTwoAttributes" or "AttributeNamespace.ClassWithThreeAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "AttributeNamespace.ClassWithSingleAttributeWithArguments" or "AttributeNamespace.ClassWithTwoAttributesWithArguments" or "AttributeNamespace.ClassWithThreeAttributesWithArguments" or "AttributeNamespace.OnceUsedAttribute" or "AttributeNamespace.ClassWithSingleUniquelyUsedAttribute" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" Message: -"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" or "AttributeNamespace.ClassWithTwoAttributesWithNamedArguments" should does have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1"" failed: - AttributeNamespace.ClassWithSingleAttributeWithNamedArguments not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" - AttributeNamespace.ClassWithTwoAttributesWithNamedArguments not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" or "AttributeNamespace.ClassWithTwoAttributesWithNamedArguments" should be types that do not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1"" failed: + AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" or "AttributeNamespace.Attribute3" or "AttributeNamespace.UnusedAttribute" or "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.ClassWithSingleAttribute" or "AttributeNamespace.ClassWithTwoAttributes" or "AttributeNamespace.ClassWithThreeAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "AttributeNamespace.ClassWithSingleAttributeWithArguments" or "AttributeNamespace.ClassWithTwoAttributesWithArguments" or "AttributeNamespace.ClassWithThreeAttributesWithArguments" or "AttributeNamespace.OnceUsedAttribute" or "AttributeNamespace.ClassWithSingleUniquelyUsedAttribute" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" + AttributeNamespace.ClassWithTwoAttributesWithNamedArguments is not "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" or "AttributeNamespace.Attribute3" or "AttributeNamespace.UnusedAttribute" or "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.ClassWithSingleAttribute" or "AttributeNamespace.ClassWithTwoAttributes" or "AttributeNamespace.ClassWithThreeAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "AttributeNamespace.ClassWithSingleAttributeWithArguments" or "AttributeNamespace.ClassWithTwoAttributesWithArguments" or "AttributeNamespace.ClassWithThreeAttributesWithArguments" or "AttributeNamespace.OnceUsedAttribute" or "AttributeNamespace.ClassWithSingleUniquelyUsedAttribute" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" -Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" or "AttributeNamespace.ClassWithTwoAttributesWithNamedArguments" should does have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" or "AttributeNamespace.ClassWithTwoAttributesWithNamedArguments" should be types that do not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" Result: False -Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" or "AttributeNamespace.Attribute3" or "AttributeNamespace.UnusedAttribute" or "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.ClassWithSingleAttribute" or "AttributeNamespace.ClassWithTwoAttributes" or "AttributeNamespace.ClassWithThreeAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "AttributeNamespace.ClassWithSingleAttributeWithArguments" or "AttributeNamespace.ClassWithTwoAttributesWithArguments" or "AttributeNamespace.ClassWithThreeAttributesWithArguments" or "AttributeNamespace.OnceUsedAttribute" or "AttributeNamespace.ClassWithSingleUniquelyUsedAttribute" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" Result: False -Description: AttributeNamespace.ClassWithTwoAttributesWithNamedArguments not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" +Description: AttributeNamespace.ClassWithTwoAttributesWithNamedArguments is not "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" or "AttributeNamespace.Attribute3" or "AttributeNamespace.UnusedAttribute" or "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.ClassWithSingleAttribute" or "AttributeNamespace.ClassWithTwoAttributes" or "AttributeNamespace.ClassWithThreeAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "AttributeNamespace.ClassWithSingleAttributeWithArguments" or "AttributeNamespace.ClassWithTwoAttributesWithArguments" or "AttributeNamespace.ClassWithThreeAttributesWithArguments" or "AttributeNamespace.OnceUsedAttribute" or "AttributeNamespace.ClassWithSingleUniquelyUsedAttribute" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" Message: -"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" or "AttributeNamespace.ClassWithTwoAttributesWithNamedArguments" should does have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1"" failed: - AttributeNamespace.ClassWithSingleAttributeWithNamedArguments not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" - AttributeNamespace.ClassWithTwoAttributesWithNamedArguments not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" or "AttributeNamespace.ClassWithTwoAttributesWithNamedArguments" should be types that do not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1"" failed: + AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" or "AttributeNamespace.Attribute3" or "AttributeNamespace.UnusedAttribute" or "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.ClassWithSingleAttribute" or "AttributeNamespace.ClassWithTwoAttributes" or "AttributeNamespace.ClassWithThreeAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "AttributeNamespace.ClassWithSingleAttributeWithArguments" or "AttributeNamespace.ClassWithTwoAttributesWithArguments" or "AttributeNamespace.ClassWithThreeAttributesWithArguments" or "AttributeNamespace.OnceUsedAttribute" or "AttributeNamespace.ClassWithSingleUniquelyUsedAttribute" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" + AttributeNamespace.ClassWithTwoAttributesWithNamedArguments is not "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" or "AttributeNamespace.Attribute3" or "AttributeNamespace.UnusedAttribute" or "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.ClassWithSingleAttribute" or "AttributeNamespace.ClassWithTwoAttributes" or "AttributeNamespace.ClassWithThreeAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "AttributeNamespace.ClassWithSingleAttributeWithArguments" or "AttributeNamespace.ClassWithTwoAttributesWithArguments" or "AttributeNamespace.ClassWithThreeAttributesWithArguments" or "AttributeNamespace.OnceUsedAttribute" or "AttributeNamespace.ClassWithSingleUniquelyUsedAttribute" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" -Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" or "AttributeNamespace.ClassWithTwoAttributesWithNamedArguments" should does have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" or "AttributeNamespace.ClassWithTwoAttributesWithNamedArguments" should be types that do not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" Result: False -Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" or "AttributeNamespace.Attribute3" or "AttributeNamespace.UnusedAttribute" or "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.ClassWithSingleAttribute" or "AttributeNamespace.ClassWithTwoAttributes" or "AttributeNamespace.ClassWithThreeAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "AttributeNamespace.ClassWithSingleAttributeWithArguments" or "AttributeNamespace.ClassWithTwoAttributesWithArguments" or "AttributeNamespace.ClassWithThreeAttributesWithArguments" or "AttributeNamespace.OnceUsedAttribute" or "AttributeNamespace.ClassWithSingleUniquelyUsedAttribute" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" Result: False -Description: AttributeNamespace.ClassWithTwoAttributesWithNamedArguments not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" +Description: AttributeNamespace.ClassWithTwoAttributesWithNamedArguments is not "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" or "AttributeNamespace.Attribute3" or "AttributeNamespace.UnusedAttribute" or "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.ClassWithSingleAttribute" or "AttributeNamespace.ClassWithTwoAttributes" or "AttributeNamespace.ClassWithThreeAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "AttributeNamespace.ClassWithSingleAttributeWithArguments" or "AttributeNamespace.ClassWithTwoAttributesWithArguments" or "AttributeNamespace.ClassWithThreeAttributesWithArguments" or "AttributeNamespace.OnceUsedAttribute" or "AttributeNamespace.ClassWithSingleUniquelyUsedAttribute" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" Message: -"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" or "AttributeNamespace.ClassWithTwoAttributesWithNamedArguments" should does have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1"" failed: - AttributeNamespace.ClassWithSingleAttributeWithNamedArguments not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" - AttributeNamespace.ClassWithTwoAttributesWithNamedArguments not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" or "AttributeNamespace.ClassWithTwoAttributesWithNamedArguments" should be types that do not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1"" failed: + AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" or "AttributeNamespace.Attribute3" or "AttributeNamespace.UnusedAttribute" or "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.ClassWithSingleAttribute" or "AttributeNamespace.ClassWithTwoAttributes" or "AttributeNamespace.ClassWithThreeAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "AttributeNamespace.ClassWithSingleAttributeWithArguments" or "AttributeNamespace.ClassWithTwoAttributesWithArguments" or "AttributeNamespace.ClassWithThreeAttributesWithArguments" or "AttributeNamespace.OnceUsedAttribute" or "AttributeNamespace.ClassWithSingleUniquelyUsedAttribute" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" + AttributeNamespace.ClassWithTwoAttributesWithNamedArguments is not "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" or "AttributeNamespace.Attribute3" or "AttributeNamespace.UnusedAttribute" or "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.ClassWithSingleAttribute" or "AttributeNamespace.ClassWithTwoAttributes" or "AttributeNamespace.ClassWithThreeAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "AttributeNamespace.ClassWithSingleAttributeWithArguments" or "AttributeNamespace.ClassWithTwoAttributesWithArguments" or "AttributeNamespace.ClassWithThreeAttributesWithArguments" or "AttributeNamespace.OnceUsedAttribute" or "AttributeNamespace.ClassWithSingleUniquelyUsedAttribute" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" -Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" or "AttributeNamespace.ClassWithTwoAttributesWithNamedArguments" should does have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" +Query: Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" or "AttributeNamespace.ClassWithTwoAttributesWithNamedArguments" should be types that do not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" Result: False -Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" +Description: AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" or "AttributeNamespace.Attribute3" or "AttributeNamespace.UnusedAttribute" or "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.ClassWithSingleAttribute" or "AttributeNamespace.ClassWithTwoAttributes" or "AttributeNamespace.ClassWithThreeAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "AttributeNamespace.ClassWithSingleAttributeWithArguments" or "AttributeNamespace.ClassWithTwoAttributesWithArguments" or "AttributeNamespace.ClassWithThreeAttributesWithArguments" or "AttributeNamespace.OnceUsedAttribute" or "AttributeNamespace.ClassWithSingleUniquelyUsedAttribute" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" Result: False -Description: AttributeNamespace.ClassWithTwoAttributesWithNamedArguments not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" +Description: AttributeNamespace.ClassWithTwoAttributesWithNamedArguments is not "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" or "AttributeNamespace.Attribute3" or "AttributeNamespace.UnusedAttribute" or "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.ClassWithSingleAttribute" or "AttributeNamespace.ClassWithTwoAttributes" or "AttributeNamespace.ClassWithThreeAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "AttributeNamespace.ClassWithSingleAttributeWithArguments" or "AttributeNamespace.ClassWithTwoAttributesWithArguments" or "AttributeNamespace.ClassWithThreeAttributesWithArguments" or "AttributeNamespace.OnceUsedAttribute" or "AttributeNamespace.ClassWithSingleUniquelyUsedAttribute" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" Message: -"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" or "AttributeNamespace.ClassWithTwoAttributesWithNamedArguments" should does have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1"" failed: - AttributeNamespace.ClassWithSingleAttributeWithNamedArguments not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" - AttributeNamespace.ClassWithTwoAttributesWithNamedArguments not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1" +"Types that are "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" or "AttributeNamespace.ClassWithTwoAttributesWithNamedArguments" should be types that do not have attribute "AttributeNamespace.Attribute1" with named arguments "NamedParameter1=AttributeNamespace.TypeArgument1"" failed: + AttributeNamespace.ClassWithSingleAttributeWithNamedArguments is not "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" or "AttributeNamespace.Attribute3" or "AttributeNamespace.UnusedAttribute" or "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.ClassWithSingleAttribute" or "AttributeNamespace.ClassWithTwoAttributes" or "AttributeNamespace.ClassWithThreeAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "AttributeNamespace.ClassWithSingleAttributeWithArguments" or "AttributeNamespace.ClassWithTwoAttributesWithArguments" or "AttributeNamespace.ClassWithThreeAttributesWithArguments" or "AttributeNamespace.OnceUsedAttribute" or "AttributeNamespace.ClassWithSingleUniquelyUsedAttribute" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" + AttributeNamespace.ClassWithTwoAttributesWithNamedArguments is not "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" or "AttributeNamespace.Attribute3" or "AttributeNamespace.UnusedAttribute" or "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.ClassWithSingleAttribute" or "AttributeNamespace.ClassWithTwoAttributes" or "AttributeNamespace.ClassWithThreeAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "AttributeNamespace.ClassWithSingleAttributeWithArguments" or "AttributeNamespace.ClassWithTwoAttributesWithArguments" or "AttributeNamespace.ClassWithThreeAttributesWithArguments" or "AttributeNamespace.OnceUsedAttribute" or "AttributeNamespace.ClassWithSingleUniquelyUsedAttribute" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" diff --git a/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.NotHaveNameTest.verified.txt b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.NotHaveNameTest.verified.txt index 17d40424c..03ef3e480 100644 --- a/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.NotHaveNameTest.verified.txt +++ b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.NotHaveNameTest.verified.txt @@ -1,5 +1,7 @@ ===== No violations ===== +----- Conditions ----- + Query: Types that are "TypeDependencyNamespace.BaseClass" should not have name "TypeDependencyNamespace.BaseClass" Result: True Description: TypeDependencyNamespace.BaseClass passed @@ -48,8 +50,110 @@ Description: TypeDependencyNamespace.BaseClass passed Message: All Evaluations passed +----- Predicates ----- + +Query: Types that are "TypeDependencyNamespace.BaseClass" should be Types that do not have name "TypeDependencyNamespace.BaseClass" +Result: True +Description: TypeDependencyNamespace.BaseClass passed +Message: +All Evaluations passed + +Query: Types that are "TypeDependencyNamespace.BaseClass" should be Types that do not have name matching "^.*\.Base.*$" +Result: True +Description: TypeDependencyNamespace.BaseClass passed +Message: +All Evaluations passed + +Query: Types that are "TypeDependencyNamespace.BaseClass" should be Types that do not have full name "BaseClass" +Result: True +Description: TypeDependencyNamespace.BaseClass passed +Message: +All Evaluations passed + +Query: Types that are "TypeDependencyNamespace.BaseClass" should be Types that do not have full name matching "^Base.*$" +Result: True +Description: TypeDependencyNamespace.BaseClass passed +Message: +All Evaluations passed + +Query: Types that are "TypeDependencyNamespace.BaseClass" should be Types that do not have name containing "TypeDependencyNamespace" +Result: True +Description: TypeDependencyNamespace.BaseClass passed +Message: +All Evaluations passed + +Query: Types that are "TypeDependencyNamespace.BaseClass" should be Types that do not have full name containing "NotTheNameOfAnyObject" +Result: True +Description: TypeDependencyNamespace.BaseClass passed +Message: +All Evaluations passed + +Query: Types that are "TypeDependencyNamespace.BaseClass" should be Types that do not have name starting with "TypeDependencyNamespace" +Result: True +Description: TypeDependencyNamespace.BaseClass passed +Message: +All Evaluations passed + +Query: Types that are "TypeDependencyNamespace.BaseClass" should be Types that do not have name ending with "Test" +Result: True +Description: TypeDependencyNamespace.BaseClass passed +Message: +All Evaluations passed + +----- Predicates as conditions ----- + +Query: Types that are "TypeDependencyNamespace.BaseClass" should be types that do not have name "TypeDependencyNamespace.BaseClass" +Result: True +Description: TypeDependencyNamespace.BaseClass passed +Message: +All Evaluations passed + +Query: Types that are "TypeDependencyNamespace.BaseClass" should be types that do not have name matching "^.*\.Base.*$" +Result: True +Description: TypeDependencyNamespace.BaseClass passed +Message: +All Evaluations passed + +Query: Types that are "TypeDependencyNamespace.BaseClass" should be types that do not have full name "BaseClass" +Result: True +Description: TypeDependencyNamespace.BaseClass passed +Message: +All Evaluations passed + +Query: Types that are "TypeDependencyNamespace.BaseClass" should be types that do not have full name matching "^Base.*$" +Result: True +Description: TypeDependencyNamespace.BaseClass passed +Message: +All Evaluations passed + +Query: Types that are "TypeDependencyNamespace.BaseClass" should be types that do not have name containing "TypeDependencyNamespace" +Result: True +Description: TypeDependencyNamespace.BaseClass passed +Message: +All Evaluations passed + +Query: Types that are "TypeDependencyNamespace.BaseClass" should be types that do not have full name containing "NotTheNameOfAnyObject" +Result: True +Description: TypeDependencyNamespace.BaseClass passed +Message: +All Evaluations passed + +Query: Types that are "TypeDependencyNamespace.BaseClass" should be types that do not have name starting with "TypeDependencyNamespace" +Result: True +Description: TypeDependencyNamespace.BaseClass passed +Message: +All Evaluations passed + +Query: Types that are "TypeDependencyNamespace.BaseClass" should be types that do not have name ending with "Test" +Result: True +Description: TypeDependencyNamespace.BaseClass passed +Message: +All Evaluations passed + ===== Violations ===== +----- Conditions ----- + Query: Types that are "TypeDependencyNamespace.BaseClass" should not have name "BaseClass" Result: False Description: TypeDependencyNamespace.BaseClass does have name BaseClass @@ -122,3 +226,151 @@ Message: +----- Predicates ----- + +Query: Types that are "TypeDependencyNamespace.BaseClass" should be Types that do not have name "BaseClass" +Result: False +Description: TypeDependencyNamespace.BaseClass is not Types that do not have name "BaseClass" +Message: +"Types that are "TypeDependencyNamespace.BaseClass" should be Types that do not have name "BaseClass"" failed: + TypeDependencyNamespace.BaseClass is not Types that do not have name "BaseClass" + + + +Query: Types that are "TypeDependencyNamespace.BaseClass" should be Types that do not have name matching "^Base.*$" +Result: False +Description: TypeDependencyNamespace.BaseClass is not Types that do not have name matching "^Base.*$" +Message: +"Types that are "TypeDependencyNamespace.BaseClass" should be Types that do not have name matching "^Base.*$"" failed: + TypeDependencyNamespace.BaseClass is not Types that do not have name matching "^Base.*$" + + + +Query: Types that are "TypeDependencyNamespace.BaseClass" should be Types that do not have full name "TypeDependencyNamespace.BaseClass" +Result: False +Description: TypeDependencyNamespace.BaseClass is not Types that do not have full name "TypeDependencyNamespace.BaseClass" +Message: +"Types that are "TypeDependencyNamespace.BaseClass" should be Types that do not have full name "TypeDependencyNamespace.BaseClass"" failed: + TypeDependencyNamespace.BaseClass is not Types that do not have full name "TypeDependencyNamespace.BaseClass" + + + +Query: Types that are "TypeDependencyNamespace.BaseClass" should be Types that do not have full name matching "^.*\.Base.*$" +Result: False +Description: TypeDependencyNamespace.BaseClass is not Types that do not have full name matching "^.*\.Base.*$" +Message: +"Types that are "TypeDependencyNamespace.BaseClass" should be Types that do not have full name matching "^.*\.Base.*$"" failed: + TypeDependencyNamespace.BaseClass is not Types that do not have full name matching "^.*\.Base.*$" + + + +Query: Types that are "TypeDependencyNamespace.BaseClass" should be Types that do not have name containing "BaseClass" +Result: False +Description: TypeDependencyNamespace.BaseClass is not Types that do not have name containing "BaseClass" +Message: +"Types that are "TypeDependencyNamespace.BaseClass" should be Types that do not have name containing "BaseClass"" failed: + TypeDependencyNamespace.BaseClass is not Types that do not have name containing "BaseClass" + + + +Query: Types that are "TypeDependencyNamespace.BaseClass" should be Types that do not have full name containing "TypeDependencyNamespace" +Result: False +Description: TypeDependencyNamespace.BaseClass is not Types that do not have full name containing "TypeDependencyNamespace" +Message: +"Types that are "TypeDependencyNamespace.BaseClass" should be Types that do not have full name containing "TypeDependencyNamespace"" failed: + TypeDependencyNamespace.BaseClass is not Types that do not have full name containing "TypeDependencyNamespace" + + + +Query: Types that are "TypeDependencyNamespace.BaseClass" should be Types that do not have name starting with "BaseClass" +Result: False +Description: TypeDependencyNamespace.BaseClass is not Types that do not have name starting with "BaseClass" +Message: +"Types that are "TypeDependencyNamespace.BaseClass" should be Types that do not have name starting with "BaseClass"" failed: + TypeDependencyNamespace.BaseClass is not Types that do not have name starting with "BaseClass" + + + +Query: Types that are "TypeDependencyNamespace.BaseClass" should be Types that do not have name ending with "BaseClass" +Result: False +Description: TypeDependencyNamespace.BaseClass is not Types that do not have name ending with "BaseClass" +Message: +"Types that are "TypeDependencyNamespace.BaseClass" should be Types that do not have name ending with "BaseClass"" failed: + TypeDependencyNamespace.BaseClass is not Types that do not have name ending with "BaseClass" + + + +----- Predicates as conditions ----- + +Query: Types that are "TypeDependencyNamespace.BaseClass" should be types that do not have name "BaseClass" +Result: False +Description: TypeDependencyNamespace.BaseClass is not "TypeDependencyNamespace.ChildClass" or "TypeDependencyNamespace.OtherChildClass" or "TypeDependencyNamespace.BaseClassWithMember" or "TypeDependencyNamespace.ChildClassWithMember" or "TypeDependencyNamespace.OtherChildClassWithMember" or "TypeDependencyNamespace.BaseClassWithMultipleDependencies" or "TypeDependencyNamespace.ChildClass1" or "TypeDependencyNamespace.ChildClass2" or "TypeDependencyNamespace.OtherBaseClass" or "TypeDependencyNamespace.ClassWithMultipleDependencies" or "TypeDependencyNamespace.GenericBaseClass`1" or "TypeDependencyNamespace.ChildClassOfGeneric" or "TypeDependencyNamespace.ClassWithoutDependencies" or "TypeDependencyNamespace.OtherClassWithoutDependencies" or "TypeDependencyNamespace.Issue351" or "MethodDependencyNamespace.MethodDependencyClass" or "System.Object" or "System.Void" or "System.String" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Int32" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" or "System.Collections.Generic.List`1" or "System.Func`2" or "System.IntPtr" or "System.Linq.Enumerable" or "System.Collections.Generic.IEnumerable`1" or "System.Linq.IGrouping`2" or "System.Collections.Generic.IReadOnlyCollection`1" or "System.Collections.Generic.Dictionary`2" +Message: +"Types that are "TypeDependencyNamespace.BaseClass" should be types that do not have name "BaseClass"" failed: + TypeDependencyNamespace.BaseClass is not "TypeDependencyNamespace.ChildClass" or "TypeDependencyNamespace.OtherChildClass" or "TypeDependencyNamespace.BaseClassWithMember" or "TypeDependencyNamespace.ChildClassWithMember" or "TypeDependencyNamespace.OtherChildClassWithMember" or "TypeDependencyNamespace.BaseClassWithMultipleDependencies" or "TypeDependencyNamespace.ChildClass1" or "TypeDependencyNamespace.ChildClass2" or "TypeDependencyNamespace.OtherBaseClass" or "TypeDependencyNamespace.ClassWithMultipleDependencies" or "TypeDependencyNamespace.GenericBaseClass`1" or "TypeDependencyNamespace.ChildClassOfGeneric" or "TypeDependencyNamespace.ClassWithoutDependencies" or "TypeDependencyNamespace.OtherClassWithoutDependencies" or "TypeDependencyNamespace.Issue351" or "MethodDependencyNamespace.MethodDependencyClass" or "System.Object" or "System.Void" or "System.String" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Int32" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" or "System.Collections.Generic.List`1" or "System.Func`2" or "System.IntPtr" or "System.Linq.Enumerable" or "System.Collections.Generic.IEnumerable`1" or "System.Linq.IGrouping`2" or "System.Collections.Generic.IReadOnlyCollection`1" or "System.Collections.Generic.Dictionary`2" + + + +Query: Types that are "TypeDependencyNamespace.BaseClass" should be types that do not have name matching "^Base.*$" +Result: False +Description: TypeDependencyNamespace.BaseClass is not "TypeDependencyNamespace.ChildClass" or "TypeDependencyNamespace.OtherChildClass" or "TypeDependencyNamespace.ChildClassWithMember" or "TypeDependencyNamespace.OtherChildClassWithMember" or "TypeDependencyNamespace.ChildClass1" or "TypeDependencyNamespace.ChildClass2" or "TypeDependencyNamespace.OtherBaseClass" or "TypeDependencyNamespace.ClassWithMultipleDependencies" or "TypeDependencyNamespace.GenericBaseClass`1" or "TypeDependencyNamespace.ChildClassOfGeneric" or "TypeDependencyNamespace.ClassWithoutDependencies" or "TypeDependencyNamespace.OtherClassWithoutDependencies" or "TypeDependencyNamespace.Issue351" or "MethodDependencyNamespace.MethodDependencyClass" or "System.Object" or "System.Void" or "System.String" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Int32" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" or "System.Collections.Generic.List`1" or "System.Func`2" or "System.IntPtr" or "System.Linq.Enumerable" or "System.Collections.Generic.IEnumerable`1" or "System.Linq.IGrouping`2" or "System.Collections.Generic.IReadOnlyCollection`1" or "System.Collections.Generic.Dictionary`2" +Message: +"Types that are "TypeDependencyNamespace.BaseClass" should be types that do not have name matching "^Base.*$"" failed: + TypeDependencyNamespace.BaseClass is not "TypeDependencyNamespace.ChildClass" or "TypeDependencyNamespace.OtherChildClass" or "TypeDependencyNamespace.ChildClassWithMember" or "TypeDependencyNamespace.OtherChildClassWithMember" or "TypeDependencyNamespace.ChildClass1" or "TypeDependencyNamespace.ChildClass2" or "TypeDependencyNamespace.OtherBaseClass" or "TypeDependencyNamespace.ClassWithMultipleDependencies" or "TypeDependencyNamespace.GenericBaseClass`1" or "TypeDependencyNamespace.ChildClassOfGeneric" or "TypeDependencyNamespace.ClassWithoutDependencies" or "TypeDependencyNamespace.OtherClassWithoutDependencies" or "TypeDependencyNamespace.Issue351" or "MethodDependencyNamespace.MethodDependencyClass" or "System.Object" or "System.Void" or "System.String" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Int32" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" or "System.Collections.Generic.List`1" or "System.Func`2" or "System.IntPtr" or "System.Linq.Enumerable" or "System.Collections.Generic.IEnumerable`1" or "System.Linq.IGrouping`2" or "System.Collections.Generic.IReadOnlyCollection`1" or "System.Collections.Generic.Dictionary`2" + + + +Query: Types that are "TypeDependencyNamespace.BaseClass" should be types that do not have full name "TypeDependencyNamespace.BaseClass" +Result: False +Description: TypeDependencyNamespace.BaseClass is not "TypeDependencyNamespace.ChildClass" or "TypeDependencyNamespace.OtherChildClass" or "TypeDependencyNamespace.BaseClassWithMember" or "TypeDependencyNamespace.ChildClassWithMember" or "TypeDependencyNamespace.OtherChildClassWithMember" or "TypeDependencyNamespace.BaseClassWithMultipleDependencies" or "TypeDependencyNamespace.ChildClass1" or "TypeDependencyNamespace.ChildClass2" or "TypeDependencyNamespace.OtherBaseClass" or "TypeDependencyNamespace.ClassWithMultipleDependencies" or "TypeDependencyNamespace.GenericBaseClass`1" or "TypeDependencyNamespace.ChildClassOfGeneric" or "TypeDependencyNamespace.ClassWithoutDependencies" or "TypeDependencyNamespace.OtherClassWithoutDependencies" or "TypeDependencyNamespace.Issue351" or "MethodDependencyNamespace.MethodDependencyClass" or "System.Object" or "System.Void" or "System.String" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Int32" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" or "System.Collections.Generic.List`1" or "System.Func`2" or "System.IntPtr" or "System.Linq.Enumerable" or "System.Collections.Generic.IEnumerable`1" or "System.Linq.IGrouping`2" or "System.Collections.Generic.IReadOnlyCollection`1" or "System.Collections.Generic.Dictionary`2" +Message: +"Types that are "TypeDependencyNamespace.BaseClass" should be types that do not have full name "TypeDependencyNamespace.BaseClass"" failed: + TypeDependencyNamespace.BaseClass is not "TypeDependencyNamespace.ChildClass" or "TypeDependencyNamespace.OtherChildClass" or "TypeDependencyNamespace.BaseClassWithMember" or "TypeDependencyNamespace.ChildClassWithMember" or "TypeDependencyNamespace.OtherChildClassWithMember" or "TypeDependencyNamespace.BaseClassWithMultipleDependencies" or "TypeDependencyNamespace.ChildClass1" or "TypeDependencyNamespace.ChildClass2" or "TypeDependencyNamespace.OtherBaseClass" or "TypeDependencyNamespace.ClassWithMultipleDependencies" or "TypeDependencyNamespace.GenericBaseClass`1" or "TypeDependencyNamespace.ChildClassOfGeneric" or "TypeDependencyNamespace.ClassWithoutDependencies" or "TypeDependencyNamespace.OtherClassWithoutDependencies" or "TypeDependencyNamespace.Issue351" or "MethodDependencyNamespace.MethodDependencyClass" or "System.Object" or "System.Void" or "System.String" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Int32" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" or "System.Collections.Generic.List`1" or "System.Func`2" or "System.IntPtr" or "System.Linq.Enumerable" or "System.Collections.Generic.IEnumerable`1" or "System.Linq.IGrouping`2" or "System.Collections.Generic.IReadOnlyCollection`1" or "System.Collections.Generic.Dictionary`2" + + + +Query: Types that are "TypeDependencyNamespace.BaseClass" should be types that do not have full name matching "^.*\.Base.*$" +Result: False +Description: TypeDependencyNamespace.BaseClass is not "TypeDependencyNamespace.ChildClass" or "TypeDependencyNamespace.OtherChildClass" or "TypeDependencyNamespace.ChildClassWithMember" or "TypeDependencyNamespace.OtherChildClassWithMember" or "TypeDependencyNamespace.ChildClass1" or "TypeDependencyNamespace.ChildClass2" or "TypeDependencyNamespace.OtherBaseClass" or "TypeDependencyNamespace.ClassWithMultipleDependencies" or "TypeDependencyNamespace.GenericBaseClass`1" or "TypeDependencyNamespace.ChildClassOfGeneric" or "TypeDependencyNamespace.ClassWithoutDependencies" or "TypeDependencyNamespace.OtherClassWithoutDependencies" or "TypeDependencyNamespace.Issue351" or "MethodDependencyNamespace.MethodDependencyClass" or "System.Object" or "System.Void" or "System.String" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Int32" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" or "System.Collections.Generic.List`1" or "System.Func`2" or "System.IntPtr" or "System.Linq.Enumerable" or "System.Collections.Generic.IEnumerable`1" or "System.Linq.IGrouping`2" or "System.Collections.Generic.IReadOnlyCollection`1" or "System.Collections.Generic.Dictionary`2" +Message: +"Types that are "TypeDependencyNamespace.BaseClass" should be types that do not have full name matching "^.*\.Base.*$"" failed: + TypeDependencyNamespace.BaseClass is not "TypeDependencyNamespace.ChildClass" or "TypeDependencyNamespace.OtherChildClass" or "TypeDependencyNamespace.ChildClassWithMember" or "TypeDependencyNamespace.OtherChildClassWithMember" or "TypeDependencyNamespace.ChildClass1" or "TypeDependencyNamespace.ChildClass2" or "TypeDependencyNamespace.OtherBaseClass" or "TypeDependencyNamespace.ClassWithMultipleDependencies" or "TypeDependencyNamespace.GenericBaseClass`1" or "TypeDependencyNamespace.ChildClassOfGeneric" or "TypeDependencyNamespace.ClassWithoutDependencies" or "TypeDependencyNamespace.OtherClassWithoutDependencies" or "TypeDependencyNamespace.Issue351" or "MethodDependencyNamespace.MethodDependencyClass" or "System.Object" or "System.Void" or "System.String" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Int32" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" or "System.Collections.Generic.List`1" or "System.Func`2" or "System.IntPtr" or "System.Linq.Enumerable" or "System.Collections.Generic.IEnumerable`1" or "System.Linq.IGrouping`2" or "System.Collections.Generic.IReadOnlyCollection`1" or "System.Collections.Generic.Dictionary`2" + + + +Query: Types that are "TypeDependencyNamespace.BaseClass" should be types that do not have name containing "BaseClass" +Result: False +Description: TypeDependencyNamespace.BaseClass is not "TypeDependencyNamespace.ChildClass" or "TypeDependencyNamespace.OtherChildClass" or "TypeDependencyNamespace.ChildClassWithMember" or "TypeDependencyNamespace.OtherChildClassWithMember" or "TypeDependencyNamespace.ChildClass1" or "TypeDependencyNamespace.ChildClass2" or "TypeDependencyNamespace.ClassWithMultipleDependencies" or "TypeDependencyNamespace.ChildClassOfGeneric" or "TypeDependencyNamespace.ClassWithoutDependencies" or "TypeDependencyNamespace.OtherClassWithoutDependencies" or "TypeDependencyNamespace.Issue351" or "MethodDependencyNamespace.MethodDependencyClass" or "System.Object" or "System.Void" or "System.String" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Int32" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" or "System.Collections.Generic.List`1" or "System.Func`2" or "System.IntPtr" or "System.Linq.Enumerable" or "System.Collections.Generic.IEnumerable`1" or "System.Linq.IGrouping`2" or "System.Collections.Generic.IReadOnlyCollection`1" or "System.Collections.Generic.Dictionary`2" +Message: +"Types that are "TypeDependencyNamespace.BaseClass" should be types that do not have name containing "BaseClass"" failed: + TypeDependencyNamespace.BaseClass is not "TypeDependencyNamespace.ChildClass" or "TypeDependencyNamespace.OtherChildClass" or "TypeDependencyNamespace.ChildClassWithMember" or "TypeDependencyNamespace.OtherChildClassWithMember" or "TypeDependencyNamespace.ChildClass1" or "TypeDependencyNamespace.ChildClass2" or "TypeDependencyNamespace.ClassWithMultipleDependencies" or "TypeDependencyNamespace.ChildClassOfGeneric" or "TypeDependencyNamespace.ClassWithoutDependencies" or "TypeDependencyNamespace.OtherClassWithoutDependencies" or "TypeDependencyNamespace.Issue351" or "MethodDependencyNamespace.MethodDependencyClass" or "System.Object" or "System.Void" or "System.String" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Int32" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" or "System.Collections.Generic.List`1" or "System.Func`2" or "System.IntPtr" or "System.Linq.Enumerable" or "System.Collections.Generic.IEnumerable`1" or "System.Linq.IGrouping`2" or "System.Collections.Generic.IReadOnlyCollection`1" or "System.Collections.Generic.Dictionary`2" + + + +Query: Types that are "TypeDependencyNamespace.BaseClass" should be types that do not have full name containing "TypeDependencyNamespace" +Result: False +Description: TypeDependencyNamespace.BaseClass is not "MethodDependencyNamespace.MethodDependencyClass" or "System.Object" or "System.Void" or "System.String" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Int32" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" or "System.Collections.Generic.List`1" or "System.Func`2" or "System.IntPtr" or "System.Linq.Enumerable" or "System.Collections.Generic.IEnumerable`1" or "System.Linq.IGrouping`2" or "System.Collections.Generic.IReadOnlyCollection`1" or "System.Collections.Generic.Dictionary`2" +Message: +"Types that are "TypeDependencyNamespace.BaseClass" should be types that do not have full name containing "TypeDependencyNamespace"" failed: + TypeDependencyNamespace.BaseClass is not "MethodDependencyNamespace.MethodDependencyClass" or "System.Object" or "System.Void" or "System.String" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Int32" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" or "System.Collections.Generic.List`1" or "System.Func`2" or "System.IntPtr" or "System.Linq.Enumerable" or "System.Collections.Generic.IEnumerable`1" or "System.Linq.IGrouping`2" or "System.Collections.Generic.IReadOnlyCollection`1" or "System.Collections.Generic.Dictionary`2" + + + +Query: Types that are "TypeDependencyNamespace.BaseClass" should be types that do not have name starting with "BaseClass" +Result: False +Description: TypeDependencyNamespace.BaseClass is not "TypeDependencyNamespace.ChildClass" or "TypeDependencyNamespace.OtherChildClass" or "TypeDependencyNamespace.ChildClassWithMember" or "TypeDependencyNamespace.OtherChildClassWithMember" or "TypeDependencyNamespace.ChildClass1" or "TypeDependencyNamespace.ChildClass2" or "TypeDependencyNamespace.OtherBaseClass" or "TypeDependencyNamespace.ClassWithMultipleDependencies" or "TypeDependencyNamespace.GenericBaseClass`1" or "TypeDependencyNamespace.ChildClassOfGeneric" or "TypeDependencyNamespace.ClassWithoutDependencies" or "TypeDependencyNamespace.OtherClassWithoutDependencies" or "TypeDependencyNamespace.Issue351" or "MethodDependencyNamespace.MethodDependencyClass" or "System.Object" or "System.Void" or "System.String" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Int32" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" or "System.Collections.Generic.List`1" or "System.Func`2" or "System.IntPtr" or "System.Linq.Enumerable" or "System.Collections.Generic.IEnumerable`1" or "System.Linq.IGrouping`2" or "System.Collections.Generic.IReadOnlyCollection`1" or "System.Collections.Generic.Dictionary`2" +Message: +"Types that are "TypeDependencyNamespace.BaseClass" should be types that do not have name starting with "BaseClass"" failed: + TypeDependencyNamespace.BaseClass is not "TypeDependencyNamespace.ChildClass" or "TypeDependencyNamespace.OtherChildClass" or "TypeDependencyNamespace.ChildClassWithMember" or "TypeDependencyNamespace.OtherChildClassWithMember" or "TypeDependencyNamespace.ChildClass1" or "TypeDependencyNamespace.ChildClass2" or "TypeDependencyNamespace.OtherBaseClass" or "TypeDependencyNamespace.ClassWithMultipleDependencies" or "TypeDependencyNamespace.GenericBaseClass`1" or "TypeDependencyNamespace.ChildClassOfGeneric" or "TypeDependencyNamespace.ClassWithoutDependencies" or "TypeDependencyNamespace.OtherClassWithoutDependencies" or "TypeDependencyNamespace.Issue351" or "MethodDependencyNamespace.MethodDependencyClass" or "System.Object" or "System.Void" or "System.String" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Int32" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" or "System.Collections.Generic.List`1" or "System.Func`2" or "System.IntPtr" or "System.Linq.Enumerable" or "System.Collections.Generic.IEnumerable`1" or "System.Linq.IGrouping`2" or "System.Collections.Generic.IReadOnlyCollection`1" or "System.Collections.Generic.Dictionary`2" + + + +Query: Types that are "TypeDependencyNamespace.BaseClass" should be types that do not have name ending with "BaseClass" +Result: False +Description: TypeDependencyNamespace.BaseClass is not "TypeDependencyNamespace.ChildClass" or "TypeDependencyNamespace.OtherChildClass" or "TypeDependencyNamespace.BaseClassWithMember" or "TypeDependencyNamespace.ChildClassWithMember" or "TypeDependencyNamespace.OtherChildClassWithMember" or "TypeDependencyNamespace.BaseClassWithMultipleDependencies" or "TypeDependencyNamespace.ChildClass1" or "TypeDependencyNamespace.ChildClass2" or "TypeDependencyNamespace.ClassWithMultipleDependencies" or "TypeDependencyNamespace.GenericBaseClass`1" or "TypeDependencyNamespace.ChildClassOfGeneric" or "TypeDependencyNamespace.ClassWithoutDependencies" or "TypeDependencyNamespace.OtherClassWithoutDependencies" or "TypeDependencyNamespace.Issue351" or "MethodDependencyNamespace.MethodDependencyClass" or "System.Object" or "System.Void" or "System.String" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Int32" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" or "System.Collections.Generic.List`1" or "System.Func`2" or "System.IntPtr" or "System.Linq.Enumerable" or "System.Collections.Generic.IEnumerable`1" or "System.Linq.IGrouping`2" or "System.Collections.Generic.IReadOnlyCollection`1" or "System.Collections.Generic.Dictionary`2" +Message: +"Types that are "TypeDependencyNamespace.BaseClass" should be types that do not have name ending with "BaseClass"" failed: + TypeDependencyNamespace.BaseClass is not "TypeDependencyNamespace.ChildClass" or "TypeDependencyNamespace.OtherChildClass" or "TypeDependencyNamespace.BaseClassWithMember" or "TypeDependencyNamespace.ChildClassWithMember" or "TypeDependencyNamespace.OtherChildClassWithMember" or "TypeDependencyNamespace.BaseClassWithMultipleDependencies" or "TypeDependencyNamespace.ChildClass1" or "TypeDependencyNamespace.ChildClass2" or "TypeDependencyNamespace.ClassWithMultipleDependencies" or "TypeDependencyNamespace.GenericBaseClass`1" or "TypeDependencyNamespace.ChildClassOfGeneric" or "TypeDependencyNamespace.ClassWithoutDependencies" or "TypeDependencyNamespace.OtherClassWithoutDependencies" or "TypeDependencyNamespace.Issue351" or "MethodDependencyNamespace.MethodDependencyClass" or "System.Object" or "System.Void" or "System.String" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Int32" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" or "System.Collections.Generic.List`1" or "System.Func`2" or "System.IntPtr" or "System.Linq.Enumerable" or "System.Collections.Generic.IEnumerable`1" or "System.Linq.IGrouping`2" or "System.Collections.Generic.IReadOnlyCollection`1" or "System.Collections.Generic.Dictionary`2" + + + diff --git a/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.OnlyDependOnTest.verified.txt b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.OnlyDependOnTest.verified.txt index 6792a5f00..46255f177 100644 --- a/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.OnlyDependOnTest.verified.txt +++ b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.OnlyDependOnTest.verified.txt @@ -1,5 +1,7 @@ ===== No violations ===== +----- Conditions ----- + Query: Types that are "TypeDependencyNamespace.ChildClass" should only depend on "TypeDependencyNamespace.BaseClass" Result: True Description: TypeDependencyNamespace.ChildClass passed @@ -30,8 +32,74 @@ Description: TypeDependencyNamespace.ChildClass passed Message: All Evaluations passed +----- Predicates ----- + +Query: Types that are "TypeDependencyNamespace.ChildClass" should be Types that only depend on "TypeDependencyNamespace.BaseClass" +Result: True +Description: TypeDependencyNamespace.ChildClass passed +Message: +All Evaluations passed + +Query: Types that are "TypeDependencyNamespace.ChildClass" should be Types that only depend on "TypeDependencyNamespace.BaseClass" +Result: True +Description: TypeDependencyNamespace.ChildClass passed +Message: +All Evaluations passed + +Query: Types that are "TypeDependencyNamespace.ChildClass" should be Types that only depend on Classes that are "TypeDependencyNamespace.BaseClass" +Result: True +Description: TypeDependencyNamespace.ChildClass passed +Message: +All Evaluations passed + +Query: Types that are "TypeDependencyNamespace.ChildClass" should be Types that only depend on "TypeDependencyNamespace.BaseClass" +Result: True +Description: TypeDependencyNamespace.ChildClass passed +Message: +All Evaluations passed + +Query: Types that are "TypeDependencyNamespace.ChildClass" should be Types that only depend on "TypeDependencyNamespace.BaseClass" +Result: True +Description: TypeDependencyNamespace.ChildClass passed +Message: +All Evaluations passed + +----- Predicates as conditions ----- + +Query: Types that are "TypeDependencyNamespace.ChildClass" should be types that only depend on "TypeDependencyNamespace.BaseClass" +Result: True +Description: TypeDependencyNamespace.ChildClass passed +Message: +All Evaluations passed + +Query: Types that are "TypeDependencyNamespace.ChildClass" should be types that only depend on "TypeDependencyNamespace.BaseClass" +Result: True +Description: TypeDependencyNamespace.ChildClass passed +Message: +All Evaluations passed + +Query: Types that are "TypeDependencyNamespace.ChildClass" should be types that only depend on Classes that are "TypeDependencyNamespace.BaseClass" +Result: True +Description: TypeDependencyNamespace.ChildClass passed +Message: +All Evaluations passed + +Query: Types that are "TypeDependencyNamespace.ChildClass" should be types that only depend on "TypeDependencyNamespace.BaseClass" +Result: True +Description: TypeDependencyNamespace.ChildClass passed +Message: +All Evaluations passed + +Query: Types that are "TypeDependencyNamespace.ChildClass" should be types that only depend on "TypeDependencyNamespace.BaseClass" +Result: True +Description: TypeDependencyNamespace.ChildClass passed +Message: +All Evaluations passed + ===== Violations ===== +----- Conditions ----- + Query: Types that are "TypeDependencyNamespace.ClassWithMultipleDependencies" should only depend on "TypeDependencyNamespace.BaseClass" Result: False Description: TypeDependencyNamespace.ClassWithMultipleDependencies does depend on System.Object and TypeDependencyNamespace.BaseClassWithMember and TypeDependencyNamespace.OtherBaseClass @@ -77,13 +145,86 @@ Message: +----- Predicates ----- + +Query: Types that are "TypeDependencyNamespace.ClassWithMultipleDependencies" should be Types that only depend on "TypeDependencyNamespace.BaseClass" +Result: False +Description: TypeDependencyNamespace.ClassWithMultipleDependencies is not Types that only depend on "TypeDependencyNamespace.BaseClass" +Message: +"Types that are "TypeDependencyNamespace.ClassWithMultipleDependencies" should be Types that only depend on "TypeDependencyNamespace.BaseClass"" failed: + TypeDependencyNamespace.ClassWithMultipleDependencies is not Types that only depend on "TypeDependencyNamespace.BaseClass" + + + +Query: Types that are "TypeDependencyNamespace.ClassWithMultipleDependencies" should be Types that only depend on "TypeDependencyNamespace.BaseClass" +Result: False +Description: TypeDependencyNamespace.ClassWithMultipleDependencies is not Types that only depend on "TypeDependencyNamespace.BaseClass" +Message: +"Types that are "TypeDependencyNamespace.ClassWithMultipleDependencies" should be Types that only depend on "TypeDependencyNamespace.BaseClass"" failed: + TypeDependencyNamespace.ClassWithMultipleDependencies is not Types that only depend on "TypeDependencyNamespace.BaseClass" + + + +Query: Types that are "TypeDependencyNamespace.ClassWithMultipleDependencies" should be Types that only depend on Classes that are "TypeDependencyNamespace.BaseClass" +Result: False +Description: TypeDependencyNamespace.ClassWithMultipleDependencies is not Types that only depend on Classes that are "TypeDependencyNamespace.BaseClass" +Message: +"Types that are "TypeDependencyNamespace.ClassWithMultipleDependencies" should be Types that only depend on Classes that are "TypeDependencyNamespace.BaseClass"" failed: + TypeDependencyNamespace.ClassWithMultipleDependencies is not Types that only depend on Classes that are "TypeDependencyNamespace.BaseClass" + + + +Query: Types that are "TypeDependencyNamespace.ClassWithMultipleDependencies" should be Types that only depend on "TypeDependencyNamespace.BaseClass" +Result: False +Description: TypeDependencyNamespace.ClassWithMultipleDependencies is not Types that only depend on "TypeDependencyNamespace.BaseClass" +Message: +"Types that are "TypeDependencyNamespace.ClassWithMultipleDependencies" should be Types that only depend on "TypeDependencyNamespace.BaseClass"" failed: + TypeDependencyNamespace.ClassWithMultipleDependencies is not Types that only depend on "TypeDependencyNamespace.BaseClass" + + + +Query: Types that are "TypeDependencyNamespace.ClassWithMultipleDependencies" should be Types that only depend on "TypeDependencyNamespace.BaseClass" +Result: False +Description: TypeDependencyNamespace.ClassWithMultipleDependencies is not Types that only depend on "TypeDependencyNamespace.BaseClass" +Message: +"Types that are "TypeDependencyNamespace.ClassWithMultipleDependencies" should be Types that only depend on "TypeDependencyNamespace.BaseClass"" failed: + TypeDependencyNamespace.ClassWithMultipleDependencies is not Types that only depend on "TypeDependencyNamespace.BaseClass" + + + ===== Type outside of architecture ===== +----- Conditions ----- + Query: Types that are "TypeDependencyNamespace.ClassWithMultipleDependencies" should only depend on "AttributeNamespace.ClassWithoutAttributes" Exception: Type AttributeNamespace.ClassWithoutAttributes does not exist in provided architecture or is no class. +----- Predicates ----- + +Query: Types that are "TypeDependencyNamespace.ClassWithMultipleDependencies" should be Types that only depend on "AttributeNamespace.ClassWithoutAttributes" +Result: False +Description: TypeDependencyNamespace.ClassWithMultipleDependencies is not Types that only depend on "AttributeNamespace.ClassWithoutAttributes" +Message: +"Types that are "TypeDependencyNamespace.ClassWithMultipleDependencies" should be Types that only depend on "AttributeNamespace.ClassWithoutAttributes"" failed: + TypeDependencyNamespace.ClassWithMultipleDependencies is not Types that only depend on "AttributeNamespace.ClassWithoutAttributes" + + + +----- Predicates as conditions ----- + +Query: Types that are "TypeDependencyNamespace.ClassWithMultipleDependencies" should be types that only depend on "AttributeNamespace.ClassWithoutAttributes" +Result: False +Description: TypeDependencyNamespace.ClassWithMultipleDependencies is not "TypeDependencyNamespace.BaseClass" or "TypeDependencyNamespace.BaseClassWithMember" or "TypeDependencyNamespace.BaseClassWithMultipleDependencies" or "TypeDependencyNamespace.OtherBaseClass" or "TypeDependencyNamespace.GenericBaseClass`1" or "TypeDependencyNamespace.ClassWithoutDependencies" or "TypeDependencyNamespace.OtherClassWithoutDependencies" or "TypeDependencyNamespace.Issue351" or "System.Object" or "System.Void" or "System.String" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Int32" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" or "System.Collections.Generic.List`1" or "System.Func`2" or "System.IntPtr" or "System.Linq.Enumerable" or "System.Collections.Generic.IEnumerable`1" or "System.Linq.IGrouping`2" or "System.Collections.Generic.IReadOnlyCollection`1" or "System.Collections.Generic.Dictionary`2" +Message: +"Types that are "TypeDependencyNamespace.ClassWithMultipleDependencies" should be types that only depend on "AttributeNamespace.ClassWithoutAttributes"" failed: + TypeDependencyNamespace.ClassWithMultipleDependencies is not "TypeDependencyNamespace.BaseClass" or "TypeDependencyNamespace.BaseClassWithMember" or "TypeDependencyNamespace.BaseClassWithMultipleDependencies" or "TypeDependencyNamespace.OtherBaseClass" or "TypeDependencyNamespace.GenericBaseClass`1" or "TypeDependencyNamespace.ClassWithoutDependencies" or "TypeDependencyNamespace.OtherClassWithoutDependencies" or "TypeDependencyNamespace.Issue351" or "System.Object" or "System.Void" or "System.String" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Int32" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" or "System.Collections.Generic.List`1" or "System.Func`2" or "System.IntPtr" or "System.Linq.Enumerable" or "System.Collections.Generic.IEnumerable`1" or "System.Linq.IGrouping`2" or "System.Collections.Generic.IReadOnlyCollection`1" or "System.Collections.Generic.Dictionary`2" + + + ===== Empty arguments ===== +----- Conditions ----- + Query: Types that are "TypeDependencyNamespace.ClassWithMultipleDependencies" should have no dependencies Result: False Description: TypeDependencyNamespace.ClassWithMultipleDependencies does depend on System.Object and TypeDependencyNamespace.BaseClassWithMember and TypeDependencyNamespace.OtherBaseClass @@ -111,8 +252,68 @@ Message: +----- Predicates ----- + +Query: Types that are "TypeDependencyNamespace.ClassWithMultipleDependencies" should be Types that have no dependencies +Result: False +Description: TypeDependencyNamespace.ClassWithMultipleDependencies is not Types that have no dependencies +Message: +"Types that are "TypeDependencyNamespace.ClassWithMultipleDependencies" should be Types that have no dependencies" failed: + TypeDependencyNamespace.ClassWithMultipleDependencies is not Types that have no dependencies + + + +Query: Types that are "TypeDependencyNamespace.ClassWithMultipleDependencies" should be Types that have no dependencies +Result: False +Description: TypeDependencyNamespace.ClassWithMultipleDependencies is not Types that have no dependencies +Message: +"Types that are "TypeDependencyNamespace.ClassWithMultipleDependencies" should be Types that have no dependencies" failed: + TypeDependencyNamespace.ClassWithMultipleDependencies is not Types that have no dependencies + + + +Query: Types that are "TypeDependencyNamespace.ClassWithMultipleDependencies" should be Types that only depend on Classes that have full name "NotTheNameOfAnyObject" +Result: False +Description: TypeDependencyNamespace.ClassWithMultipleDependencies is not Types that only depend on Classes that have full name "NotTheNameOfAnyObject" +Message: +"Types that are "TypeDependencyNamespace.ClassWithMultipleDependencies" should be Types that only depend on Classes that have full name "NotTheNameOfAnyObject"" failed: + TypeDependencyNamespace.ClassWithMultipleDependencies is not Types that only depend on Classes that have full name "NotTheNameOfAnyObject" + + + +----- Predicates as conditions ----- + +Query: Types that are "TypeDependencyNamespace.ClassWithMultipleDependencies" should be types that have no dependencies +Result: False +Description: TypeDependencyNamespace.ClassWithMultipleDependencies is not "TypeDependencyNamespace.BaseClass" or "TypeDependencyNamespace.BaseClassWithMember" or "TypeDependencyNamespace.BaseClassWithMultipleDependencies" or "TypeDependencyNamespace.OtherBaseClass" or "TypeDependencyNamespace.GenericBaseClass`1" or "TypeDependencyNamespace.ClassWithoutDependencies" or "TypeDependencyNamespace.OtherClassWithoutDependencies" or "TypeDependencyNamespace.Issue351" or "System.Object" or "System.Void" or "System.String" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Int32" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" or "System.Collections.Generic.List`1" or "System.Func`2" or "System.IntPtr" or "System.Linq.Enumerable" or "System.Collections.Generic.IEnumerable`1" or "System.Linq.IGrouping`2" or "System.Collections.Generic.IReadOnlyCollection`1" or "System.Collections.Generic.Dictionary`2" +Message: +"Types that are "TypeDependencyNamespace.ClassWithMultipleDependencies" should be types that have no dependencies" failed: + TypeDependencyNamespace.ClassWithMultipleDependencies is not "TypeDependencyNamespace.BaseClass" or "TypeDependencyNamespace.BaseClassWithMember" or "TypeDependencyNamespace.BaseClassWithMultipleDependencies" or "TypeDependencyNamespace.OtherBaseClass" or "TypeDependencyNamespace.GenericBaseClass`1" or "TypeDependencyNamespace.ClassWithoutDependencies" or "TypeDependencyNamespace.OtherClassWithoutDependencies" or "TypeDependencyNamespace.Issue351" or "System.Object" or "System.Void" or "System.String" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Int32" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" or "System.Collections.Generic.List`1" or "System.Func`2" or "System.IntPtr" or "System.Linq.Enumerable" or "System.Collections.Generic.IEnumerable`1" or "System.Linq.IGrouping`2" or "System.Collections.Generic.IReadOnlyCollection`1" or "System.Collections.Generic.Dictionary`2" + + + +Query: Types that are "TypeDependencyNamespace.ClassWithMultipleDependencies" should be types that have no dependencies +Result: False +Description: TypeDependencyNamespace.ClassWithMultipleDependencies is not "TypeDependencyNamespace.BaseClass" or "TypeDependencyNamespace.BaseClassWithMember" or "TypeDependencyNamespace.BaseClassWithMultipleDependencies" or "TypeDependencyNamespace.OtherBaseClass" or "TypeDependencyNamespace.GenericBaseClass`1" or "TypeDependencyNamespace.ClassWithoutDependencies" or "TypeDependencyNamespace.OtherClassWithoutDependencies" or "TypeDependencyNamespace.Issue351" or "System.Object" or "System.Void" or "System.String" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Int32" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" or "System.Collections.Generic.List`1" or "System.Func`2" or "System.IntPtr" or "System.Linq.Enumerable" or "System.Collections.Generic.IEnumerable`1" or "System.Linq.IGrouping`2" or "System.Collections.Generic.IReadOnlyCollection`1" or "System.Collections.Generic.Dictionary`2" +Message: +"Types that are "TypeDependencyNamespace.ClassWithMultipleDependencies" should be types that have no dependencies" failed: + TypeDependencyNamespace.ClassWithMultipleDependencies is not "TypeDependencyNamespace.BaseClass" or "TypeDependencyNamespace.BaseClassWithMember" or "TypeDependencyNamespace.BaseClassWithMultipleDependencies" or "TypeDependencyNamespace.OtherBaseClass" or "TypeDependencyNamespace.GenericBaseClass`1" or "TypeDependencyNamespace.ClassWithoutDependencies" or "TypeDependencyNamespace.OtherClassWithoutDependencies" or "TypeDependencyNamespace.Issue351" or "System.Object" or "System.Void" or "System.String" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Int32" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" or "System.Collections.Generic.List`1" or "System.Func`2" or "System.IntPtr" or "System.Linq.Enumerable" or "System.Collections.Generic.IEnumerable`1" or "System.Linq.IGrouping`2" or "System.Collections.Generic.IReadOnlyCollection`1" or "System.Collections.Generic.Dictionary`2" + + + +Query: Types that are "TypeDependencyNamespace.ClassWithMultipleDependencies" should be types that only depend on Classes that have full name "NotTheNameOfAnyObject" +Result: False +Description: TypeDependencyNamespace.ClassWithMultipleDependencies is not "TypeDependencyNamespace.BaseClass" or "TypeDependencyNamespace.BaseClassWithMember" or "TypeDependencyNamespace.BaseClassWithMultipleDependencies" or "TypeDependencyNamespace.OtherBaseClass" or "TypeDependencyNamespace.GenericBaseClass`1" or "TypeDependencyNamespace.ClassWithoutDependencies" or "TypeDependencyNamespace.OtherClassWithoutDependencies" or "TypeDependencyNamespace.Issue351" or "System.Object" or "System.Void" or "System.String" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Int32" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" or "System.Collections.Generic.List`1" or "System.Func`2" or "System.IntPtr" or "System.Linq.Enumerable" or "System.Collections.Generic.IEnumerable`1" or "System.Linq.IGrouping`2" or "System.Collections.Generic.IReadOnlyCollection`1" or "System.Collections.Generic.Dictionary`2" +Message: +"Types that are "TypeDependencyNamespace.ClassWithMultipleDependencies" should be types that only depend on Classes that have full name "NotTheNameOfAnyObject"" failed: + TypeDependencyNamespace.ClassWithMultipleDependencies is not "TypeDependencyNamespace.BaseClass" or "TypeDependencyNamespace.BaseClassWithMember" or "TypeDependencyNamespace.BaseClassWithMultipleDependencies" or "TypeDependencyNamespace.OtherBaseClass" or "TypeDependencyNamespace.GenericBaseClass`1" or "TypeDependencyNamespace.ClassWithoutDependencies" or "TypeDependencyNamespace.OtherClassWithoutDependencies" or "TypeDependencyNamespace.Issue351" or "System.Object" or "System.Void" or "System.String" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Int32" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" or "System.Collections.Generic.List`1" or "System.Func`2" or "System.IntPtr" or "System.Linq.Enumerable" or "System.Collections.Generic.IEnumerable`1" or "System.Linq.IGrouping`2" or "System.Collections.Generic.IReadOnlyCollection`1" or "System.Collections.Generic.Dictionary`2" + + + ===== Multiple arguments ===== +----- Conditions ----- + Query: Types that are "TypeDependencyNamespace.ClassWithMultipleDependencies" should only depend on "TypeDependencyNamespace.BaseClass" or "TypeDependencyNamespace.OtherBaseClass" Result: False Description: TypeDependencyNamespace.ClassWithMultipleDependencies does depend on System.Object and TypeDependencyNamespace.BaseClassWithMember @@ -158,3 +359,97 @@ Message: +----- Predicates ----- + +Query: Types that are "TypeDependencyNamespace.ClassWithMultipleDependencies" should be Types that only depend on "TypeDependencyNamespace.BaseClass" or "TypeDependencyNamespace.OtherBaseClass" +Result: False +Description: TypeDependencyNamespace.ClassWithMultipleDependencies is not Types that only depend on "TypeDependencyNamespace.BaseClass" or "TypeDependencyNamespace.OtherBaseClass" +Message: +"Types that are "TypeDependencyNamespace.ClassWithMultipleDependencies" should be Types that only depend on "TypeDependencyNamespace.BaseClass" or "TypeDependencyNamespace.OtherBaseClass"" failed: + TypeDependencyNamespace.ClassWithMultipleDependencies is not Types that only depend on "TypeDependencyNamespace.BaseClass" or "TypeDependencyNamespace.OtherBaseClass" + + + +Query: Types that are "TypeDependencyNamespace.ClassWithMultipleDependencies" should be Types that only depend on "TypeDependencyNamespace.BaseClass" or "TypeDependencyNamespace.OtherBaseClass" +Result: False +Description: TypeDependencyNamespace.ClassWithMultipleDependencies is not Types that only depend on "TypeDependencyNamespace.BaseClass" or "TypeDependencyNamespace.OtherBaseClass" +Message: +"Types that are "TypeDependencyNamespace.ClassWithMultipleDependencies" should be Types that only depend on "TypeDependencyNamespace.BaseClass" or "TypeDependencyNamespace.OtherBaseClass"" failed: + TypeDependencyNamespace.ClassWithMultipleDependencies is not Types that only depend on "TypeDependencyNamespace.BaseClass" or "TypeDependencyNamespace.OtherBaseClass" + + + +Query: Types that are "TypeDependencyNamespace.ClassWithMultipleDependencies" should be Types that only depend on "TypeDependencyNamespace.BaseClass" or "TypeDependencyNamespace.OtherBaseClass" +Result: False +Description: TypeDependencyNamespace.ClassWithMultipleDependencies is not Types that only depend on "TypeDependencyNamespace.BaseClass" or "TypeDependencyNamespace.OtherBaseClass" +Message: +"Types that are "TypeDependencyNamespace.ClassWithMultipleDependencies" should be Types that only depend on "TypeDependencyNamespace.BaseClass" or "TypeDependencyNamespace.OtherBaseClass"" failed: + TypeDependencyNamespace.ClassWithMultipleDependencies is not Types that only depend on "TypeDependencyNamespace.BaseClass" or "TypeDependencyNamespace.OtherBaseClass" + + + +Query: Types that are "TypeDependencyNamespace.ClassWithMultipleDependencies" should be Types that only depend on "TypeDependencyNamespace.BaseClass" or "TypeDependencyNamespace.OtherBaseClass" +Result: False +Description: TypeDependencyNamespace.ClassWithMultipleDependencies is not Types that only depend on "TypeDependencyNamespace.BaseClass" or "TypeDependencyNamespace.OtherBaseClass" +Message: +"Types that are "TypeDependencyNamespace.ClassWithMultipleDependencies" should be Types that only depend on "TypeDependencyNamespace.BaseClass" or "TypeDependencyNamespace.OtherBaseClass"" failed: + TypeDependencyNamespace.ClassWithMultipleDependencies is not Types that only depend on "TypeDependencyNamespace.BaseClass" or "TypeDependencyNamespace.OtherBaseClass" + + + +Query: Types that are "TypeDependencyNamespace.ClassWithMultipleDependencies" should be Types that only depend on Classes that are "TypeDependencyNamespace.BaseClass" or "TypeDependencyNamespace.OtherBaseClass" +Result: False +Description: TypeDependencyNamespace.ClassWithMultipleDependencies is not Types that only depend on Classes that are "TypeDependencyNamespace.BaseClass" or "TypeDependencyNamespace.OtherBaseClass" +Message: +"Types that are "TypeDependencyNamespace.ClassWithMultipleDependencies" should be Types that only depend on Classes that are "TypeDependencyNamespace.BaseClass" or "TypeDependencyNamespace.OtherBaseClass"" failed: + TypeDependencyNamespace.ClassWithMultipleDependencies is not Types that only depend on Classes that are "TypeDependencyNamespace.BaseClass" or "TypeDependencyNamespace.OtherBaseClass" + + + +----- Predicates as conditions ----- + +Query: Types that are "TypeDependencyNamespace.ClassWithMultipleDependencies" should be types that only depend on "TypeDependencyNamespace.BaseClass" or "TypeDependencyNamespace.OtherBaseClass" +Result: False +Description: TypeDependencyNamespace.ClassWithMultipleDependencies is not "TypeDependencyNamespace.BaseClass" or "TypeDependencyNamespace.ChildClass" or "TypeDependencyNamespace.OtherChildClass" or "TypeDependencyNamespace.BaseClassWithMember" or "TypeDependencyNamespace.BaseClassWithMultipleDependencies" or "TypeDependencyNamespace.OtherBaseClass" or "TypeDependencyNamespace.GenericBaseClass`1" or "TypeDependencyNamespace.ClassWithoutDependencies" or "TypeDependencyNamespace.OtherClassWithoutDependencies" or "TypeDependencyNamespace.Issue351" or "System.Object" or "System.Void" or "System.String" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Int32" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" or "System.Collections.Generic.List`1" or "System.Func`2" or "System.IntPtr" or "System.Linq.Enumerable" or "System.Collections.Generic.IEnumerable`1" or "System.Linq.IGrouping`2" or "System.Collections.Generic.IReadOnlyCollection`1" or "System.Collections.Generic.Dictionary`2" +Message: +"Types that are "TypeDependencyNamespace.ClassWithMultipleDependencies" should be types that only depend on "TypeDependencyNamespace.BaseClass" or "TypeDependencyNamespace.OtherBaseClass"" failed: + TypeDependencyNamespace.ClassWithMultipleDependencies is not "TypeDependencyNamespace.BaseClass" or "TypeDependencyNamespace.ChildClass" or "TypeDependencyNamespace.OtherChildClass" or "TypeDependencyNamespace.BaseClassWithMember" or "TypeDependencyNamespace.BaseClassWithMultipleDependencies" or "TypeDependencyNamespace.OtherBaseClass" or "TypeDependencyNamespace.GenericBaseClass`1" or "TypeDependencyNamespace.ClassWithoutDependencies" or "TypeDependencyNamespace.OtherClassWithoutDependencies" or "TypeDependencyNamespace.Issue351" or "System.Object" or "System.Void" or "System.String" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Int32" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" or "System.Collections.Generic.List`1" or "System.Func`2" or "System.IntPtr" or "System.Linq.Enumerable" or "System.Collections.Generic.IEnumerable`1" or "System.Linq.IGrouping`2" or "System.Collections.Generic.IReadOnlyCollection`1" or "System.Collections.Generic.Dictionary`2" + + + +Query: Types that are "TypeDependencyNamespace.ClassWithMultipleDependencies" should be types that only depend on "TypeDependencyNamespace.BaseClass" or "TypeDependencyNamespace.OtherBaseClass" +Result: False +Description: TypeDependencyNamespace.ClassWithMultipleDependencies is not "TypeDependencyNamespace.BaseClass" or "TypeDependencyNamespace.ChildClass" or "TypeDependencyNamespace.OtherChildClass" or "TypeDependencyNamespace.BaseClassWithMember" or "TypeDependencyNamespace.BaseClassWithMultipleDependencies" or "TypeDependencyNamespace.OtherBaseClass" or "TypeDependencyNamespace.GenericBaseClass`1" or "TypeDependencyNamespace.ClassWithoutDependencies" or "TypeDependencyNamespace.OtherClassWithoutDependencies" or "TypeDependencyNamespace.Issue351" or "System.Object" or "System.Void" or "System.String" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Int32" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" or "System.Collections.Generic.List`1" or "System.Func`2" or "System.IntPtr" or "System.Linq.Enumerable" or "System.Collections.Generic.IEnumerable`1" or "System.Linq.IGrouping`2" or "System.Collections.Generic.IReadOnlyCollection`1" or "System.Collections.Generic.Dictionary`2" +Message: +"Types that are "TypeDependencyNamespace.ClassWithMultipleDependencies" should be types that only depend on "TypeDependencyNamespace.BaseClass" or "TypeDependencyNamespace.OtherBaseClass"" failed: + TypeDependencyNamespace.ClassWithMultipleDependencies is not "TypeDependencyNamespace.BaseClass" or "TypeDependencyNamespace.ChildClass" or "TypeDependencyNamespace.OtherChildClass" or "TypeDependencyNamespace.BaseClassWithMember" or "TypeDependencyNamespace.BaseClassWithMultipleDependencies" or "TypeDependencyNamespace.OtherBaseClass" or "TypeDependencyNamespace.GenericBaseClass`1" or "TypeDependencyNamespace.ClassWithoutDependencies" or "TypeDependencyNamespace.OtherClassWithoutDependencies" or "TypeDependencyNamespace.Issue351" or "System.Object" or "System.Void" or "System.String" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Int32" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" or "System.Collections.Generic.List`1" or "System.Func`2" or "System.IntPtr" or "System.Linq.Enumerable" or "System.Collections.Generic.IEnumerable`1" or "System.Linq.IGrouping`2" or "System.Collections.Generic.IReadOnlyCollection`1" or "System.Collections.Generic.Dictionary`2" + + + +Query: Types that are "TypeDependencyNamespace.ClassWithMultipleDependencies" should be types that only depend on "TypeDependencyNamespace.BaseClass" or "TypeDependencyNamespace.OtherBaseClass" +Result: False +Description: TypeDependencyNamespace.ClassWithMultipleDependencies is not "TypeDependencyNamespace.BaseClass" or "TypeDependencyNamespace.ChildClass" or "TypeDependencyNamespace.OtherChildClass" or "TypeDependencyNamespace.BaseClassWithMember" or "TypeDependencyNamespace.BaseClassWithMultipleDependencies" or "TypeDependencyNamespace.OtherBaseClass" or "TypeDependencyNamespace.GenericBaseClass`1" or "TypeDependencyNamespace.ClassWithoutDependencies" or "TypeDependencyNamespace.OtherClassWithoutDependencies" or "TypeDependencyNamespace.Issue351" or "System.Object" or "System.Void" or "System.String" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Int32" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" or "System.Collections.Generic.List`1" or "System.Func`2" or "System.IntPtr" or "System.Linq.Enumerable" or "System.Collections.Generic.IEnumerable`1" or "System.Linq.IGrouping`2" or "System.Collections.Generic.IReadOnlyCollection`1" or "System.Collections.Generic.Dictionary`2" +Message: +"Types that are "TypeDependencyNamespace.ClassWithMultipleDependencies" should be types that only depend on "TypeDependencyNamespace.BaseClass" or "TypeDependencyNamespace.OtherBaseClass"" failed: + TypeDependencyNamespace.ClassWithMultipleDependencies is not "TypeDependencyNamespace.BaseClass" or "TypeDependencyNamespace.ChildClass" or "TypeDependencyNamespace.OtherChildClass" or "TypeDependencyNamespace.BaseClassWithMember" or "TypeDependencyNamespace.BaseClassWithMultipleDependencies" or "TypeDependencyNamespace.OtherBaseClass" or "TypeDependencyNamespace.GenericBaseClass`1" or "TypeDependencyNamespace.ClassWithoutDependencies" or "TypeDependencyNamespace.OtherClassWithoutDependencies" or "TypeDependencyNamespace.Issue351" or "System.Object" or "System.Void" or "System.String" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Int32" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" or "System.Collections.Generic.List`1" or "System.Func`2" or "System.IntPtr" or "System.Linq.Enumerable" or "System.Collections.Generic.IEnumerable`1" or "System.Linq.IGrouping`2" or "System.Collections.Generic.IReadOnlyCollection`1" or "System.Collections.Generic.Dictionary`2" + + + +Query: Types that are "TypeDependencyNamespace.ClassWithMultipleDependencies" should be types that only depend on "TypeDependencyNamespace.BaseClass" or "TypeDependencyNamespace.OtherBaseClass" +Result: False +Description: TypeDependencyNamespace.ClassWithMultipleDependencies is not "TypeDependencyNamespace.BaseClass" or "TypeDependencyNamespace.ChildClass" or "TypeDependencyNamespace.OtherChildClass" or "TypeDependencyNamespace.BaseClassWithMember" or "TypeDependencyNamespace.BaseClassWithMultipleDependencies" or "TypeDependencyNamespace.OtherBaseClass" or "TypeDependencyNamespace.GenericBaseClass`1" or "TypeDependencyNamespace.ClassWithoutDependencies" or "TypeDependencyNamespace.OtherClassWithoutDependencies" or "TypeDependencyNamespace.Issue351" or "System.Object" or "System.Void" or "System.String" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Int32" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" or "System.Collections.Generic.List`1" or "System.Func`2" or "System.IntPtr" or "System.Linq.Enumerable" or "System.Collections.Generic.IEnumerable`1" or "System.Linq.IGrouping`2" or "System.Collections.Generic.IReadOnlyCollection`1" or "System.Collections.Generic.Dictionary`2" +Message: +"Types that are "TypeDependencyNamespace.ClassWithMultipleDependencies" should be types that only depend on "TypeDependencyNamespace.BaseClass" or "TypeDependencyNamespace.OtherBaseClass"" failed: + TypeDependencyNamespace.ClassWithMultipleDependencies is not "TypeDependencyNamespace.BaseClass" or "TypeDependencyNamespace.ChildClass" or "TypeDependencyNamespace.OtherChildClass" or "TypeDependencyNamespace.BaseClassWithMember" or "TypeDependencyNamespace.BaseClassWithMultipleDependencies" or "TypeDependencyNamespace.OtherBaseClass" or "TypeDependencyNamespace.GenericBaseClass`1" or "TypeDependencyNamespace.ClassWithoutDependencies" or "TypeDependencyNamespace.OtherClassWithoutDependencies" or "TypeDependencyNamespace.Issue351" or "System.Object" or "System.Void" or "System.String" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Int32" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" or "System.Collections.Generic.List`1" or "System.Func`2" or "System.IntPtr" or "System.Linq.Enumerable" or "System.Collections.Generic.IEnumerable`1" or "System.Linq.IGrouping`2" or "System.Collections.Generic.IReadOnlyCollection`1" or "System.Collections.Generic.Dictionary`2" + + + +Query: Types that are "TypeDependencyNamespace.ClassWithMultipleDependencies" should be types that only depend on Classes that are "TypeDependencyNamespace.BaseClass" or "TypeDependencyNamespace.OtherBaseClass" +Result: False +Description: TypeDependencyNamespace.ClassWithMultipleDependencies is not "TypeDependencyNamespace.BaseClass" or "TypeDependencyNamespace.ChildClass" or "TypeDependencyNamespace.OtherChildClass" or "TypeDependencyNamespace.BaseClassWithMember" or "TypeDependencyNamespace.BaseClassWithMultipleDependencies" or "TypeDependencyNamespace.OtherBaseClass" or "TypeDependencyNamespace.GenericBaseClass`1" or "TypeDependencyNamespace.ClassWithoutDependencies" or "TypeDependencyNamespace.OtherClassWithoutDependencies" or "TypeDependencyNamespace.Issue351" or "System.Object" or "System.Void" or "System.String" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Int32" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" or "System.Collections.Generic.List`1" or "System.Func`2" or "System.IntPtr" or "System.Linq.Enumerable" or "System.Collections.Generic.IEnumerable`1" or "System.Linq.IGrouping`2" or "System.Collections.Generic.IReadOnlyCollection`1" or "System.Collections.Generic.Dictionary`2" +Message: +"Types that are "TypeDependencyNamespace.ClassWithMultipleDependencies" should be types that only depend on Classes that are "TypeDependencyNamespace.BaseClass" or "TypeDependencyNamespace.OtherBaseClass"" failed: + TypeDependencyNamespace.ClassWithMultipleDependencies is not "TypeDependencyNamespace.BaseClass" or "TypeDependencyNamespace.ChildClass" or "TypeDependencyNamespace.OtherChildClass" or "TypeDependencyNamespace.BaseClassWithMember" or "TypeDependencyNamespace.BaseClassWithMultipleDependencies" or "TypeDependencyNamespace.OtherBaseClass" or "TypeDependencyNamespace.GenericBaseClass`1" or "TypeDependencyNamespace.ClassWithoutDependencies" or "TypeDependencyNamespace.OtherClassWithoutDependencies" or "TypeDependencyNamespace.Issue351" or "System.Object" or "System.Void" or "System.String" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Int32" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" or "System.Collections.Generic.List`1" or "System.Func`2" or "System.IntPtr" or "System.Linq.Enumerable" or "System.Collections.Generic.IEnumerable`1" or "System.Linq.IGrouping`2" or "System.Collections.Generic.IReadOnlyCollection`1" or "System.Collections.Generic.Dictionary`2" + + + diff --git a/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.OnlyHaveAttributesTest.verified.txt b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.OnlyHaveAttributesTest.verified.txt index 1015d0801..d49adceac 100644 --- a/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.OnlyHaveAttributesTest.verified.txt +++ b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.OnlyHaveAttributesTest.verified.txt @@ -1,5 +1,7 @@ ===== No violations ===== +----- Conditions ----- + Query: Types that are "AttributeNamespace.ClassWithSingleAttribute" should does only have "AttributeNamespace.Attribute1" Result: True Description: AttributeNamespace.ClassWithSingleAttribute passed @@ -30,8 +32,74 @@ Description: AttributeNamespace.ClassWithSingleAttribute passed Message: All Evaluations passed +----- Predicates ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttribute" should be Types that only have attribute "AttributeNamespace.Attribute1" +Result: True +Description: AttributeNamespace.ClassWithSingleAttribute passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithSingleAttribute" should be Types that only have attribute "AttributeNamespace.Attribute1" +Result: True +Description: AttributeNamespace.ClassWithSingleAttribute passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithSingleAttribute" should be Types that only have attribute "AttributeNamespace.Attribute1" +Result: True +Description: AttributeNamespace.ClassWithSingleAttribute passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithSingleAttribute" should be Types that only have attribute "AttributeNamespace.Attribute1" +Result: True +Description: AttributeNamespace.ClassWithSingleAttribute passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithSingleAttribute" should be Types that only have Attributes that are "AttributeNamespace.Attribute1" +Result: True +Description: AttributeNamespace.ClassWithSingleAttribute passed +Message: +All Evaluations passed + +----- Predicates as conditions ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttribute" should be types that only have attribute "AttributeNamespace.Attribute1" +Result: True +Description: AttributeNamespace.ClassWithSingleAttribute passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithSingleAttribute" should be types that only have attribute "AttributeNamespace.Attribute1" +Result: True +Description: AttributeNamespace.ClassWithSingleAttribute passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithSingleAttribute" should be types that only have attribute "AttributeNamespace.Attribute1" +Result: True +Description: AttributeNamespace.ClassWithSingleAttribute passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithSingleAttribute" should be types that only have attribute "AttributeNamespace.Attribute1" +Result: True +Description: AttributeNamespace.ClassWithSingleAttribute passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithSingleAttribute" should be types that only have Attributes that are "AttributeNamespace.Attribute1" +Result: True +Description: AttributeNamespace.ClassWithSingleAttribute passed +Message: +All Evaluations passed + ===== Violations ===== +----- Conditions ----- + Query: Types that are "AttributeNamespace.ClassWithSingleAttribute" should does only have "AttributeNamespace.UnusedAttribute" Result: False Description: AttributeNamespace.ClassWithSingleAttribute does have attribute AttributeNamespace.Attribute1 @@ -77,13 +145,86 @@ Message: +----- Predicates ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttribute" should be Types that only have attribute "AttributeNamespace.UnusedAttribute" +Result: False +Description: AttributeNamespace.ClassWithSingleAttribute is not Types that only have attribute "AttributeNamespace.UnusedAttribute" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttribute" should be Types that only have attribute "AttributeNamespace.UnusedAttribute"" failed: + AttributeNamespace.ClassWithSingleAttribute is not Types that only have attribute "AttributeNamespace.UnusedAttribute" + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttribute" should be Types that only have attribute "AttributeNamespace.UnusedAttribute" +Result: False +Description: AttributeNamespace.ClassWithSingleAttribute is not Types that only have attribute "AttributeNamespace.UnusedAttribute" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttribute" should be Types that only have attribute "AttributeNamespace.UnusedAttribute"" failed: + AttributeNamespace.ClassWithSingleAttribute is not Types that only have attribute "AttributeNamespace.UnusedAttribute" + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttribute" should be Types that only have attribute "AttributeNamespace.UnusedAttribute" +Result: False +Description: AttributeNamespace.ClassWithSingleAttribute is not Types that only have attribute "AttributeNamespace.UnusedAttribute" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttribute" should be Types that only have attribute "AttributeNamespace.UnusedAttribute"" failed: + AttributeNamespace.ClassWithSingleAttribute is not Types that only have attribute "AttributeNamespace.UnusedAttribute" + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttribute" should be Types that only have attribute "AttributeNamespace.UnusedAttribute" +Result: False +Description: AttributeNamespace.ClassWithSingleAttribute is not Types that only have attribute "AttributeNamespace.UnusedAttribute" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttribute" should be Types that only have attribute "AttributeNamespace.UnusedAttribute"" failed: + AttributeNamespace.ClassWithSingleAttribute is not Types that only have attribute "AttributeNamespace.UnusedAttribute" + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttribute" should be Types that only have Attributes that are "AttributeNamespace.UnusedAttribute" +Result: False +Description: AttributeNamespace.ClassWithSingleAttribute is not Types that only have Attributes that are "AttributeNamespace.UnusedAttribute" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttribute" should be Types that only have Attributes that are "AttributeNamespace.UnusedAttribute"" failed: + AttributeNamespace.ClassWithSingleAttribute is not Types that only have Attributes that are "AttributeNamespace.UnusedAttribute" + + + ===== Attribute outside of architecture ===== +----- Conditions ----- + Query: Types that are "AttributeNamespace.ClassWithSingleAttribute" should does only have "TypeDependencyNamespace.BaseClass" Exception: Type TypeDependencyNamespace.BaseClass does not exist in provided architecture or is no class. +----- Predicates ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttribute" should be Types that only have attribute "TypeDependencyNamespace.BaseClass" +Result: False +Description: AttributeNamespace.ClassWithSingleAttribute is not Types that only have attribute "TypeDependencyNamespace.BaseClass" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttribute" should be Types that only have attribute "TypeDependencyNamespace.BaseClass"" failed: + AttributeNamespace.ClassWithSingleAttribute is not Types that only have attribute "TypeDependencyNamespace.BaseClass" + + + +----- Predicates as conditions ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttribute" should be types that only have attribute "TypeDependencyNamespace.BaseClass" +Result: False +Description: AttributeNamespace.ClassWithSingleAttribute is not "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttribute" should be types that only have attribute "TypeDependencyNamespace.BaseClass"" failed: + AttributeNamespace.ClassWithSingleAttribute is not "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" + + + ===== Empty arguments ===== +----- Conditions ----- + Query: Types that are "AttributeNamespace.ClassWithSingleAttribute" should have no attributes Result: False Description: AttributeNamespace.ClassWithSingleAttribute does have attribute AttributeNamespace.Attribute1 @@ -111,20 +252,68 @@ Message: -Query: Types that are "AttributeNamespace.ClassWithoutAttributes" should have no attributes -Result: True -Description: AttributeNamespace.ClassWithoutAttributes passed +----- Predicates ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttribute" should be Types that have no attributes +Result: False +Description: AttributeNamespace.ClassWithSingleAttribute is not Types that have no attributes Message: -All Evaluations passed +"Types that are "AttributeNamespace.ClassWithSingleAttribute" should be Types that have no attributes" failed: + AttributeNamespace.ClassWithSingleAttribute is not Types that have no attributes -Query: Types that are "AttributeNamespace.ClassWithoutAttributes" should have no attributes -Result: True -Description: AttributeNamespace.ClassWithoutAttributes passed + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttribute" should be Types that have no attributes +Result: False +Description: AttributeNamespace.ClassWithSingleAttribute is not Types that have no attributes Message: -All Evaluations passed +"Types that are "AttributeNamespace.ClassWithSingleAttribute" should be Types that have no attributes" failed: + AttributeNamespace.ClassWithSingleAttribute is not Types that have no attributes + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttribute" should be Types that only have Attributes that have full name "NotTheNameOfAnyObject" +Result: False +Description: AttributeNamespace.ClassWithSingleAttribute is not Types that only have Attributes that have full name "NotTheNameOfAnyObject" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttribute" should be Types that only have Attributes that have full name "NotTheNameOfAnyObject"" failed: + AttributeNamespace.ClassWithSingleAttribute is not Types that only have Attributes that have full name "NotTheNameOfAnyObject" + + + +----- Predicates as conditions ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttribute" should be types that have no attributes +Result: False +Description: AttributeNamespace.ClassWithSingleAttribute is not "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttribute" should be types that have no attributes" failed: + AttributeNamespace.ClassWithSingleAttribute is not "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttribute" should be types that have no attributes +Result: False +Description: AttributeNamespace.ClassWithSingleAttribute is not "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttribute" should be types that have no attributes" failed: + AttributeNamespace.ClassWithSingleAttribute is not "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttribute" should be types that only have Attributes that have full name "NotTheNameOfAnyObject" +Result: False +Description: AttributeNamespace.ClassWithSingleAttribute is not "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttribute" should be types that only have Attributes that have full name "NotTheNameOfAnyObject"" failed: + AttributeNamespace.ClassWithSingleAttribute is not "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" + + ===== Multiple arguments ===== +----- Conditions ----- + Query: Types that are "AttributeNamespace.ClassWithTwoAttributes" should does only have "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" Result: True Description: AttributeNamespace.ClassWithTwoAttributes passed @@ -155,8 +344,74 @@ Description: AttributeNamespace.ClassWithTwoAttributes passed Message: All Evaluations passed +----- Predicates ----- + +Query: Types that are "AttributeNamespace.ClassWithTwoAttributes" should be Types that only have attribute "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" +Result: True +Description: AttributeNamespace.ClassWithTwoAttributes passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithTwoAttributes" should be Types that only have attribute "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" +Result: True +Description: AttributeNamespace.ClassWithTwoAttributes passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithTwoAttributes" should be Types that only have attribute "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" +Result: True +Description: AttributeNamespace.ClassWithTwoAttributes passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithTwoAttributes" should be Types that only have attribute "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" +Result: True +Description: AttributeNamespace.ClassWithTwoAttributes passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithTwoAttributes" should be Types that only have Attributes that are "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" +Result: True +Description: AttributeNamespace.ClassWithTwoAttributes passed +Message: +All Evaluations passed + +----- Predicates as conditions ----- + +Query: Types that are "AttributeNamespace.ClassWithTwoAttributes" should be types that only have attribute "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" +Result: True +Description: AttributeNamespace.ClassWithTwoAttributes passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithTwoAttributes" should be types that only have attribute "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" +Result: True +Description: AttributeNamespace.ClassWithTwoAttributes passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithTwoAttributes" should be types that only have attribute "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" +Result: True +Description: AttributeNamespace.ClassWithTwoAttributes passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithTwoAttributes" should be types that only have attribute "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" +Result: True +Description: AttributeNamespace.ClassWithTwoAttributes passed +Message: +All Evaluations passed + +Query: Types that are "AttributeNamespace.ClassWithTwoAttributes" should be types that only have Attributes that are "AttributeNamespace.Attribute1" or "AttributeNamespace.Attribute2" +Result: True +Description: AttributeNamespace.ClassWithTwoAttributes passed +Message: +All Evaluations passed + ===== Multiple inputs ===== +----- Conditions ----- + Query: Types that are "AttributeNamespace.ClassWithSingleAttribute" or "AttributeNamespace.ClassWithTwoAttributes" should does only have "AttributeNamespace.Attribute1" Result: True Description: AttributeNamespace.ClassWithSingleAttribute passed @@ -180,3 +435,53 @@ Message: +----- Predicates ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttribute" or "AttributeNamespace.ClassWithTwoAttributes" should be Types that only have attribute "AttributeNamespace.Attribute1" +Result: True +Description: AttributeNamespace.ClassWithSingleAttribute passed +Result: False +Description: AttributeNamespace.ClassWithTwoAttributes is not Types that only have attribute "AttributeNamespace.Attribute1" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttribute" or "AttributeNamespace.ClassWithTwoAttributes" should be Types that only have attribute "AttributeNamespace.Attribute1"" failed: + AttributeNamespace.ClassWithTwoAttributes is not Types that only have attribute "AttributeNamespace.Attribute1" + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttribute" or "AttributeNamespace.ClassWithTwoAttributes" should be Types that only have attribute "AttributeNamespace.Attribute2" +Result: False +Description: AttributeNamespace.ClassWithSingleAttribute is not Types that only have attribute "AttributeNamespace.Attribute2" +Result: False +Description: AttributeNamespace.ClassWithTwoAttributes is not Types that only have attribute "AttributeNamespace.Attribute2" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttribute" or "AttributeNamespace.ClassWithTwoAttributes" should be Types that only have attribute "AttributeNamespace.Attribute2"" failed: + AttributeNamespace.ClassWithSingleAttribute is not Types that only have attribute "AttributeNamespace.Attribute2" + AttributeNamespace.ClassWithTwoAttributes is not Types that only have attribute "AttributeNamespace.Attribute2" + + + +----- Predicates as conditions ----- + +Query: Types that are "AttributeNamespace.ClassWithSingleAttribute" or "AttributeNamespace.ClassWithTwoAttributes" should be types that only have attribute "AttributeNamespace.Attribute1" +Result: True +Description: AttributeNamespace.ClassWithSingleAttribute passed +Result: False +Description: AttributeNamespace.ClassWithTwoAttributes is not "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.ClassWithSingleAttribute" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "AttributeNamespace.ClassWithSingleAttributeWithArguments" or "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttribute" or "AttributeNamespace.ClassWithTwoAttributes" should be types that only have attribute "AttributeNamespace.Attribute1"" failed: + AttributeNamespace.ClassWithTwoAttributes is not "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.ClassWithSingleAttribute" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "AttributeNamespace.ClassWithSingleAttributeWithArguments" or "AttributeNamespace.ClassWithSingleAttributeWithNamedArguments" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" + + + +Query: Types that are "AttributeNamespace.ClassWithSingleAttribute" or "AttributeNamespace.ClassWithTwoAttributes" should be types that only have attribute "AttributeNamespace.Attribute2" +Result: False +Description: AttributeNamespace.ClassWithSingleAttribute is not "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" +Result: False +Description: AttributeNamespace.ClassWithTwoAttributes is not "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" +Message: +"Types that are "AttributeNamespace.ClassWithSingleAttribute" or "AttributeNamespace.ClassWithTwoAttributes" should be types that only have attribute "AttributeNamespace.Attribute2"" failed: + AttributeNamespace.ClassWithSingleAttribute is not "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" + AttributeNamespace.ClassWithTwoAttributes is not "AttributeNamespace.ClassWithoutAttributes" or "AttributeNamespace.TypeArgument1" or "AttributeNamespace.TypeArgument2" or "AttributeNamespace.TypeArgument3" or "AttributeNamespace.UnusedTypeArgument" or "System.Attribute" or "System.Object" or "System.Type" or "System.String" or "System.Int32" or "System.Void" or "System.AttributeUsageAttribute" or "System.AttributeTargets" or "System.Runtime.CompilerServices.CompilerGeneratedAttribute" or "System.Runtime.CompilerServices.CompilationRelaxationsAttribute" or "System.Runtime.CompilerServices.RuntimeCompatibilityAttribute" or "System.Boolean" or "System.Diagnostics.DebuggableAttribute" or "System.Diagnostics.DebuggableAttribute+DebuggingModes" or "System.Runtime.Versioning.TargetFrameworkAttribute" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" + + + diff --git a/coverlet.runsettings b/coverlet.runsettings index 327c2a643..32c48bbfc 100644 --- a/coverlet.runsettings +++ b/coverlet.runsettings @@ -6,6 +6,7 @@ cobertura [ArchUnitNET]* + Obsolete From 09051149a4a5db705e9cc9ed229c98f7a3fda53a Mon Sep 17 00:00:00 2001 From: Alexander Linne Date: Fri, 22 Aug 2025 08:15:13 +0200 Subject: [PATCH 2/2] Remove Old ObjectSyntaxElementsTests Signed-off-by: Alexander Linne --- ArchUnitNETTests/ArchUnitNETTests.csproj | 1 + .../Elements/ObjectSyntaxElementsTests.cs | 8956 +++++++++++++++-- .../Syntax/Elements/ObjectsShouldTests.cs | 2926 ------ ...tSyntaxElementsTests.AreTest.verified.txt} | 0 ...ElementsTests.BeInternalTest.verified.txt} | 0 ...Tests.BePrivateProtectedTest.verified.txt} | 0 ...xElementsTests.BePrivateTest.verified.txt} | 0 ...ests.BeProtectedInternalTest.verified.txt} | 0 ...lementsTests.BeProtectedTest.verified.txt} | 0 ...axElementsTests.BePublicTest.verified.txt} | 0 ...ctSyntaxElementsTests.BeTest.verified.txt} | 0 ...lementsTests.BeTypesThatTest.verified.txt} | 0 ...taxElementsTests.CallAnyTest.verified.txt} | 0 ...lementsTests.DependOnAnyTest.verified.txt} | 0 ...sts.DependOnAnyTypesThatTest.verified.txt} | 0 ...yntaxElementsTests.ExistTest.verified.txt} | 0 ...ts.FollowCustomConditionTest.verified.txt} | 0 ...ts.FollowCustomPredicateTest.verified.txt} | 0 ...sTests.HaveAnyAttributesTest.verified.txt} | 0 ...ts.HaveAnyAttributesThatTest.verified.txt} | 0 ...yAttributesWithArgumentsTest.verified.txt} | 0 ...AttributesWithNamedArguments.verified.txt} | 0 ...veAttributeWithArgumentsTest.verified.txt} | 0 ...eAttributeWithNamedArguments.verified.txt} | 0 ...axElementsTests.HaveNameTest.verified.txt} | 0 ...yntaxElementsTests.NotBeTest.verified.txt} | 0 ...ElementsTests.NotCallAnyTest.verified.txt} | 0 ...entsTests.NotDependOnAnyTest.verified.txt} | 0 ....NotDependOnAnyTypesThatTest.verified.txt} | 0 ...axElementsTests.NotExistTest.verified.txt} | 0 ...sts.NotHaveAnyAttributesTest.verified.txt} | 0 ...NotHaveAnyAttributesThatTest.verified.txt} | 0 ...yAttributesWithArgumentsTest.verified.txt} | 0 ...ibutesWithNamedArgumentsTest.verified.txt} | 0 ...veAttributeWithArgumentsTest.verified.txt} | 0 ...ributeWithNamedArgumentsTest.verified.txt} | 0 ...lementsTests.NotHaveNameTest.verified.txt} | 0 ...ementsTests.OnlyDependOnTest.verified.txt} | 0 ...ts.OnlyDependOnTypesThatTest.verified.txt} | 0 ...Tests.OnlyHaveAttributesTest.verified.txt} | 0 ...s.OnlyHaveAttributesThatTest.verified.txt} | 0 41 files changed, 8020 insertions(+), 3863 deletions(-) delete mode 100644 ArchUnitNETTests/Fluent/Syntax/Elements/ObjectsShouldTests.cs rename ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/{ObjectsShouldTests.AreTest.verified.txt => ObjectSyntaxElementsTests.AreTest.verified.txt} (100%) rename ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/{ObjectsShouldTests.BeInternalTest.verified.txt => ObjectSyntaxElementsTests.BeInternalTest.verified.txt} (100%) rename ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/{ObjectsShouldTests.BePrivateProtectedTest.verified.txt => ObjectSyntaxElementsTests.BePrivateProtectedTest.verified.txt} (100%) rename ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/{ObjectsShouldTests.BePrivateTest.verified.txt => ObjectSyntaxElementsTests.BePrivateTest.verified.txt} (100%) rename ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/{ObjectsShouldTests.BeProtectedInternalTest.verified.txt => ObjectSyntaxElementsTests.BeProtectedInternalTest.verified.txt} (100%) rename ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/{ObjectsShouldTests.BeProtectedTest.verified.txt => ObjectSyntaxElementsTests.BeProtectedTest.verified.txt} (100%) rename ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/{ObjectsShouldTests.BePublicTest.verified.txt => ObjectSyntaxElementsTests.BePublicTest.verified.txt} (100%) rename ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/{ObjectsShouldTests.BeTest.verified.txt => ObjectSyntaxElementsTests.BeTest.verified.txt} (100%) rename ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/{ObjectsShouldTests.BeTypesThatTest.verified.txt => ObjectSyntaxElementsTests.BeTypesThatTest.verified.txt} (100%) rename ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/{ObjectsShouldTests.CallAnyTest.verified.txt => ObjectSyntaxElementsTests.CallAnyTest.verified.txt} (100%) rename ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/{ObjectsShouldTests.DependOnAnyTest.verified.txt => ObjectSyntaxElementsTests.DependOnAnyTest.verified.txt} (100%) rename ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/{ObjectsShouldTests.DependOnAnyTypesThatTest.verified.txt => ObjectSyntaxElementsTests.DependOnAnyTypesThatTest.verified.txt} (100%) rename ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/{ObjectsShouldTests.ExistTest.verified.txt => ObjectSyntaxElementsTests.ExistTest.verified.txt} (100%) rename ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/{ObjectsShouldTests.FollowCustomConditionTest.verified.txt => ObjectSyntaxElementsTests.FollowCustomConditionTest.verified.txt} (100%) rename ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/{ObjectsShouldTests.FollowCustomPredicateTest.verified.txt => ObjectSyntaxElementsTests.FollowCustomPredicateTest.verified.txt} (100%) rename ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/{ObjectsShouldTests.HaveAnyAttributesTest.verified.txt => ObjectSyntaxElementsTests.HaveAnyAttributesTest.verified.txt} (100%) rename ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/{ObjectsShouldTests.HaveAnyAttributesThatTest.verified.txt => ObjectSyntaxElementsTests.HaveAnyAttributesThatTest.verified.txt} (100%) rename ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/{ObjectsShouldTests.HaveAnyAttributesWithArgumentsTest.verified.txt => ObjectSyntaxElementsTests.HaveAnyAttributesWithArgumentsTest.verified.txt} (100%) rename ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/{ObjectsShouldTests.HaveAnyAttributesWithNamedArguments.verified.txt => ObjectSyntaxElementsTests.HaveAnyAttributesWithNamedArguments.verified.txt} (100%) rename ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/{ObjectsShouldTests.HaveAttributeWithArgumentsTest.verified.txt => ObjectSyntaxElementsTests.HaveAttributeWithArgumentsTest.verified.txt} (100%) rename ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/{ObjectsShouldTests.HaveAttributeWithNamedArguments.verified.txt => ObjectSyntaxElementsTests.HaveAttributeWithNamedArguments.verified.txt} (100%) rename ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/{ObjectsShouldTests.HaveNameTest.verified.txt => ObjectSyntaxElementsTests.HaveNameTest.verified.txt} (100%) rename ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/{ObjectsShouldTests.NotBeTest.verified.txt => ObjectSyntaxElementsTests.NotBeTest.verified.txt} (100%) rename ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/{ObjectsShouldTests.NotCallAnyTest.verified.txt => ObjectSyntaxElementsTests.NotCallAnyTest.verified.txt} (100%) rename ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/{ObjectsShouldTests.NotDependOnAnyTest.verified.txt => ObjectSyntaxElementsTests.NotDependOnAnyTest.verified.txt} (100%) rename ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/{ObjectsShouldTests.NotDependOnAnyTypesThatTest.verified.txt => ObjectSyntaxElementsTests.NotDependOnAnyTypesThatTest.verified.txt} (100%) rename ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/{ObjectsShouldTests.NotExistTest.verified.txt => ObjectSyntaxElementsTests.NotExistTest.verified.txt} (100%) rename ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/{ObjectsShouldTests.NotHaveAnyAttributesTest.verified.txt => ObjectSyntaxElementsTests.NotHaveAnyAttributesTest.verified.txt} (100%) rename ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/{ObjectsShouldTests.NotHaveAnyAttributesThatTest.verified.txt => ObjectSyntaxElementsTests.NotHaveAnyAttributesThatTest.verified.txt} (100%) rename ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/{ObjectsShouldTests.NotHaveAnyAttributesWithArgumentsTest.verified.txt => ObjectSyntaxElementsTests.NotHaveAnyAttributesWithArgumentsTest.verified.txt} (100%) rename ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/{ObjectsShouldTests.NotHaveAnyAttributesWithNamedArgumentsTest.verified.txt => ObjectSyntaxElementsTests.NotHaveAnyAttributesWithNamedArgumentsTest.verified.txt} (100%) rename ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/{ObjectsShouldTests.NotHaveAttributeWithArgumentsTest.verified.txt => ObjectSyntaxElementsTests.NotHaveAttributeWithArgumentsTest.verified.txt} (100%) rename ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/{ObjectsShouldTests.NotHaveAttributeWithNamedArgumentsTest.verified.txt => ObjectSyntaxElementsTests.NotHaveAttributeWithNamedArgumentsTest.verified.txt} (100%) rename ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/{ObjectsShouldTests.NotHaveNameTest.verified.txt => ObjectSyntaxElementsTests.NotHaveNameTest.verified.txt} (100%) rename ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/{ObjectsShouldTests.OnlyDependOnTest.verified.txt => ObjectSyntaxElementsTests.OnlyDependOnTest.verified.txt} (100%) rename ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/{ObjectsShouldTests.OnlyDependOnTypesThatTest.verified.txt => ObjectSyntaxElementsTests.OnlyDependOnTypesThatTest.verified.txt} (100%) rename ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/{ObjectsShouldTests.OnlyHaveAttributesTest.verified.txt => ObjectSyntaxElementsTests.OnlyHaveAttributesTest.verified.txt} (100%) rename ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/{ObjectsShouldTests.OnlyHaveAttributesThatTest.verified.txt => ObjectSyntaxElementsTests.OnlyHaveAttributesThatTest.verified.txt} (100%) diff --git a/ArchUnitNETTests/ArchUnitNETTests.csproj b/ArchUnitNETTests/ArchUnitNETTests.csproj index b737532b8..4ed6cd8f4 100644 --- a/ArchUnitNETTests/ArchUnitNETTests.csproj +++ b/ArchUnitNETTests/ArchUnitNETTests.csproj @@ -45,6 +45,7 @@ + diff --git a/ArchUnitNETTests/Fluent/Syntax/Elements/ObjectSyntaxElementsTests.cs b/ArchUnitNETTests/Fluent/Syntax/Elements/ObjectSyntaxElementsTests.cs index bd6ff6a89..987facb89 100644 --- a/ArchUnitNETTests/Fluent/Syntax/Elements/ObjectSyntaxElementsTests.cs +++ b/ArchUnitNETTests/Fluent/Syntax/Elements/ObjectSyntaxElementsTests.cs @@ -1,992 +1,8074 @@ -using System; using System.Collections.Generic; using System.Linq; +using System.Reflection; +using System.Threading.Tasks; using ArchUnitNET.Domain; -using ArchUnitNET.Domain.Extensions; +using ArchUnitNET.Domain.Exceptions; using ArchUnitNET.Fluent; -using ArchUnitNET.xUnit; -using ArchUnitNETTests.Domain; +using ArchUnitNET.Fluent.Conditions; +using ArchUnitNET.Fluent.Predicates; +using ArchUnitNET.Fluent.Syntax.Elements.Types; +using ArchUnitNETTests.AssemblyTestHelper; using Xunit; using static ArchUnitNET.Fluent.ArchRuleDefinition; -using static ArchUnitNETTests.Domain.StaticTestTypes; -namespace ArchUnitNETTests.Fluent.Syntax.Elements +namespace ArchUnitNETTests.Fluent.Syntax.Elements; + +// csharpier-ignore +public class ObjectSyntaxElementsTests { - public class ObjectSyntaxElementsTests + [Fact] + public async Task AreTest() + { + var helper = new DependencyAssemblyTestHelper(); + + // Single argument + var predicates = new List + { + Types().That().Are(helper.ChildClass), + Types().That().Are(helper.ChildClassSystemType), + Types().That().Are(Classes().That().Are(helper.ChildClass)), + Types().That().Are([helper.ChildClass]), + Types().That().Are([helper.ChildClassSystemType]), + }; + foreach (var predicate in predicates) + { + Assert.Equal( + [.. predicate.GetObjects(helper.Architecture)], + new List { helper.ChildClass } + ); + } + + // Multiple arguments + predicates = new List + { + Types().That().Are(helper.BaseClass, helper.ChildClass), + Types().That().Are(helper.BaseClassSystemType, helper.ChildClassSystemType), + Types().That().Are(Classes().That().Are(helper.BaseClass, helper.ChildClass)), + Types().That().Are([helper.BaseClass, helper.ChildClass]), + Types().That().Are([helper.BaseClassSystemType, helper.ChildClassSystemType]), + }; + foreach (var predicate in predicates) + { + Assert.Equal( + [.. predicate.GetObjects(helper.Architecture)], + new List { helper.BaseClass, helper.ChildClass } + ); + } + + // Empty arguments + Assert.Equal( + [.. Types().That().Are(new List()).GetObjects(helper.Architecture)], + new List() + ); + Assert.Equal( + [.. Types().That().Are([]).GetObjects(helper.Architecture)], + new List() + ); + + // Empty inputs + Types() + .That() + .Are([]) + .Should() + .BeTypesThat() + .Are(helper.ChildClass) + .AssertOnlyViolations(helper); + + // Predicates as conditions + var should = Types().That().Are(helper.ChildClass).Should(); + should.BeTypesThat().Are(helper.ChildClass).AssertNoViolations(helper); + should.BeTypesThat().Are(helper.ChildClassSystemType).AssertNoViolations(helper); + should + .BeTypesThat() + .Are(Classes().That().Are(helper.ChildClass)) + .AssertNoViolations(helper); + should.BeTypesThat().Are([helper.ChildClass]).AssertNoViolations(helper); + should.BeTypesThat().Are([helper.ChildClassSystemType]).AssertNoViolations(helper); + + await helper.AssertSnapshotMatches(); + } + + [Fact] + public async Task BeTest() + { + var helper = new DependencyAssemblyTestHelper(); + helper.AddSnapshotHeader("No violations"); + var should = Types().That().Are(helper.ChildClass).Should(); + should.Be(helper.ChildClass).AssertNoViolations(helper); + should.Be(helper.ChildClassSystemType).AssertNoViolations(helper); + should.Be(Classes().That().Are(helper.ChildClass)).AssertNoViolations(helper); + should.Be([helper.ChildClass]).AssertNoViolations(helper); + should.Be([helper.ChildClassSystemType]).AssertNoViolations(helper); + + helper.AddSnapshotHeader("Violations"); + should = Types().That().Are(helper.ChildClass).Should(); + should.Be(helper.ClassWithoutDependencies).AssertOnlyViolations(helper); + should.Be(helper.ClassWithoutDependenciesSystemType).AssertOnlyViolations(helper); + should + .Be(Classes().That().Are(helper.ClassWithoutDependencies)) + .AssertOnlyViolations(helper); + should.Be([helper.ClassWithoutDependencies]).AssertOnlyViolations(helper); + should.Be([helper.ClassWithoutDependenciesSystemType]).AssertOnlyViolations(helper); + + helper.AddSnapshotHeader("Empty arguments"); + should = Types().That().Are(helper.BaseClass).Should(); + should.Be(new List()).AssertOnlyViolations(helper); + should.Be(new List()).AssertOnlyViolations(helper); + should + .Be(Classes().That().HaveFullName(helper.NonExistentObjectName)) + .AssertOnlyViolations(helper); + + helper.AddSnapshotHeader("Multiple arguments"); + should = Types().That().Are(helper.ChildClass).Should(); + should.Be(helper.ClassWithoutDependencies, helper.BaseClass).AssertOnlyViolations(helper); + should.Be([helper.ClassWithoutDependencies, helper.BaseClass]).AssertOnlyViolations(helper); + should + .Be(helper.ClassWithoutDependenciesSystemType, helper.BaseClassSystemType) + .AssertOnlyViolations(helper); + should + .Be([helper.ClassWithoutDependenciesSystemType, helper.BaseClassSystemType]) + .AssertOnlyViolations(helper); + + helper.AddSnapshotHeader("Multiple inputs"); + Types() + .That() + .Are(helper.ChildClass, helper.BaseClass) + .Should() + .Be(helper.ChildClass, helper.BaseClass) + .AssertNoViolations(helper); + Types() + .That() + .Are(helper.ChildClass, helper.BaseClass) + .Should() + .Be(helper.ChildClass, helper.ClassWithoutDependencies) + .AssertAnyViolations(helper); + await helper.AssertSnapshotMatches(); + } + + [Fact] + public async Task BeTypesThatTest() + { + var helper = new DependencyAssemblyTestHelper(); + helper.AddSnapshotHeader("No violations"); + var should = Types().That().Are(helper.ChildClass).Should(); + should.BeTypesThat().Are(helper.ChildClass).AssertNoViolations(helper); + + helper.AddSnapshotHeader("Violations"); + should = Types().That().Are(helper.BaseClass).Should(); + should.BeTypesThat().Are(helper.ChildClass).AssertOnlyViolations(helper); + await helper.AssertSnapshotMatches(); + } + + [Fact] + public async Task BeInternalTest() + { + var helper = new VisibilityAssemblyTestHelper(); + helper.AddSnapshotHeader("No violations"); + Types().That().Are(helper.InternalClass).Should().BeInternal().AssertNoViolations(helper); + Types() + .That() + .Are(helper.InternalInnerClass) + .Should() + .BeInternal() + .AssertNoViolations(helper); + + helper.AddSnapshotHeader("Violations"); + Types().That().Are(helper.PublicClass).Should().BeInternal().AssertOnlyViolations(helper); + Types() + .That() + .Are(helper.PublicInnerClass) + .Should() + .BeInternal() + .AssertOnlyViolations(helper); + Types() + .That() + .Are(helper.ProtectedInnerClass) + .Should() + .BeInternal() + .AssertOnlyViolations(helper); + Types() + .That() + .Are(helper.ProtectedInternalInnerClass) + .Should() + .BeInternal() + .AssertOnlyViolations(helper); + Types() + .That() + .Are(helper.PrivateInnerClass) + .Should() + .BeInternal() + .AssertOnlyViolations(helper); + Types() + .That() + .Are(helper.PrivateProtectedInnerClass) + .Should() + .BeInternal() + .AssertOnlyViolations(helper); + + helper.AddSnapshotHeader("Multiple inputs"); + Types() + .That() + .Are(helper.InternalClass, helper.OtherInternalClass) + .Should() + .BeInternal() + .AssertNoViolations(helper); + Types() + .That() + .Are(helper.InternalClass, helper.ProtectedInternalInnerClass) + .Should() + .BeInternal() + .AssertAnyViolations(helper); + await helper.AssertSnapshotMatches(); + } + + [Fact] + public async Task BePrivateTest() + { + var helper = new VisibilityAssemblyTestHelper(); + helper.AddSnapshotHeader("No violations"); + Types() + .That() + .Are(helper.PrivateInnerClass) + .Should() + .BePrivate() + .AssertNoViolations(helper); + + helper.AddSnapshotHeader("Violations"); + Types().That().Are(helper.PublicClass).Should().BePrivate().AssertOnlyViolations(helper); + Types() + .That() + .Are(helper.PublicInnerClass) + .Should() + .BePrivate() + .AssertOnlyViolations(helper); + Types().That().Are(helper.InternalClass).Should().BePrivate().AssertOnlyViolations(helper); + Types() + .That() + .Are(helper.InternalInnerClass) + .Should() + .BePrivate() + .AssertOnlyViolations(helper); + Types() + .That() + .Are(helper.ProtectedInnerClass) + .Should() + .BePrivate() + .AssertOnlyViolations(helper); + Types() + .That() + .Are(helper.ProtectedInternalInnerClass) + .Should() + .BePrivate() + .AssertOnlyViolations(helper); + Types() + .That() + .Are(helper.PrivateProtectedInnerClass) + .Should() + .BePrivate() + .AssertOnlyViolations(helper); + + helper.AddSnapshotHeader("Multiple inputs"); + Types() + .That() + .Are(helper.PrivateInnerClass, helper.OtherPrivateInnerClass) + .Should() + .BePrivate() + .AssertNoViolations(helper); + Types() + .That() + .Are(helper.PrivateInnerClass, helper.PrivateProtectedInnerClass) + .Should() + .BePrivate() + .AssertAnyViolations(helper); + await helper.AssertSnapshotMatches(); + } + + [Fact] + public async Task BePrivateProtectedTest() + { + var helper = new VisibilityAssemblyTestHelper(); + helper.AddSnapshotHeader("No violations"); + Types() + .That() + .Are(helper.PrivateProtectedInnerClass) + .Should() + .BePrivateProtected() + .AssertNoViolations(helper); + + helper.AddSnapshotHeader("Violations"); + Types() + .That() + .Are(helper.PublicClass) + .Should() + .BePrivateProtected() + .AssertOnlyViolations(helper); + Types() + .That() + .Are(helper.PublicInnerClass) + .Should() + .BePrivateProtected() + .AssertOnlyViolations(helper); + Types() + .That() + .Are(helper.ProtectedInnerClass) + .Should() + .BePrivateProtected() + .AssertOnlyViolations(helper); + Types() + .That() + .Are(helper.ProtectedInternalInnerClass) + .Should() + .BePrivateProtected() + .AssertOnlyViolations(helper); + Types() + .That() + .Are(helper.InternalClass) + .Should() + .BePrivateProtected() + .AssertOnlyViolations(helper); + Types() + .That() + .Are(helper.InternalInnerClass) + .Should() + .BePrivateProtected() + .AssertOnlyViolations(helper); + Types() + .That() + .Are(helper.PrivateInnerClass) + .Should() + .BePrivateProtected() + .AssertOnlyViolations(helper); + + helper.AddSnapshotHeader("Multiple inputs"); + Types() + .That() + .Are(helper.PrivateProtectedInnerClass, helper.OtherPrivateProtectedInnerClass) + .Should() + .BePrivateProtected() + .AssertNoViolations(helper); + Types() + .That() + .Are(helper.PrivateProtectedInnerClass, helper.PrivateInnerClass) + .Should() + .BePrivateProtected() + .AssertAnyViolations(helper); + await helper.AssertSnapshotMatches(); + } + + [Fact] + public async Task BeProtectedTest() + { + var helper = new VisibilityAssemblyTestHelper(); + helper.AddSnapshotHeader("No violations"); + Types() + .That() + .Are(helper.ProtectedInnerClass) + .Should() + .BeProtected() + .AssertNoViolations(helper); + + helper.AddSnapshotHeader("Violations"); + Types().That().Are(helper.PublicClass).Should().BeProtected().AssertOnlyViolations(helper); + Types() + .That() + .Are(helper.PublicInnerClass) + .Should() + .BeProtected() + .AssertOnlyViolations(helper); + Types() + .That() + .Are(helper.InternalClass) + .Should() + .BeProtected() + .AssertOnlyViolations(helper); + Types() + .That() + .Are(helper.InternalInnerClass) + .Should() + .BeProtected() + .AssertOnlyViolations(helper); + Types() + .That() + .Are(helper.PrivateInnerClass) + .Should() + .BeProtected() + .AssertOnlyViolations(helper); + Types() + .That() + .Are(helper.PrivateProtectedInnerClass) + .Should() + .BeProtected() + .AssertOnlyViolations(helper); + Types() + .That() + .Are(helper.ProtectedInternalInnerClass) + .Should() + .BeProtected() + .AssertOnlyViolations(helper); + + helper.AddSnapshotHeader("Multiple inputs"); + Types() + .That() + .Are(helper.ProtectedInnerClass, helper.OtherProtectedInnerClass) + .Should() + .BeProtected() + .AssertNoViolations(helper); + Types() + .That() + .Are(helper.ProtectedInnerClass, helper.ProtectedInternalInnerClass) + .Should() + .BeProtected() + .AssertAnyViolations(helper); + await helper.AssertSnapshotMatches(); + } + + [Fact] + public async Task BeProtectedInternalTest() + { + var helper = new VisibilityAssemblyTestHelper(); + helper.AddSnapshotHeader("No violations"); + Types() + .That() + .Are(helper.ProtectedInternalInnerClass) + .Should() + .BeProtectedInternal() + .AssertNoViolations(helper); + + helper.AddSnapshotHeader("Violations"); + Types() + .That() + .Are(helper.PublicClass) + .Should() + .BeProtectedInternal() + .AssertOnlyViolations(helper); + Types() + .That() + .Are(helper.PublicInnerClass) + .Should() + .BeProtectedInternal() + .AssertOnlyViolations(helper); + Types() + .That() + .Are(helper.ProtectedInnerClass) + .Should() + .BeProtectedInternal() + .AssertOnlyViolations(helper); + Types() + .That() + .Are(helper.InternalClass) + .Should() + .BeProtectedInternal() + .AssertOnlyViolations(helper); + Types() + .That() + .Are(helper.InternalInnerClass) + .Should() + .BeProtectedInternal() + .AssertOnlyViolations(helper); + Types() + .That() + .Are(helper.PrivateInnerClass) + .Should() + .BeProtectedInternal() + .AssertOnlyViolations(helper); + Types() + .That() + .Are(helper.PrivateProtectedInnerClass) + .Should() + .BeProtectedInternal() + .AssertOnlyViolations(helper); + + helper.AddSnapshotHeader("Multiple inputs"); + Types() + .That() + .Are(helper.ProtectedInternalInnerClass, helper.OtherProtectedInternalInnerClass) + .Should() + .BeProtectedInternal() + .AssertNoViolations(helper); + + Types() + .That() + .Are(helper.ProtectedInternalInnerClass, helper.InternalClass) + .Should() + .BeProtectedInternal() + .AssertAnyViolations(helper); + await helper.AssertSnapshotMatches(); + } + + [Fact] + public async Task BePublicTest() + { + var helper = new VisibilityAssemblyTestHelper(); + helper.AddSnapshotHeader("No violations"); + Types().That().Are(helper.PublicClass).Should().BePublic().AssertNoViolations(helper); + Types().That().Are(helper.PublicInnerClass).Should().BePublic().AssertNoViolations(helper); + + helper.AddSnapshotHeader("Violations"); + Types().That().Are(helper.InternalClass).Should().BePublic().AssertOnlyViolations(helper); + Types() + .That() + .Are(helper.InternalInnerClass) + .Should() + .BePublic() + .AssertOnlyViolations(helper); + Types() + .That() + .Are(helper.ProtectedInnerClass) + .Should() + .BePublic() + .AssertOnlyViolations(helper); + Types() + .That() + .Are(helper.ProtectedInternalInnerClass) + .Should() + .BePublic() + .AssertOnlyViolations(helper); + Types() + .That() + .Are(helper.PrivateInnerClass) + .Should() + .BePublic() + .AssertOnlyViolations(helper); + Types() + .That() + .Are(helper.PrivateProtectedInnerClass) + .Should() + .BePublic() + .AssertOnlyViolations(helper); + + helper.AddSnapshotHeader("Multiple inputs"); + Types() + .That() + .Are(helper.PublicClass, helper.OtherPublicClass) + .Should() + .BePublic() + .AssertNoViolations(helper); + Types() + .That() + .Are(helper.PublicClass, helper.InternalClass) + .Should() + .BePublic() + .AssertAnyViolations(helper); + await helper.AssertSnapshotMatches(); + } + + [Fact] + public async Task CallAnyTest() + { + var helper = new DependencyAssemblyTestHelper(); + + helper.AddSnapshotHeader("No violations"); + var should = MethodMembers().That().Are(helper.MethodWithSingleDependency).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should.CallAny(helper.CalledMethod).AssertNoViolations(helper); + should.CallAny([helper.CalledMethod]).AssertNoViolations(helper); + should.CallAny(MethodMembers().That().Are(helper.CalledMethod)).AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should.Be(MethodMembers().That().CallAny(helper.CalledMethod)).AssertNoViolations(helper); + should.Be(MethodMembers().That().CallAny([helper.CalledMethod])).AssertNoViolations(helper); + should + .Be(MethodMembers().That().CallAny(MethodMembers().That().Are(helper.CalledMethod))) + .AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should.BeMethodMembersThat().CallAny(helper.CalledMethod).AssertNoViolations(helper); + should.BeMethodMembersThat().CallAny([helper.CalledMethod]).AssertNoViolations(helper); + should + .BeMethodMembersThat() + .CallAny(MethodMembers().That().Are(helper.CalledMethod)) + .AssertNoViolations(helper); + + helper.AddSnapshotHeader("Violations"); + should = MethodMembers().That().Are(helper.MethodWithoutDependencies).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should.CallAny(helper.CalledMethod).AssertOnlyViolations(helper); + should.CallAny([helper.CalledMethod]).AssertOnlyViolations(helper); + should + .CallAny(MethodMembers().That().Are(helper.CalledMethod)) + .AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should.Be(MethodMembers().That().CallAny(helper.CalledMethod)).AssertOnlyViolations(helper); + should + .Be(MethodMembers().That().CallAny([helper.CalledMethod])) + .AssertOnlyViolations(helper); + should + .Be(MethodMembers().That().CallAny(MethodMembers().That().Are(helper.CalledMethod))) + .AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should.BeMethodMembersThat().CallAny(helper.CalledMethod).AssertOnlyViolations(helper); + should.BeMethodMembersThat().CallAny([helper.CalledMethod]).AssertOnlyViolations(helper); + should + .BeMethodMembersThat() + .CallAny(MethodMembers().That().Are(helper.CalledMethod)) + .AssertOnlyViolations(helper); + + helper.AddSnapshotHeader("Empty arguments"); + should = MethodMembers().That().Are(helper.MethodWithSingleDependency).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should.CallAny(new List()).AssertOnlyViolations(helper); + should + .CallAny(MethodMembers().That().HaveFullName(helper.NonExistentObjectName)) + .AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should + .Be(MethodMembers().That().CallAny(new List())) + .AssertOnlyViolations(helper); + should + .Be( + MethodMembers() + .That() + .CallAny(MethodMembers().That().HaveFullName(helper.NonExistentObjectName)) + ) + .AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should.BeMethodMembersThat().CallAny(new List()).AssertOnlyViolations(helper); + should + .BeMethodMembersThat() + .CallAny(MethodMembers().That().HaveFullName(helper.NonExistentObjectName)) + .AssertOnlyViolations(helper); + + helper.AddSnapshotHeader("Multiple arguments"); + should = MethodMembers().That().Are(helper.MethodWithMultipleDependencies).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should + .CallAny(helper.MethodWithoutDependencies, helper.MethodWithMultipleDependencies) + .AssertOnlyViolations(helper); + should + .CallAny([helper.MethodWithoutDependencies, helper.MethodWithMultipleDependencies]) + .AssertOnlyViolations(helper); + should + .CallAny( + MethodMembers() + .That() + .Are(helper.MethodWithoutDependencies, helper.MethodWithMultipleDependencies) + ) + .AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should + .Be( + MethodMembers() + .That() + .CallAny( + helper.MethodWithoutDependencies, + helper.MethodWithMultipleDependencies + ) + ) + .AssertOnlyViolations(helper); + should + .Be( + MethodMembers() + .That() + .CallAny( + [helper.MethodWithoutDependencies, helper.MethodWithMultipleDependencies] + ) + ) + .AssertOnlyViolations(helper); + should + .Be( + MethodMembers() + .That() + .CallAny( + MethodMembers() + .That() + .Are( + helper.MethodWithoutDependencies, + helper.MethodWithMultipleDependencies + ) + ) + ) + .AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should + .BeMethodMembersThat() + .CallAny(helper.MethodWithoutDependencies, helper.MethodWithMultipleDependencies) + .AssertOnlyViolations(helper); + should + .BeMethodMembersThat() + .CallAny([helper.MethodWithoutDependencies, helper.MethodWithMultipleDependencies]) + .AssertOnlyViolations(helper); + should + .BeMethodMembersThat() + .CallAny( + MethodMembers() + .That() + .Are(helper.MethodWithoutDependencies, helper.MethodWithMultipleDependencies) + ) + .AssertOnlyViolations(helper); + + helper.AddSnapshotHeader("Input with multiple dependencies"); + should = MethodMembers().That().Are(helper.MethodWithMultipleDependencies).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should + .CallAny(helper.CalledMethod1, helper.MethodWithoutDependencies) + .AssertNoViolations(helper); + should.CallAny(helper.MethodWithoutDependencies).AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should + .Be( + MethodMembers() + .That() + .CallAny(helper.CalledMethod1, helper.MethodWithoutDependencies) + ) + .AssertNoViolations(helper); + should + .Be(MethodMembers().That().CallAny(helper.MethodWithoutDependencies)) + .AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should + .BeMethodMembersThat() + .CallAny(helper.CalledMethod1, helper.MethodWithoutDependencies) + .AssertNoViolations(helper); + should + .BeMethodMembersThat() + .CallAny(helper.MethodWithoutDependencies) + .AssertOnlyViolations(helper); + + await helper.AssertSnapshotMatches(); + } + + [Fact] + public async Task DependOnAnyTest() + { + var helper = new DependencyAssemblyTestHelper(); + + helper.AddSnapshotHeader("No violations"); + var should = Types().That().Are(helper.ChildClass).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should.DependOnAny(helper.BaseClass).AssertNoViolations(helper); + should.DependOnAny(helper.BaseClassSystemType).AssertNoViolations(helper); + should.DependOnAny(Classes().That().Are(helper.BaseClass)).AssertNoViolations(helper); + should.DependOnAny([helper.BaseClass]).AssertNoViolations(helper); + should.DependOnAny([helper.BaseClassSystemType]).AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().DependOnAny(helper.BaseClass)).AssertNoViolations(helper); + should + .Be(Types().That().DependOnAny(helper.BaseClassSystemType)) + .AssertNoViolations(helper); + should + .Be(Types().That().DependOnAny(Classes().That().Are(helper.BaseClass))) + .AssertNoViolations(helper); + should.Be(Types().That().DependOnAny([helper.BaseClass])).AssertNoViolations(helper); + should + .Be(Types().That().DependOnAny([helper.BaseClassSystemType])) + .AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should.BeTypesThat().DependOnAny(helper.BaseClass).AssertNoViolations(helper); + should.BeTypesThat().DependOnAny(helper.BaseClassSystemType).AssertNoViolations(helper); + should + .BeTypesThat() + .DependOnAny(Classes().That().Are(helper.BaseClass)) + .AssertNoViolations(helper); + should.BeTypesThat().DependOnAny([helper.BaseClass]).AssertNoViolations(helper); + should.BeTypesThat().DependOnAny([helper.BaseClassSystemType]).AssertNoViolations(helper); + + helper.AddSnapshotHeader("Violations"); + should = Types() + .That() + .HaveFullName(helper.ClassWithMultipleDependencies.FullName) + .Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should.DependOnAny(helper.ClassWithoutDependencies).AssertOnlyViolations(helper); + should.DependOnAny(helper.ClassWithoutDependenciesSystemType).AssertOnlyViolations(helper); + should + .DependOnAny(Classes().That().Are(helper.ClassWithoutDependencies)) + .AssertOnlyViolations(helper); + should.DependOnAny([helper.ClassWithoutDependencies]).AssertOnlyViolations(helper); + should + .DependOnAny([helper.ClassWithoutDependenciesSystemType]) + .AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should + .Be(Types().That().DependOnAny(helper.ClassWithoutDependencies)) + .AssertOnlyViolations(helper); + should + .Be(Types().That().DependOnAny(helper.ClassWithoutDependenciesSystemType)) + .AssertOnlyViolations(helper); + should + .Be(Types().That().DependOnAny(Classes().That().Are(helper.ClassWithoutDependencies))) + .AssertOnlyViolations(helper); + should + .Be(Types().That().DependOnAny([helper.ClassWithoutDependencies])) + .AssertOnlyViolations(helper); + should + .Be(Types().That().DependOnAny([helper.ClassWithoutDependenciesSystemType])) + .AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should + .BeTypesThat() + .DependOnAny(helper.ClassWithoutDependencies) + .AssertOnlyViolations(helper); + should + .BeTypesThat() + .DependOnAny(helper.ClassWithoutDependenciesSystemType) + .AssertOnlyViolations(helper); + should + .BeTypesThat() + .DependOnAny(Classes().That().Are(helper.ClassWithoutDependencies)) + .AssertOnlyViolations(helper); + should + .BeTypesThat() + .DependOnAny([helper.ClassWithoutDependencies]) + .AssertOnlyViolations(helper); + should + .BeTypesThat() + .DependOnAny([helper.ClassWithoutDependenciesSystemType]) + .AssertOnlyViolations(helper); + + helper.AddSnapshotHeader("Type outside of architecture"); + should = Types().That().Are(helper.ClassWithMultipleDependencies).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should + .DependOnAny(typeof(AttributeNamespace.ClassWithoutAttributes)) + .AssertException(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should + .Be(Types().That().DependOnAny(typeof(AttributeNamespace.ClassWithoutAttributes))) + .AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should + .BeTypesThat() + .DependOnAny(typeof(AttributeNamespace.ClassWithoutAttributes)) + .AssertOnlyViolations(helper); + + helper.AddSnapshotHeader("Empty arguments"); + should = Types().That().Are(helper.ClassWithMultipleDependencies).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should.DependOnAny(new List()).AssertOnlyViolations(helper); + should.DependOnAny(new List()).AssertOnlyViolations(helper); + should + .DependOnAny(Classes().That().HaveFullName(helper.NonExistentObjectName)) + .AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().DependOnAny(new List())).AssertOnlyViolations(helper); + should.Be(Types().That().DependOnAny(new List())).AssertOnlyViolations(helper); + should + .Be( + Types() + .That() + .DependOnAny(Classes().That().HaveFullName(helper.NonExistentObjectName)) + ) + .AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should.BeTypesThat().DependOnAny(new List()).AssertOnlyViolations(helper); + should.BeTypesThat().DependOnAny(new List()).AssertOnlyViolations(helper); + should + .BeTypesThat() + .DependOnAny(Classes().That().HaveFullName(helper.NonExistentObjectName)) + .AssertOnlyViolations(helper); + + helper.AddSnapshotHeader("Multiple arguments"); + should = Types().That().Are(helper.ClassWithMultipleDependencies).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should + .DependOnAny(helper.ClassWithoutDependencies, helper.BaseClass) + .AssertOnlyViolations(helper); + should + .DependOnAny([helper.ClassWithoutDependencies, helper.BaseClass]) + .AssertOnlyViolations(helper); + should + .DependOnAny(helper.ClassWithoutDependenciesSystemType, helper.BaseClassSystemType) + .AssertOnlyViolations(helper); + should + .DependOnAny([helper.ClassWithoutDependenciesSystemType, helper.BaseClassSystemType]) + .AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should + .Be(Types().That().DependOnAny(helper.ClassWithoutDependencies, helper.BaseClass)) + .AssertOnlyViolations(helper); + should + .Be(Types().That().DependOnAny([helper.ClassWithoutDependencies, helper.BaseClass])) + .AssertOnlyViolations(helper); + should + .Be( + Types() + .That() + .DependOnAny( + helper.ClassWithoutDependenciesSystemType, + helper.BaseClassSystemType + ) + ) + .AssertOnlyViolations(helper); + should + .Be( + Types() + .That() + .DependOnAny( + [helper.ClassWithoutDependenciesSystemType, helper.BaseClassSystemType] + ) + ) + .AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should + .BeTypesThat() + .DependOnAny(helper.ClassWithoutDependencies, helper.BaseClass) + .AssertOnlyViolations(helper); + should + .BeTypesThat() + .DependOnAny([helper.ClassWithoutDependencies, helper.BaseClass]) + .AssertOnlyViolations(helper); + should + .BeTypesThat() + .DependOnAny(helper.ClassWithoutDependenciesSystemType, helper.BaseClassSystemType) + .AssertOnlyViolations(helper); + should + .BeTypesThat() + .DependOnAny([helper.ClassWithoutDependenciesSystemType, helper.BaseClassSystemType]) + .AssertOnlyViolations(helper); + + helper.AddSnapshotHeader("Input without dependencies"); + should = Types().That().Are(helper.ClassWithoutDependencies).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should.DependOnAny([helper.BaseClass, helper.ChildClass]).AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should + .Be(Types().That().DependOnAny([helper.BaseClass, helper.ChildClass])) + .AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should + .BeTypesThat() + .DependOnAny([helper.BaseClass, helper.ChildClass]) + .AssertOnlyViolations(helper); + + helper.AddSnapshotHeader("Multiple inputs"); + + helper.AddSnapshotSubHeader("Conditions"); + Types() + .That() + .Are(helper.ChildClass1, helper.ChildClass2) + .Should() + .DependOnAny(helper.BaseClassWithMultipleDependenciesSystemType) + .AssertNoViolations(helper); + Types() + .That() + .Are(helper.ChildClass, helper.BaseClass) + .Should() + .DependOnAny(helper.ClassWithoutDependencies) + .AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + Types() + .That() + .Are(helper.ChildClass1, helper.ChildClass2) + .Should() + .Be(Types().That().DependOnAny(helper.BaseClassWithMultipleDependenciesSystemType)) + .AssertNoViolations(helper); + Types() + .That() + .Are(helper.ChildClass, helper.BaseClass) + .Should() + .Be(Types().That().DependOnAny(helper.ClassWithoutDependencies)) + .AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + Types() + .That() + .Are(helper.ChildClass1, helper.ChildClass2) + .Should() + .BeTypesThat() + .DependOnAny(helper.BaseClassWithMultipleDependenciesSystemType) + .AssertNoViolations(helper); + Types() + .That() + .Are(helper.ChildClass, helper.BaseClass) + .Should() + .BeTypesThat() + .DependOnAny(helper.ClassWithoutDependencies) + .AssertOnlyViolations(helper); + + await helper.AssertSnapshotMatches(); + } + + [Fact] + public async Task DependOnAnyTypesThatTest() + { + var helper = new DependencyAssemblyTestHelper(); + helper.AddSnapshotHeader("No violations"); + Types() + .That() + .Are(helper.ChildClass) + .Should() + .DependOnAnyTypesThat() + .Are(helper.BaseClass) + .AssertNoViolations(helper); + + helper.AddSnapshotHeader("Violations"); + Types() + .That() + .Are(helper.BaseClass) + .Should() + .DependOnAnyTypesThat() + .Are(helper.ChildClass) + .AssertOnlyViolations(helper); + await helper.AssertSnapshotMatches(); + } + + [Fact] + public async Task ExistTest() + { + var helper = new DependencyAssemblyTestHelper(); + helper.AddSnapshotHeader("No violations"); + Types().That().Are(helper.BaseClass).Should().Exist().AssertNoViolations(helper); + Types().That().Are(helper.BaseClassSystemType).Should().Exist().AssertNoViolations(helper); + + helper.AddSnapshotHeader("Violations"); + Types() + .That() + .HaveFullName(helper.NonExistentObjectName) + .Should() + .Exist() + .AssertOnlyViolations(helper); + await helper.AssertSnapshotMatches(); + } + + class CustomCondition : ICondition + { + public string Description => "follow custom condition"; + + public IEnumerable Check( + IEnumerable objects, + Architecture architecture + ) + { + return objects.Select(t => new ConditionResult( + t, + t.Name == "ChildClass", + "does not follow custom condition" + )); + } + + public bool CheckEmpty() + { + return true; + } + } + + [Fact] + public async Task FollowCustomConditionTest() + { + var helper = new DependencyAssemblyTestHelper(); + + helper.AddSnapshotHeader("No violations"); + var should = Types().That().Are(helper.ChildClass).Should(); + should.FollowCustomCondition(new CustomCondition()).AssertNoViolations(helper); + should + .FollowCustomCondition( + t => new ConditionResult( + t, + t.Name == "ChildClass", + "does not follow custom condition" + ), + "follow custom condition" + ) + .AssertNoViolations(helper); + should + .FollowCustomCondition( + t => t.Name == "ChildClass", + "follow custom condition", + "does not follow custom condition" + ) + .AssertNoViolations(helper); + + helper.AddSnapshotHeader("Violations"); + should = Types().That().Are(helper.BaseClass).Should(); + should.FollowCustomCondition(new CustomCondition()).AssertOnlyViolations(helper); + should + .FollowCustomCondition( + t => new ConditionResult( + t, + t.Name == "ChildClass", + "does not follow custom condition" + ), + "follow custom condition" + ) + .AssertOnlyViolations(helper); + should + .FollowCustomCondition( + t => t.Name == "ChildClass", + "follow custom condition", + "does not follow custom condition" + ) + .AssertOnlyViolations(helper); + + await helper.AssertSnapshotMatches(); + } + + class CustomPredicate : IPredicate + { + public string Description => "follow custom predicate"; + + public IEnumerable GetMatchingObjects( + IEnumerable objects, + Architecture architecture + ) + { + return objects.Where(t => t.Name == "ChildClass"); + } + } + + [Fact] + public async Task FollowCustomPredicateTest() + { + var helper = new DependencyAssemblyTestHelper(); + + helper.AddSnapshotHeader("No violations"); + var should = Types().That().Are(helper.ChildClass).Should(); + helper.AddSnapshotSubHeader("Conditions"); + should + .Be(Types().That().FollowCustomPredicate(new CustomPredicate())) + .AssertNoViolations(helper); + should + .Be( + Types() + .That() + .FollowCustomPredicate(t => t.Name == "ChildClass", "follow custom predicate") + ) + .AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should + .BeTypesThat() + .FollowCustomPredicate(new CustomPredicate()) + .AssertNoViolations(helper); + should + .BeTypesThat() + .FollowCustomPredicate(t => t.Name == "ChildClass", "follow custom predicate") + .AssertNoViolations(helper); + + helper.AddSnapshotHeader("Violations"); + should = Types().That().Are(helper.BaseClass).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should + .Be(Types().That().FollowCustomPredicate(new CustomPredicate())) + .AssertOnlyViolations(helper); + should + .Be( + Types() + .That() + .FollowCustomPredicate(t => t.Name == "ChildClass", "follow custom predicate") + ) + .AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should + .BeTypesThat() + .FollowCustomPredicate(new CustomPredicate()) + .AssertOnlyViolations(helper); + should + .BeTypesThat() + .FollowCustomPredicate(t => t.Name == "ChildClass", "follow custom predicate") + .AssertOnlyViolations(helper); + + await helper.AssertSnapshotMatches(); + } + + [Fact] + public async Task HaveAnyAttributesTest() + { + var helper = new AttributeAssemblyTestHelpers(); + + helper.AddSnapshotHeader("No violations"); + var should = Types().That().Are(helper.ClassWithTwoAttributes).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should.HaveAnyAttributes(helper.Attribute1).AssertNoViolations(helper); + should.HaveAnyAttributes([helper.Attribute1]).AssertNoViolations(helper); + should.HaveAnyAttributes(helper.Attribute1SystemType).AssertNoViolations(helper); + should.HaveAnyAttributes([helper.Attribute1SystemType]).AssertNoViolations(helper); + should + .HaveAnyAttributes(Attributes().That().Are(helper.Attribute1)) + .AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().HaveAnyAttributes(helper.Attribute1)).AssertNoViolations(helper); + should.Be(Types().That().HaveAnyAttributes([helper.Attribute1])).AssertNoViolations(helper); + should + .Be(Types().That().HaveAnyAttributes(helper.Attribute1SystemType)) + .AssertNoViolations(helper); + should + .Be(Types().That().HaveAnyAttributes([helper.Attribute1SystemType])) + .AssertNoViolations(helper); + should + .Be(Types().That().HaveAnyAttributes(Attributes().That().Are(helper.Attribute1))) + .AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should.BeTypesThat().HaveAnyAttributes(helper.Attribute1).AssertNoViolations(helper); + should.BeTypesThat().HaveAnyAttributes([helper.Attribute1]).AssertNoViolations(helper); + should + .BeTypesThat() + .HaveAnyAttributes(helper.Attribute1SystemType) + .AssertNoViolations(helper); + should + .BeTypesThat() + .HaveAnyAttributes([helper.Attribute1SystemType]) + .AssertNoViolations(helper); + should + .BeTypesThat() + .HaveAnyAttributes(Attributes().That().Are(helper.Attribute1)) + .AssertNoViolations(helper); + + helper.AddSnapshotHeader("Violations"); + should = Types().That().Are(helper.ClassWithTwoAttributes).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should.HaveAnyAttributes(helper.UnusedAttribute).AssertOnlyViolations(helper); + should.HaveAnyAttributes([helper.UnusedAttribute]).AssertOnlyViolations(helper); + should.HaveAnyAttributes(helper.UnusedAttributeSystemType).AssertOnlyViolations(helper); + should.HaveAnyAttributes([helper.UnusedAttributeSystemType]).AssertOnlyViolations(helper); + should + .HaveAnyAttributes(Attributes().That().Are(helper.UnusedAttribute)) + .AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should + .Be(Types().That().HaveAnyAttributes(helper.UnusedAttribute)) + .AssertOnlyViolations(helper); + should + .Be(Types().That().HaveAnyAttributes([helper.UnusedAttribute])) + .AssertOnlyViolations(helper); + should + .Be(Types().That().HaveAnyAttributes(helper.UnusedAttributeSystemType)) + .AssertOnlyViolations(helper); + should + .Be(Types().That().HaveAnyAttributes([helper.UnusedAttributeSystemType])) + .AssertOnlyViolations(helper); + should + .Be(Types().That().HaveAnyAttributes(Attributes().That().Are(helper.UnusedAttribute))) + .AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should.BeTypesThat().HaveAnyAttributes(helper.UnusedAttribute).AssertOnlyViolations(helper); + should + .BeTypesThat() + .HaveAnyAttributes([helper.UnusedAttribute]) + .AssertOnlyViolations(helper); + should + .BeTypesThat() + .HaveAnyAttributes(helper.UnusedAttributeSystemType) + .AssertOnlyViolations(helper); + should + .BeTypesThat() + .HaveAnyAttributes([helper.UnusedAttributeSystemType]) + .AssertOnlyViolations(helper); + should + .BeTypesThat() + .HaveAnyAttributes(Attributes().That().Are(helper.UnusedAttribute)) + .AssertOnlyViolations(helper); + + helper.AddSnapshotHeader("Empty arguments"); + should = Types().That().Are(helper.ClassWithTwoAttributes).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should.HaveAnyAttributes(new List()).AssertOnlyViolations(helper); + should.HaveAnyAttributes(new List()).AssertOnlyViolations(helper); + should + .HaveAnyAttributes(Attributes().That().HaveFullName(helper.NonExistentObjectName)) + .AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should + .Be(Types().That().HaveAnyAttributes(new List())) + .AssertOnlyViolations(helper); + should + .Be(Types().That().HaveAnyAttributes(new List())) + .AssertOnlyViolations(helper); + should + .Be( + Types() + .That() + .HaveAnyAttributes( + Attributes().That().HaveFullName(helper.NonExistentObjectName) + ) + ) + .AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should.BeTypesThat().HaveAnyAttributes(new List()).AssertOnlyViolations(helper); + should + .BeTypesThat() + .HaveAnyAttributes(new List()) + .AssertOnlyViolations(helper); + should + .BeTypesThat() + .HaveAnyAttributes(Attributes().That().HaveFullName(helper.NonExistentObjectName)) + .AssertOnlyViolations(helper); + + helper.AddSnapshotHeader("Multiple arguments"); + should = Types().That().Are(helper.ClassWithTwoAttributes).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should + .HaveAnyAttributes(helper.Attribute1, helper.UnusedAttribute) + .AssertNoViolations(helper); + should + .HaveAnyAttributes([helper.Attribute1, helper.UnusedAttribute]) + .AssertNoViolations(helper); + should + .HaveAnyAttributes(helper.Attribute1SystemType, helper.UnusedAttributeSystemType) + .AssertNoViolations(helper); + should + .HaveAnyAttributes([helper.Attribute1SystemType, helper.UnusedAttributeSystemType]) + .AssertNoViolations(helper); + should + .HaveAnyAttributes(Attributes().That().Are(helper.Attribute1, helper.UnusedAttribute)) + .AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should + .Be(Types().That().HaveAnyAttributes(helper.Attribute1, helper.UnusedAttribute)) + .AssertNoViolations(helper); + should + .Be(Types().That().HaveAnyAttributes([helper.Attribute1, helper.UnusedAttribute])) + .AssertNoViolations(helper); + should + .Be( + Types() + .That() + .HaveAnyAttributes( + helper.Attribute1SystemType, + helper.UnusedAttributeSystemType + ) + ) + .AssertNoViolations(helper); + should + .Be( + Types() + .That() + .HaveAnyAttributes( + [helper.Attribute1SystemType, helper.UnusedAttributeSystemType] + ) + ) + .AssertNoViolations(helper); + should + .Be( + Types() + .That() + .HaveAnyAttributes( + Attributes().That().Are(helper.Attribute1, helper.UnusedAttribute) + ) + ) + .AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should + .BeTypesThat() + .HaveAnyAttributes(helper.Attribute1, helper.UnusedAttribute) + .AssertNoViolations(helper); + should + .BeTypesThat() + .HaveAnyAttributes([helper.Attribute1, helper.UnusedAttribute]) + .AssertNoViolations(helper); + should + .BeTypesThat() + .HaveAnyAttributes(helper.Attribute1SystemType, helper.UnusedAttributeSystemType) + .AssertNoViolations(helper); + should + .BeTypesThat() + .HaveAnyAttributes([helper.Attribute1SystemType, helper.UnusedAttributeSystemType]) + .AssertNoViolations(helper); + should + .BeTypesThat() + .HaveAnyAttributes(Attributes().That().Are(helper.Attribute1, helper.UnusedAttribute)) + .AssertNoViolations(helper); + + helper.AddSnapshotHeader("Multiple inputs"); + + helper.AddSnapshotSubHeader("Conditions"); + Types() + .That() + .Are(helper.ClassWithTwoAttributes, helper.ClassWithThreeAttributes) + .Should() + .HaveAnyAttributes(helper.Attribute1) + .AssertNoViolations(helper); + Types() + .That() + .Are(helper.ClassWithTwoAttributes, helper.ClassWithoutAttributes) + .Should() + .HaveAnyAttributes(helper.Attribute1) + .AssertAnyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + Types() + .That() + .Are(helper.ClassWithTwoAttributes, helper.ClassWithThreeAttributes) + .Should() + .Be(Types().That().HaveAnyAttributes(helper.Attribute1)) + .AssertNoViolations(helper); + Types() + .That() + .Are(helper.ClassWithTwoAttributes, helper.ClassWithoutAttributes) + .Should() + .Be(Types().That().HaveAnyAttributes(helper.Attribute1)) + .AssertAnyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + Types() + .That() + .Are(helper.ClassWithTwoAttributes, helper.ClassWithThreeAttributes) + .Should() + .BeTypesThat() + .HaveAnyAttributes(helper.Attribute1) + .AssertNoViolations(helper); + Types() + .That() + .Are(helper.ClassWithTwoAttributes, helper.ClassWithoutAttributes) + .Should() + .BeTypesThat() + .HaveAnyAttributes(helper.Attribute1) + .AssertAnyViolations(helper); + + await helper.AssertSnapshotMatches(); + } + + [Fact] + public async Task HaveAnyAttributesThatTest() + { + var helper = new AttributeAssemblyTestHelpers(); + helper.AddSnapshotHeader("No violations"); + var should = Types().That().Are(helper.ClassWithTwoAttributes).Should(); + should.HaveAnyAttributesThat().Are(helper.Attribute1).AssertNoViolations(helper); + + helper.AddSnapshotHeader("Violations"); + should = Types().That().Are(helper.ClassWithTwoAttributes).Should(); + should.HaveAnyAttributesThat().Are(helper.UnusedAttribute).AssertOnlyViolations(helper); + await helper.AssertSnapshotMatches(); + } + + [Fact] + public async Task HaveAnyAttributesWithArgumentsTest() + { + var helper = new AttributeAssemblyTestHelpers(); + + helper.AddSnapshotHeader("No violations with type arguments"); + var should = Types().That().Are(helper.ClassWithSingleAttributeWithArguments).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should + .HaveAnyAttributesWithArguments(helper.Attribute1TypeArgumentSystemType) + .AssertNoViolations(helper); + should + .HaveAnyAttributesWithArguments([helper.Attribute1TypeArgumentSystemType]) + .AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should + .Be( + Types() + .That() + .HaveAnyAttributesWithArguments(helper.Attribute1TypeArgumentSystemType) + ) + .AssertNoViolations(helper); + should + .Be( + Types() + .That() + .HaveAnyAttributesWithArguments([helper.Attribute1TypeArgumentSystemType]) + ) + .AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should + .BeTypesThat() + .HaveAnyAttributesWithArguments(helper.Attribute1TypeArgumentSystemType) + .AssertNoViolations(helper); + should + .BeTypesThat() + .HaveAnyAttributesWithArguments([helper.Attribute1TypeArgumentSystemType]) + .AssertNoViolations(helper); + + helper.AddSnapshotHeader("No violations with value arguments"); + should = Types().That().Are(helper.ClassWithSingleAttributeWithArguments).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should + .HaveAnyAttributesWithArguments(helper.Attribute1IntegerArgument) + .AssertNoViolations(helper); + should + .HaveAnyAttributesWithArguments([helper.Attribute1IntegerArgument]) + .AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should + .Be(Types().That().HaveAnyAttributesWithArguments(helper.Attribute1IntegerArgument)) + .AssertNoViolations(helper); + should + .Be(Types().That().HaveAnyAttributesWithArguments([helper.Attribute1IntegerArgument])) + .AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should + .BeTypesThat() + .HaveAnyAttributesWithArguments(helper.Attribute1IntegerArgument) + .AssertNoViolations(helper); + should + .BeTypesThat() + .HaveAnyAttributesWithArguments([helper.Attribute1IntegerArgument]) + .AssertNoViolations(helper); + + helper.AddSnapshotHeader("Violations with type arguments"); + should = Types().That().Are(helper.ClassWithSingleAttributeWithArguments).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should + .HaveAnyAttributesWithArguments(helper.UnusedTypeArgumentSystemType) + .AssertOnlyViolations(helper); + should + .HaveAnyAttributesWithArguments([helper.UnusedTypeArgumentSystemType]) + .AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should + .Be(Types().That().HaveAnyAttributesWithArguments(helper.UnusedTypeArgumentSystemType)) + .AssertOnlyViolations(helper); + should + .Be( + Types().That().HaveAnyAttributesWithArguments([helper.UnusedTypeArgumentSystemType]) + ) + .AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should + .BeTypesThat() + .HaveAnyAttributesWithArguments(helper.UnusedTypeArgumentSystemType) + .AssertOnlyViolations(helper); + should + .BeTypesThat() + .HaveAnyAttributesWithArguments([helper.UnusedTypeArgumentSystemType]) + .AssertOnlyViolations(helper); + + helper.AddSnapshotHeader("Violations with value arguments"); + should = Types().That().Are(helper.ClassWithoutAttributes).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should + .HaveAnyAttributesWithArguments(helper.Attribute1IntegerArgument) + .AssertOnlyViolations(helper); + should + .HaveAnyAttributesWithArguments([helper.Attribute1IntegerArgument]) + .AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should + .Be(Types().That().HaveAnyAttributesWithArguments(helper.Attribute1IntegerArgument)) + .AssertOnlyViolations(helper); + should + .Be(Types().That().HaveAnyAttributesWithArguments([helper.Attribute1IntegerArgument])) + .AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should + .BeTypesThat() + .HaveAnyAttributesWithArguments(helper.Attribute1IntegerArgument) + .AssertOnlyViolations(helper); + should + .BeTypesThat() + .HaveAnyAttributesWithArguments([helper.Attribute1IntegerArgument]) + .AssertOnlyViolations(helper); + + helper.AddSnapshotHeader("Null argument"); + should = Types().That().Are(helper.ClassWithSingleAttributeWithArguments).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should.HaveAnyAttributesWithArguments(null).AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().HaveAnyAttributesWithArguments(null)).AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should.BeTypesThat().HaveAnyAttributesWithArguments(null).AssertOnlyViolations(helper); + + helper.AddSnapshotHeader("Empty arguments"); + + helper.AddSnapshotSubHeader("Conditions"); + Types() + .That() + .Are(helper.ClassWithSingleAttributeWithArguments) + .Should() + .HaveAnyAttributesWithArguments([]) + .AssertNoViolations(helper); + Types() + .That() + .Are(helper.ClassWithTwoAttributesWithArguments) + .Should() + .HaveAnyAttributesWithArguments([]) + .AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + Types() + .That() + .Are(helper.ClassWithSingleAttributeWithArguments) + .Should() + .Be(Types().That().HaveAnyAttributesWithArguments([])) + .AssertNoViolations(helper); + Types() + .That() + .Are(helper.ClassWithTwoAttributesWithArguments) + .Should() + .Be(Types().That().HaveAnyAttributesWithArguments([])) + .AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + Types() + .That() + .Are(helper.ClassWithSingleAttributeWithArguments) + .Should() + .BeTypesThat() + .HaveAnyAttributesWithArguments([]) + .AssertNoViolations(helper); + Types() + .That() + .Are(helper.ClassWithTwoAttributesWithArguments) + .Should() + .BeTypesThat() + .HaveAnyAttributesWithArguments([]) + .AssertNoViolations(helper); + + helper.AddSnapshotHeader("Multiple arguments"); + should = Types().That().Are(helper.ClassWithSingleAttributeWithArguments).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should + .HaveAnyAttributesWithArguments( + [helper.UnusedAttributeIntValue, helper.UnusedAttributeStringValue] + ) + .AssertOnlyViolations(helper); + should + .HaveAnyAttributesWithArguments( + helper.UnusedAttributeIntValue, + helper.UnusedAttributeStringValue + ) + .AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should + .Be( + Types() + .That() + .HaveAnyAttributesWithArguments( + [helper.UnusedAttributeIntValue, helper.UnusedAttributeStringValue] + ) + ) + .AssertOnlyViolations(helper); + should + .Be( + Types() + .That() + .HaveAnyAttributesWithArguments( + helper.UnusedAttributeIntValue, + helper.UnusedAttributeStringValue + ) + ) + .AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should + .BeTypesThat() + .HaveAnyAttributesWithArguments( + [helper.UnusedAttributeIntValue, helper.UnusedAttributeStringValue] + ) + .AssertOnlyViolations(helper); + should + .BeTypesThat() + .HaveAnyAttributesWithArguments( + helper.UnusedAttributeIntValue, + helper.UnusedAttributeStringValue + ) + .AssertOnlyViolations(helper); + + helper.AddSnapshotHeader("Multiple inputs"); + + helper.AddSnapshotSubHeader("Conditions"); + Types() + .That() + .Are( + helper.ClassWithSingleAttributeWithArguments, + helper.ClassWithTwoAttributesWithArguments + ) + .Should() + .HaveAnyAttributesWithArguments(helper.Attribute1StringArgument) + .AssertNoViolations(helper); + Types() + .That() + .Are( + helper.ClassWithSingleAttributeWithArguments, + helper.ClassWithTwoAttributesWithArguments + ) + .Should() + .HaveAnyAttributesWithArguments(helper.Attribute2IntegerArgument) + .AssertAnyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + Types() + .That() + .Are( + helper.ClassWithSingleAttributeWithArguments, + helper.ClassWithTwoAttributesWithArguments + ) + .Should() + .Be(Types().That().HaveAnyAttributesWithArguments(helper.Attribute1StringArgument)) + .AssertNoViolations(helper); + Types() + .That() + .Are( + helper.ClassWithSingleAttributeWithArguments, + helper.ClassWithTwoAttributesWithArguments + ) + .Should() + .Be(Types().That().HaveAnyAttributesWithArguments(helper.Attribute2IntegerArgument)) + .AssertAnyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + Types() + .That() + .Are( + helper.ClassWithSingleAttributeWithArguments, + helper.ClassWithTwoAttributesWithArguments + ) + .Should() + .BeTypesThat() + .HaveAnyAttributesWithArguments(helper.Attribute1StringArgument) + .AssertNoViolations(helper); + Types() + .That() + .Are( + helper.ClassWithSingleAttributeWithArguments, + helper.ClassWithTwoAttributesWithArguments + ) + .Should() + .BeTypesThat() + .HaveAnyAttributesWithArguments(helper.Attribute2IntegerArgument) + .AssertAnyViolations(helper); + + await helper.AssertSnapshotMatches(); + } + + [Fact] + public async Task HaveAnyAttributesWithNamedArguments() + { + var helper = new AttributeAssemblyTestHelpers(); + + helper.AddSnapshotHeader("No violations with type arguments"); + var should = Types().That().Are(helper.ClassWithSingleAttributeWithNamedArguments).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should + .HaveAnyAttributesWithNamedArguments( + ("NamedParameter1", helper.Attribute1TypeArgumentSystemType) + ) + .AssertNoViolations(helper); + should + .HaveAnyAttributesWithNamedArguments( + [("NamedParameter1", helper.Attribute1TypeArgumentSystemType)] + ) + .AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should + .Be( + Types() + .That() + .HaveAnyAttributesWithNamedArguments( + ("NamedParameter1", helper.Attribute1TypeArgumentSystemType) + ) + ) + .AssertNoViolations(helper); + should + .Be( + Types() + .That() + .HaveAnyAttributesWithNamedArguments( + [("NamedParameter1", helper.Attribute1TypeArgumentSystemType)] + ) + ) + .AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should + .BeTypesThat() + .HaveAnyAttributesWithNamedArguments( + ("NamedParameter1", helper.Attribute1TypeArgumentSystemType) + ) + .AssertNoViolations(helper); + should + .BeTypesThat() + .HaveAnyAttributesWithNamedArguments( + [("NamedParameter1", helper.Attribute1TypeArgumentSystemType)] + ) + .AssertNoViolations(helper); + + helper.AddSnapshotHeader("No violations with value arguments"); + should = Types().That().Are(helper.ClassWithSingleAttributeWithNamedArguments).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should + .HaveAnyAttributesWithNamedArguments( + ("NamedParameter2", helper.Attribute1StringArgument) + ) + .AssertNoViolations(helper); + should + .HaveAnyAttributesWithNamedArguments( + [("NamedParameter2", helper.Attribute1StringArgument)] + ) + .AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should + .Be( + Types() + .That() + .HaveAnyAttributesWithNamedArguments( + ("NamedParameter2", helper.Attribute1StringArgument) + ) + ) + .AssertNoViolations(helper); + should + .Be( + Types() + .That() + .HaveAnyAttributesWithNamedArguments( + [("NamedParameter2", helper.Attribute1StringArgument)] + ) + ) + .AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should + .BeTypesThat() + .HaveAnyAttributesWithNamedArguments( + ("NamedParameter2", helper.Attribute1StringArgument) + ) + .AssertNoViolations(helper); + should + .BeTypesThat() + .HaveAnyAttributesWithNamedArguments( + [("NamedParameter2", helper.Attribute1StringArgument)] + ) + .AssertNoViolations(helper); + + helper.AddSnapshotHeader("Violations for attribute without named arguments"); + should = Types().That().Are(helper.ClassWithSingleAttribute).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should + .HaveAnyAttributesWithNamedArguments( + ("NamedParameter1", helper.Attribute1TypeArgumentSystemType) + ) + .AssertOnlyViolations(helper); + should + .HaveAnyAttributesWithNamedArguments( + [("NamedParameter1", helper.Attribute1TypeArgumentSystemType)] + ) + .AssertOnlyViolations(helper); + should + .HaveAnyAttributesWithNamedArguments( + ("NamedParameter2", helper.Attribute1StringArgument) + ) + .AssertOnlyViolations(helper); + should + .HaveAnyAttributesWithNamedArguments( + [("NamedParameter2", helper.Attribute1StringArgument)] + ) + .AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should + .Be( + Types() + .That() + .HaveAnyAttributesWithNamedArguments( + ("NamedParameter1", helper.Attribute1TypeArgumentSystemType) + ) + ) + .AssertOnlyViolations(helper); + should + .Be( + Types() + .That() + .HaveAnyAttributesWithNamedArguments( + [("NamedParameter1", helper.Attribute1TypeArgumentSystemType)] + ) + ) + .AssertOnlyViolations(helper); + should + .Be( + Types() + .That() + .HaveAnyAttributesWithNamedArguments( + ("NamedParameter2", helper.Attribute1StringArgument) + ) + ) + .AssertOnlyViolations(helper); + should + .Be( + Types() + .That() + .HaveAnyAttributesWithNamedArguments( + [("NamedParameter2", helper.Attribute1StringArgument)] + ) + ) + .AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should + .BeTypesThat() + .HaveAnyAttributesWithNamedArguments( + ("NamedParameter1", helper.Attribute1TypeArgumentSystemType) + ) + .AssertOnlyViolations(helper); + should + .BeTypesThat() + .HaveAnyAttributesWithNamedArguments( + [("NamedParameter1", helper.Attribute1TypeArgumentSystemType)] + ) + .AssertOnlyViolations(helper); + should + .BeTypesThat() + .HaveAnyAttributesWithNamedArguments( + ("NamedParameter2", helper.Attribute1StringArgument) + ) + .AssertOnlyViolations(helper); + should + .BeTypesThat() + .HaveAnyAttributesWithNamedArguments( + [("NamedParameter2", helper.Attribute1StringArgument)] + ) + .AssertOnlyViolations(helper); + + helper.AddSnapshotHeader("Violations with type arguments"); + should = Types().That().Are(helper.ClassWithSingleAttributeWithNamedArguments).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should + .HaveAnyAttributesWithNamedArguments( + ("InvalidName", helper.Attribute1TypeArgumentSystemType) + ) + .AssertOnlyViolations(helper); + should + .HaveAnyAttributesWithNamedArguments( + [("InvalidName", helper.Attribute1TypeArgumentSystemType)] + ) + .AssertOnlyViolations(helper); + should + .HaveAnyAttributesWithNamedArguments( + ("NamedParameter1", helper.UnusedTypeArgumentSystemType) + ) + .AssertOnlyViolations(helper); + should + .HaveAnyAttributesWithNamedArguments( + [("NamedParameter1", helper.UnusedTypeArgumentSystemType)] + ) + .AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should + .Be( + Types() + .That() + .HaveAnyAttributesWithNamedArguments( + ("InvalidName", helper.Attribute1TypeArgumentSystemType) + ) + ) + .AssertOnlyViolations(helper); + should + .Be( + Types() + .That() + .HaveAnyAttributesWithNamedArguments( + [("InvalidName", helper.Attribute1TypeArgumentSystemType)] + ) + ) + .AssertOnlyViolations(helper); + should + .Be( + Types() + .That() + .HaveAnyAttributesWithNamedArguments( + ("NamedParameter1", helper.UnusedTypeArgumentSystemType) + ) + ) + .AssertOnlyViolations(helper); + should + .Be( + Types() + .That() + .HaveAnyAttributesWithNamedArguments( + [("NamedParameter1", helper.UnusedTypeArgumentSystemType)] + ) + ) + .AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should + .BeTypesThat() + .HaveAnyAttributesWithNamedArguments( + ("InvalidName", helper.Attribute1TypeArgumentSystemType) + ) + .AssertOnlyViolations(helper); + should + .BeTypesThat() + .HaveAnyAttributesWithNamedArguments( + [("InvalidName", helper.Attribute1TypeArgumentSystemType)] + ) + .AssertOnlyViolations(helper); + should + .BeTypesThat() + .HaveAnyAttributesWithNamedArguments( + ("NamedParameter1", helper.UnusedTypeArgumentSystemType) + ) + .AssertOnlyViolations(helper); + should + .BeTypesThat() + .HaveAnyAttributesWithNamedArguments( + [("NamedParameter1", helper.UnusedTypeArgumentSystemType)] + ) + .AssertOnlyViolations(helper); + + helper.AddSnapshotHeader("Violations with value arguments"); + should = Types().That().Are(helper.ClassWithSingleAttributeWithNamedArguments).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should + .HaveAnyAttributesWithNamedArguments(("InvalidName", helper.Attribute1StringArgument)) + .AssertOnlyViolations(helper); + should + .HaveAnyAttributesWithNamedArguments([("InvalidName", helper.Attribute1StringArgument)]) + .AssertOnlyViolations(helper); + should + .HaveAnyAttributesWithNamedArguments( + ("NamedParameter2", helper.UnusedAttributeStringValue) + ) + .AssertOnlyViolations(helper); + should + .HaveAnyAttributesWithNamedArguments( + [("NamedParameter2", helper.UnusedAttributeStringValue)] + ) + .AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should + .Be( + Types() + .That() + .HaveAnyAttributesWithNamedArguments( + ("InvalidName", helper.Attribute1StringArgument) + ) + ) + .AssertOnlyViolations(helper); + should + .Be( + Types() + .That() + .HaveAnyAttributesWithNamedArguments( + [("InvalidName", helper.Attribute1StringArgument)] + ) + ) + .AssertOnlyViolations(helper); + should + .Be( + Types() + .That() + .HaveAnyAttributesWithNamedArguments( + ("NamedParameter2", helper.UnusedAttributeStringValue) + ) + ) + .AssertOnlyViolations(helper); + should + .Be( + Types() + .That() + .HaveAnyAttributesWithNamedArguments( + [("NamedParameter2", helper.UnusedAttributeStringValue)] + ) + ) + .AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should + .BeTypesThat() + .HaveAnyAttributesWithNamedArguments(("InvalidName", helper.Attribute1StringArgument)) + .AssertOnlyViolations(helper); + should + .BeTypesThat() + .HaveAnyAttributesWithNamedArguments([("InvalidName", helper.Attribute1StringArgument)]) + .AssertOnlyViolations(helper); + should + .BeTypesThat() + .HaveAnyAttributesWithNamedArguments( + ("NamedParameter2", helper.UnusedAttributeStringValue) + ) + .AssertOnlyViolations(helper); + should + .BeTypesThat() + .HaveAnyAttributesWithNamedArguments( + [("NamedParameter2", helper.UnusedAttributeStringValue)] + ) + .AssertOnlyViolations(helper); + + helper.AddSnapshotHeader("Empty arguments"); + should = Types().That().Are(helper.ClassWithSingleAttributeWithNamedArguments).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should.HaveAnyAttributesWithNamedArguments([]).AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should + .Be(Types().That().HaveAnyAttributesWithNamedArguments([])) + .AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should.BeTypesThat().HaveAnyAttributesWithNamedArguments([]).AssertNoViolations(helper); + + helper.AddSnapshotHeader("Multiple arguments"); + should = Types().That().Are(helper.ClassWithSingleAttributeWithNamedArguments).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should + .HaveAnyAttributesWithNamedArguments( + ("NamedParameter1", helper.Attribute1TypeArgumentSystemType), + ("NamedParameter2", helper.Attribute1StringArgument) + ) + .AssertNoViolations(helper); + should + .HaveAnyAttributesWithNamedArguments( + [ + ("NamedParameter1", helper.Attribute1TypeArgumentSystemType), + ("NamedParameter2", helper.Attribute1StringArgument), + ] + ) + .AssertNoViolations(helper); + should + .HaveAnyAttributesWithNamedArguments( + ("NamedParameter1", helper.Attribute1TypeArgumentSystemType), + ("NamedParameter2", helper.UnusedAttributeStringValue) + ) + .AssertOnlyViolations(helper); + should + .HaveAnyAttributesWithNamedArguments( + [ + ("NamedParameter1", helper.Attribute1TypeArgumentSystemType), + ("NamedParameter2", helper.UnusedAttributeStringValue), + ] + ) + .AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should + .Be( + Types() + .That() + .HaveAnyAttributesWithNamedArguments( + ("NamedParameter1", helper.Attribute1TypeArgumentSystemType), + ("NamedParameter2", helper.Attribute1StringArgument) + ) + ) + .AssertNoViolations(helper); + should + .Be( + Types() + .That() + .HaveAnyAttributesWithNamedArguments( + [ + ("NamedParameter1", helper.Attribute1TypeArgumentSystemType), + ("NamedParameter2", helper.Attribute1StringArgument), + ] + ) + ) + .AssertNoViolations(helper); + should + .Be( + Types() + .That() + .HaveAnyAttributesWithNamedArguments( + ("NamedParameter1", helper.Attribute1TypeArgumentSystemType), + ("NamedParameter2", helper.UnusedAttributeStringValue) + ) + ) + .AssertOnlyViolations(helper); + should + .Be( + Types() + .That() + .HaveAnyAttributesWithNamedArguments( + [ + ("NamedParameter1", helper.Attribute1TypeArgumentSystemType), + ("NamedParameter2", helper.UnusedAttributeStringValue), + ] + ) + ) + .AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should + .BeTypesThat() + .HaveAnyAttributesWithNamedArguments( + ("NamedParameter1", helper.Attribute1TypeArgumentSystemType), + ("NamedParameter2", helper.Attribute1StringArgument) + ) + .AssertNoViolations(helper); + should + .BeTypesThat() + .HaveAnyAttributesWithNamedArguments( + [ + ("NamedParameter1", helper.Attribute1TypeArgumentSystemType), + ("NamedParameter2", helper.Attribute1StringArgument), + ] + ) + .AssertNoViolations(helper); + should + .BeTypesThat() + .HaveAnyAttributesWithNamedArguments( + ("NamedParameter1", helper.Attribute1TypeArgumentSystemType), + ("NamedParameter2", helper.UnusedAttributeStringValue) + ) + .AssertOnlyViolations(helper); + should + .BeTypesThat() + .HaveAnyAttributesWithNamedArguments( + [ + ("NamedParameter1", helper.Attribute1TypeArgumentSystemType), + ("NamedParameter2", helper.UnusedAttributeStringValue), + ] + ) + .AssertOnlyViolations(helper); + + helper.AddSnapshotHeader("Multiple inputs"); + should = Types() + .That() + .Are( + helper.ClassWithSingleAttributeWithNamedArguments, + helper.ClassWithTwoAttributesWithNamedArguments + ) + .Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should + .HaveAnyAttributesWithNamedArguments( + ("NamedParameter1", helper.Attribute1TypeArgumentSystemType) + ) + .AssertNoViolations(helper); + should + .HaveAnyAttributesWithNamedArguments( + [("NamedParameter3", helper.Attribute2TypeArgumentSystemType)] + ) + .AssertAnyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should + .Be( + Types() + .That() + .HaveAnyAttributesWithNamedArguments( + ("NamedParameter1", helper.Attribute1TypeArgumentSystemType) + ) + ) + .AssertNoViolations(helper); + should + .Be( + Types() + .That() + .HaveAnyAttributesWithNamedArguments( + [("NamedParameter3", helper.Attribute2TypeArgumentSystemType)] + ) + ) + .AssertAnyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should + .BeTypesThat() + .HaveAnyAttributesWithNamedArguments( + ("NamedParameter1", helper.Attribute1TypeArgumentSystemType) + ) + .AssertNoViolations(helper); + should + .BeTypesThat() + .HaveAnyAttributesWithNamedArguments( + [("NamedParameter3", helper.Attribute2TypeArgumentSystemType)] + ) + .AssertAnyViolations(helper); + + await helper.AssertSnapshotMatches(); + } + + [Fact] + public async Task HaveAttributeWithArgumentsTest() + { + var helper = new AttributeAssemblyTestHelpers(); + + helper.AddSnapshotHeader("No violations with type arguments"); + var should = Types().That().Are(helper.ClassWithSingleAttributeWithArguments).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should + .HaveAttributeWithArguments(helper.Attribute1, helper.Attribute1TypeArgumentSystemType) + .AssertNoViolations(helper); + should + .HaveAttributeWithArguments( + helper.Attribute1, + [helper.Attribute1TypeArgumentSystemType] + ) + .AssertNoViolations(helper); + should + .HaveAttributeWithArguments( + helper.Attribute1SystemType, + helper.Attribute1TypeArgumentSystemType + ) + .AssertNoViolations(helper); + should + .HaveAttributeWithArguments( + helper.Attribute1SystemType, + [helper.Attribute1TypeArgumentSystemType] + ) + .AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should + .Be( + Types() + .That() + .HaveAttributeWithArguments( + helper.Attribute1, + helper.Attribute1TypeArgumentSystemType + ) + ) + .AssertNoViolations(helper); + should + .Be( + Types() + .That() + .HaveAttributeWithArguments( + helper.Attribute1, + helper.Attribute1TypeArgumentSystemType + ) + ) + .AssertNoViolations(helper); + should + .Be( + Types() + .That() + .HaveAttributeWithArguments( + helper.Attribute1SystemType, + helper.Attribute1TypeArgumentSystemType + ) + ) + .AssertNoViolations(helper); + should + .Be( + Types() + .That() + .HaveAttributeWithArguments( + helper.Attribute1SystemType, + [helper.Attribute1TypeArgumentSystemType] + ) + ) + .AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should + .BeTypesThat() + .HaveAttributeWithArguments(helper.Attribute1, helper.Attribute1TypeArgumentSystemType) + .AssertNoViolations(helper); + should + .BeTypesThat() + .HaveAttributeWithArguments( + helper.Attribute1, + [helper.Attribute1TypeArgumentSystemType] + ) + .AssertNoViolations(helper); + should + .BeTypesThat() + .HaveAttributeWithArguments( + helper.Attribute1SystemType, + helper.Attribute1TypeArgumentSystemType + ) + .AssertNoViolations(helper); + should + .BeTypesThat() + .HaveAttributeWithArguments( + helper.Attribute1SystemType, + [helper.Attribute1TypeArgumentSystemType] + ) + .AssertNoViolations(helper); + + helper.AddSnapshotHeader("No violations with value arguments"); + should = Types().That().Are(helper.ClassWithSingleAttributeWithArguments).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should + .HaveAttributeWithArguments(helper.Attribute1, helper.Attribute1StringArgument) + .AssertNoViolations(helper); + should + .HaveAttributeWithArguments(helper.Attribute1, [helper.Attribute1StringArgument]) + .AssertNoViolations(helper); + should + .HaveAttributeWithArguments( + helper.Attribute1SystemType, + helper.Attribute1StringArgument + ) + .AssertNoViolations(helper); + should + .HaveAttributeWithArguments( + helper.Attribute1SystemType, + [helper.Attribute1StringArgument] + ) + .AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should + .Be( + Types() + .That() + .HaveAttributeWithArguments(helper.Attribute1, helper.Attribute1StringArgument) + ) + .AssertNoViolations(helper); + should + .Be( + Types() + .That() + .HaveAttributeWithArguments( + helper.Attribute1, + [helper.Attribute1StringArgument] + ) + ) + .AssertNoViolations(helper); + should + .Be( + Types() + .That() + .HaveAttributeWithArguments( + helper.Attribute1SystemType, + helper.Attribute1StringArgument + ) + ) + .AssertNoViolations(helper); + should + .Be( + Types() + .That() + .HaveAttributeWithArguments( + helper.Attribute1SystemType, + [helper.Attribute1StringArgument] + ) + ) + .AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should + .BeTypesThat() + .HaveAttributeWithArguments(helper.Attribute1, helper.Attribute1StringArgument) + .AssertNoViolations(helper); + should + .BeTypesThat() + .HaveAttributeWithArguments(helper.Attribute1, [helper.Attribute1StringArgument]) + .AssertNoViolations(helper); + should + .BeTypesThat() + .HaveAttributeWithArguments( + helper.Attribute1SystemType, + helper.Attribute1StringArgument + ) + .AssertNoViolations(helper); + should + .BeTypesThat() + .HaveAttributeWithArguments( + helper.Attribute1SystemType, + [helper.Attribute1StringArgument] + ) + .AssertNoViolations(helper); + + helper.AddSnapshotHeader("Violations for wrong attribute"); + should = Types().That().Are(helper.ClassWithSingleAttributeWithArguments).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should + .HaveAttributeWithArguments( + helper.UnusedAttribute, + helper.Attribute1TypeArgumentSystemType + ) + .AssertOnlyViolations(helper); + should + .HaveAttributeWithArguments( + helper.UnusedAttribute, + [helper.Attribute1TypeArgumentSystemType] + ) + .AssertOnlyViolations(helper); + should + .HaveAttributeWithArguments( + helper.UnusedAttributeSystemType, + helper.Attribute1TypeArgumentSystemType + ) + .AssertOnlyViolations(helper); + should + .HaveAttributeWithArguments( + helper.UnusedAttributeSystemType, + [helper.Attribute1TypeArgumentSystemType] + ) + .AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should + .Be( + Types() + .That() + .HaveAttributeWithArguments( + helper.UnusedAttribute, + helper.Attribute1TypeArgumentSystemType + ) + ) + .AssertOnlyViolations(helper); + should + .Be( + Types() + .That() + .HaveAttributeWithArguments( + helper.UnusedAttribute, + [helper.Attribute1TypeArgumentSystemType] + ) + ) + .AssertOnlyViolations(helper); + should + .Be( + Types() + .That() + .HaveAttributeWithArguments( + helper.UnusedAttributeSystemType, + helper.Attribute1TypeArgumentSystemType + ) + ) + .AssertOnlyViolations(helper); + should + .Be( + Types() + .That() + .HaveAttributeWithArguments( + helper.UnusedAttributeSystemType, + [helper.Attribute1TypeArgumentSystemType] + ) + ) + .AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should + .BeTypesThat() + .HaveAttributeWithArguments( + helper.UnusedAttribute, + helper.Attribute1TypeArgumentSystemType + ) + .AssertOnlyViolations(helper); + should + .BeTypesThat() + .HaveAttributeWithArguments( + helper.UnusedAttribute, + [helper.Attribute1TypeArgumentSystemType] + ) + .AssertOnlyViolations(helper); + should + .BeTypesThat() + .HaveAttributeWithArguments( + helper.UnusedAttributeSystemType, + helper.Attribute1TypeArgumentSystemType + ) + .AssertOnlyViolations(helper); + should + .BeTypesThat() + .HaveAttributeWithArguments( + helper.UnusedAttributeSystemType, + [helper.Attribute1TypeArgumentSystemType] + ) + .AssertOnlyViolations(helper); + + helper.AddSnapshotHeader("Violations with type arguments"); + should = Types().That().Are(helper.ClassWithSingleAttributeWithArguments).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should + .HaveAttributeWithArguments(helper.Attribute1, helper.UnusedTypeArgumentSystemType) + .AssertOnlyViolations(helper); + should + .HaveAttributeWithArguments(helper.Attribute1, [helper.UnusedTypeArgumentSystemType]) + .AssertOnlyViolations(helper); + should + .HaveAttributeWithArguments( + helper.Attribute1SystemType, + helper.UnusedTypeArgumentSystemType + ) + .AssertOnlyViolations(helper); + should + .HaveAttributeWithArguments( + helper.Attribute1SystemType, + [helper.UnusedTypeArgumentSystemType] + ) + .AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should + .Be( + Types() + .That() + .HaveAttributeWithArguments( + helper.Attribute1, + helper.UnusedTypeArgumentSystemType + ) + ) + .AssertOnlyViolations(helper); + should + .Be( + Types() + .That() + .HaveAttributeWithArguments( + helper.Attribute1, + [helper.UnusedTypeArgumentSystemType] + ) + ) + .AssertOnlyViolations(helper); + should + .Be( + Types() + .That() + .HaveAttributeWithArguments( + helper.Attribute1SystemType, + helper.UnusedTypeArgumentSystemType + ) + ) + .AssertOnlyViolations(helper); + should + .Be( + Types() + .That() + .HaveAttributeWithArguments( + helper.Attribute1SystemType, + [helper.UnusedTypeArgumentSystemType] + ) + ) + .AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should + .BeTypesThat() + .HaveAttributeWithArguments(helper.Attribute1, helper.UnusedTypeArgumentSystemType) + .AssertOnlyViolations(helper); + should + .BeTypesThat() + .HaveAttributeWithArguments(helper.Attribute1, [helper.UnusedTypeArgumentSystemType]) + .AssertOnlyViolations(helper); + should + .BeTypesThat() + .HaveAttributeWithArguments( + helper.Attribute1SystemType, + helper.UnusedTypeArgumentSystemType + ) + .AssertOnlyViolations(helper); + should + .BeTypesThat() + .HaveAttributeWithArguments( + helper.Attribute1SystemType, + [helper.UnusedTypeArgumentSystemType] + ) + .AssertOnlyViolations(helper); + + helper.AddSnapshotHeader("Violations with value arguments"); + should = Types().That().Are(helper.ClassWithSingleAttributeWithArguments).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should + .HaveAttributeWithArguments(helper.Attribute1, helper.Attribute2StringArgument) + .AssertOnlyViolations(helper); + should + .HaveAttributeWithArguments(helper.Attribute1, [helper.Attribute2StringArgument]) + .AssertOnlyViolations(helper); + should + .HaveAttributeWithArguments( + helper.Attribute1SystemType, + helper.Attribute2StringArgument + ) + .AssertOnlyViolations(helper); + should + .HaveAttributeWithArguments( + helper.Attribute1SystemType, + [helper.Attribute2StringArgument] + ) + .AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should + .Be( + Types() + .That() + .HaveAttributeWithArguments(helper.Attribute1, helper.Attribute2StringArgument) + ) + .AssertOnlyViolations(helper); + should + .Be( + Types() + .That() + .HaveAttributeWithArguments( + helper.Attribute1, + [helper.Attribute2StringArgument] + ) + ) + .AssertOnlyViolations(helper); + should + .Be( + Types() + .That() + .HaveAttributeWithArguments( + helper.Attribute1SystemType, + helper.Attribute2StringArgument + ) + ) + .AssertOnlyViolations(helper); + should + .Be( + Types() + .That() + .HaveAttributeWithArguments( + helper.Attribute1SystemType, + [helper.Attribute2StringArgument] + ) + ) + .AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should + .BeTypesThat() + .HaveAttributeWithArguments(helper.Attribute1, helper.Attribute2StringArgument) + .AssertOnlyViolations(helper); + should + .BeTypesThat() + .HaveAttributeWithArguments(helper.Attribute1, [helper.Attribute2StringArgument]) + .AssertOnlyViolations(helper); + should + .BeTypesThat() + .HaveAttributeWithArguments( + helper.Attribute1SystemType, + helper.Attribute2StringArgument + ) + .AssertOnlyViolations(helper); + should + .BeTypesThat() + .HaveAttributeWithArguments( + helper.Attribute1SystemType, + [helper.Attribute2StringArgument] + ) + .AssertOnlyViolations(helper); + + helper.AddSnapshotHeader("Type outside of architecture"); + should = Types().That().Are(helper.ClassWithSingleAttributeWithArguments).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should + .HaveAttributeWithArguments( + typeof(TypeDependencyNamespace.BaseClass), + helper.Attribute1StringArgument + ) + .AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should + .Be( + Types() + .That() + .HaveAttributeWithArguments( + typeof(TypeDependencyNamespace.BaseClass), + helper.Attribute1StringArgument + ) + ) + .AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should + .BeTypesThat() + .HaveAttributeWithArguments( + typeof(TypeDependencyNamespace.BaseClass), + helper.Attribute1StringArgument + ) + .AssertOnlyViolations(helper); + + helper.AddSnapshotHeader("Null argument"); + should = Types().That().Are(helper.ClassWithSingleAttributeWithArguments).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should.HaveAttributeWithArguments(helper.Attribute1, null).AssertOnlyViolations(helper); + should + .HaveAttributeWithArguments(helper.Attribute1SystemType, null) + .AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should + .Be(Types().That().HaveAttributeWithArguments(helper.Attribute1, null)) + .AssertOnlyViolations(helper); + should + .Be(Types().That().HaveAttributeWithArguments(helper.Attribute1SystemType, null)) + .AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should + .BeTypesThat() + .HaveAttributeWithArguments(helper.Attribute1, null) + .AssertOnlyViolations(helper); + should + .BeTypesThat() + .HaveAttributeWithArguments(helper.Attribute1SystemType, null) + .AssertOnlyViolations(helper); + + helper.AddSnapshotHeader("Empty arguments"); + should = Types().That().Are(helper.ClassWithSingleAttributeWithArguments).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should + .HaveAttributeWithArguments(helper.Attribute1, new List()) + .AssertNoViolations(helper); + should + .HaveAttributeWithArguments(helper.Attribute1SystemType, new List()) + .AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should + .Be(Types().That().HaveAttributeWithArguments(helper.Attribute1, new List())) + .AssertNoViolations(helper); + should + .Be( + Types() + .That() + .HaveAttributeWithArguments(helper.Attribute1SystemType, new List()) + ) + .AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should + .BeTypesThat() + .HaveAttributeWithArguments(helper.Attribute1, new List()) + .AssertNoViolations(helper); + should + .BeTypesThat() + .HaveAttributeWithArguments(helper.Attribute1SystemType, new List()) + .AssertNoViolations(helper); + + helper.AddSnapshotHeader("Multiple arguments"); + should = Types().That().Are(helper.ClassWithSingleAttributeWithArguments).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should + .HaveAttributeWithArguments( + helper.Attribute1, + helper.Attribute1StringArgument, + helper.Attribute1IntegerArgument + ) + .AssertNoViolations(helper); + should + .HaveAttributeWithArguments( + helper.Attribute1, + [helper.Attribute1StringArgument, helper.Attribute1IntegerArgument] + ) + .AssertNoViolations(helper); + should + .HaveAttributeWithArguments( + helper.Attribute1SystemType, + helper.Attribute1StringArgument, + helper.Attribute1IntegerArgument + ) + .AssertNoViolations(helper); + should + .HaveAttributeWithArguments( + helper.Attribute1SystemType, + [helper.Attribute1StringArgument, helper.Attribute1IntegerArgument] + ) + .AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should + .Be( + Types() + .That() + .HaveAttributeWithArguments( + helper.Attribute1, + helper.Attribute1StringArgument, + helper.Attribute1IntegerArgument + ) + ) + .AssertNoViolations(helper); + should + .Be( + Types() + .That() + .HaveAttributeWithArguments( + helper.Attribute1, + [helper.Attribute1StringArgument, helper.Attribute1IntegerArgument] + ) + ) + .AssertNoViolations(helper); + should + .Be( + Types() + .That() + .HaveAttributeWithArguments( + helper.Attribute1SystemType, + helper.Attribute1StringArgument, + helper.Attribute1IntegerArgument + ) + ) + .AssertNoViolations(helper); + should + .Be( + Types() + .That() + .HaveAttributeWithArguments( + helper.Attribute1SystemType, + [helper.Attribute1StringArgument, helper.Attribute1IntegerArgument] + ) + ) + .AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should + .BeTypesThat() + .HaveAttributeWithArguments( + helper.Attribute1, + helper.Attribute1StringArgument, + helper.Attribute1IntegerArgument + ) + .AssertNoViolations(helper); + should + .BeTypesThat() + .HaveAttributeWithArguments( + helper.Attribute1, + [helper.Attribute1StringArgument, helper.Attribute1IntegerArgument] + ) + .AssertNoViolations(helper); + should + .BeTypesThat() + .HaveAttributeWithArguments( + helper.Attribute1SystemType, + helper.Attribute1StringArgument, + helper.Attribute1IntegerArgument + ) + .AssertNoViolations(helper); + should + .BeTypesThat() + .HaveAttributeWithArguments( + helper.Attribute1SystemType, + [helper.Attribute1StringArgument, helper.Attribute1IntegerArgument] + ) + .AssertNoViolations(helper); + + helper.AddSnapshotHeader("Multiple inputs"); + should = Types() + .That() + .Are( + helper.ClassWithSingleAttributeWithArguments, + helper.ClassWithTwoAttributesWithArguments + ) + .Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should + .HaveAttributeWithArguments(helper.Attribute1, helper.Attribute1StringArgument) + .AssertNoViolations(helper); + should + .HaveAttributeWithArguments(helper.Attribute2, helper.Attribute2IntegerArgument) + .AssertAnyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should + .Be( + Types() + .That() + .HaveAttributeWithArguments(helper.Attribute1, helper.Attribute1StringArgument) + ) + .AssertNoViolations(helper); + should + .Be( + Types() + .That() + .HaveAttributeWithArguments(helper.Attribute2, helper.Attribute2IntegerArgument) + ) + .AssertAnyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should + .BeTypesThat() + .HaveAttributeWithArguments(helper.Attribute1, helper.Attribute1StringArgument) + .AssertNoViolations(helper); + should + .BeTypesThat() + .HaveAttributeWithArguments(helper.Attribute2, helper.Attribute2IntegerArgument) + .AssertAnyViolations(helper); + + await helper.AssertSnapshotMatches(); + } + + [Fact] + public async Task HaveAttributeWithNamedArguments() + { + var helper = new AttributeAssemblyTestHelpers(); + + helper.AddSnapshotHeader("No violations with type arguments"); + var should = Types().That().Are(helper.ClassWithSingleAttributeWithNamedArguments).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should + .HaveAttributeWithNamedArguments( + helper.Attribute1, + ("NamedParameter1", helper.Attribute1TypeArgumentSystemType) + ) + .AssertNoViolations(helper); + should + .HaveAttributeWithNamedArguments( + helper.Attribute1, + [("NamedParameter1", helper.Attribute1TypeArgumentSystemType)] + ) + .AssertNoViolations(helper); + should + .HaveAttributeWithNamedArguments( + helper.Attribute1SystemType, + ("NamedParameter1", helper.Attribute1TypeArgumentSystemType) + ) + .AssertNoViolations(helper); + should + .HaveAttributeWithNamedArguments( + helper.Attribute1SystemType, + [("NamedParameter1", helper.Attribute1TypeArgumentSystemType)] + ) + .AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should + .Be( + Types() + .That() + .HaveAttributeWithNamedArguments( + helper.Attribute1, + ("NamedParameter1", helper.Attribute1TypeArgumentSystemType) + ) + ) + .AssertNoViolations(helper); + should + .Be( + Types() + .That() + .HaveAttributeWithNamedArguments( + helper.Attribute1, + [("NamedParameter1", helper.Attribute1TypeArgumentSystemType)] + ) + ) + .AssertNoViolations(helper); + should + .Be( + Types() + .That() + .HaveAttributeWithNamedArguments( + helper.Attribute1SystemType, + ("NamedParameter1", helper.Attribute1TypeArgumentSystemType) + ) + ) + .AssertNoViolations(helper); + should + .Be( + Types() + .That() + .HaveAttributeWithNamedArguments( + helper.Attribute1SystemType, + [("NamedParameter1", helper.Attribute1TypeArgumentSystemType)] + ) + ) + .AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should + .BeTypesThat() + .HaveAttributeWithNamedArguments( + helper.Attribute1, + ("NamedParameter1", helper.Attribute1TypeArgumentSystemType) + ) + .AssertNoViolations(helper); + should + .BeTypesThat() + .HaveAttributeWithNamedArguments( + helper.Attribute1, + [("NamedParameter1", helper.Attribute1TypeArgumentSystemType)] + ) + .AssertNoViolations(helper); + should + .BeTypesThat() + .HaveAttributeWithNamedArguments( + helper.Attribute1SystemType, + ("NamedParameter1", helper.Attribute1TypeArgumentSystemType) + ) + .AssertNoViolations(helper); + should + .BeTypesThat() + .HaveAttributeWithNamedArguments( + helper.Attribute1SystemType, + [("NamedParameter1", helper.Attribute1TypeArgumentSystemType)] + ) + .AssertNoViolations(helper); + + helper.AddSnapshotHeader("No violations with value arguments"); + should = Types().That().Are(helper.ClassWithSingleAttributeWithNamedArguments).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should + .HaveAttributeWithNamedArguments( + helper.Attribute1, + ("NamedParameter2", helper.Attribute1StringArgument) + ) + .AssertNoViolations(helper); + should + .HaveAttributeWithNamedArguments( + helper.Attribute1, + [("NamedParameter2", helper.Attribute1StringArgument)] + ) + .AssertNoViolations(helper); + should + .HaveAttributeWithNamedArguments( + helper.Attribute1SystemType, + ("NamedParameter2", helper.Attribute1StringArgument) + ) + .AssertNoViolations(helper); + should + .HaveAttributeWithNamedArguments( + helper.Attribute1SystemType, + [("NamedParameter2", helper.Attribute1StringArgument)] + ) + .AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should + .Be( + Types() + .That() + .HaveAttributeWithNamedArguments( + helper.Attribute1, + ("NamedParameter2", helper.Attribute1StringArgument) + ) + ) + .AssertNoViolations(helper); + should + .Be( + Types() + .That() + .HaveAttributeWithNamedArguments( + helper.Attribute1, + [("NamedParameter2", helper.Attribute1StringArgument)] + ) + ) + .AssertNoViolations(helper); + should + .Be( + Types() + .That() + .HaveAttributeWithNamedArguments( + helper.Attribute1SystemType, + ("NamedParameter2", helper.Attribute1StringArgument) + ) + ) + .AssertNoViolations(helper); + should + .Be( + Types() + .That() + .HaveAttributeWithNamedArguments( + helper.Attribute1SystemType, + [("NamedParameter2", helper.Attribute1StringArgument)] + ) + ) + .AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should + .BeTypesThat() + .HaveAttributeWithNamedArguments( + helper.Attribute1, + ("NamedParameter2", helper.Attribute1StringArgument) + ) + .AssertNoViolations(helper); + should + .BeTypesThat() + .HaveAttributeWithNamedArguments( + helper.Attribute1, + [("NamedParameter2", helper.Attribute1StringArgument)] + ) + .AssertNoViolations(helper); + should + .BeTypesThat() + .HaveAttributeWithNamedArguments( + helper.Attribute1SystemType, + ("NamedParameter2", helper.Attribute1StringArgument) + ) + .AssertNoViolations(helper); + should + .BeTypesThat() + .HaveAttributeWithNamedArguments( + helper.Attribute1SystemType, + [("NamedParameter2", helper.Attribute1StringArgument)] + ) + .AssertNoViolations(helper); + + helper.AddSnapshotHeader("Violations for attribute without named arguments"); + should = Types().That().Are(helper.ClassWithSingleAttribute).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should + .HaveAttributeWithNamedArguments( + helper.Attribute1, + ("NamedParameter1", helper.Attribute1TypeArgumentSystemType) + ) + .AssertOnlyViolations(helper); + should + .HaveAttributeWithNamedArguments( + helper.Attribute1, + [("NamedParameter1", helper.Attribute1TypeArgumentSystemType)] + ) + .AssertOnlyViolations(helper); + should + .HaveAttributeWithNamedArguments( + helper.Attribute1SystemType, + ("NamedParameter1", helper.Attribute1TypeArgumentSystemType) + ) + .AssertOnlyViolations(helper); + should + .HaveAttributeWithNamedArguments( + helper.Attribute1SystemType, + [("NamedParameter1", helper.Attribute1TypeArgumentSystemType)] + ) + .AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should + .Be( + Types() + .That() + .HaveAttributeWithNamedArguments( + helper.Attribute1, + ("NamedParameter1", helper.Attribute1TypeArgumentSystemType) + ) + ) + .AssertOnlyViolations(helper); + should + .Be( + Types() + .That() + .HaveAttributeWithNamedArguments( + helper.Attribute1, + [("NamedParameter1", helper.Attribute1TypeArgumentSystemType)] + ) + ) + .AssertOnlyViolations(helper); + should + .Be( + Types() + .That() + .HaveAttributeWithNamedArguments( + helper.Attribute1SystemType, + ("NamedParameter1", helper.Attribute1TypeArgumentSystemType) + ) + ) + .AssertOnlyViolations(helper); + should + .Be( + Types() + .That() + .HaveAttributeWithNamedArguments( + helper.Attribute1SystemType, + [("NamedParameter1", helper.Attribute1TypeArgumentSystemType)] + ) + ) + .AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should + .BeTypesThat() + .HaveAttributeWithNamedArguments( + helper.Attribute1, + ("NamedParameter1", helper.Attribute1TypeArgumentSystemType) + ) + .AssertOnlyViolations(helper); + should + .BeTypesThat() + .HaveAttributeWithNamedArguments( + helper.Attribute1, + [("NamedParameter1", helper.Attribute1TypeArgumentSystemType)] + ) + .AssertOnlyViolations(helper); + should + .BeTypesThat() + .HaveAttributeWithNamedArguments( + helper.Attribute1SystemType, + ("NamedParameter1", helper.Attribute1TypeArgumentSystemType) + ) + .AssertOnlyViolations(helper); + should + .BeTypesThat() + .HaveAttributeWithNamedArguments( + helper.Attribute1SystemType, + [("NamedParameter1", helper.Attribute1TypeArgumentSystemType)] + ) + .AssertOnlyViolations(helper); + + helper.AddSnapshotHeader("Violations with type arguments"); + should = Types().That().Are(helper.ClassWithSingleAttributeWithNamedArguments).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should + .HaveAttributeWithNamedArguments( + helper.Attribute1, + ("InvalidName", helper.Attribute1TypeArgumentSystemType) + ) + .AssertOnlyViolations(helper); + should + .HaveAttributeWithNamedArguments( + helper.Attribute1, + [("InvalidName", helper.Attribute1TypeArgumentSystemType)] + ) + .AssertOnlyViolations(helper); + should + .HaveAttributeWithNamedArguments( + helper.Attribute1, + ("NamedParameter1", helper.UnusedTypeArgumentSystemType) + ) + .AssertOnlyViolations(helper); + should + .HaveAttributeWithNamedArguments( + helper.Attribute1, + [("NamedParameter1", helper.UnusedTypeArgumentSystemType)] + ) + .AssertOnlyViolations(helper); + should + .HaveAttributeWithNamedArguments( + helper.Attribute1SystemType, + ("NamedParameter1", helper.UnusedTypeArgumentSystemType) + ) + .AssertOnlyViolations(helper); + should + .HaveAttributeWithNamedArguments( + helper.Attribute1SystemType, + [("NamedParameter1", helper.UnusedTypeArgumentSystemType)] + ) + .AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should + .Be( + Types() + .That() + .HaveAttributeWithNamedArguments( + helper.Attribute1, + ("InvalidName", helper.Attribute1TypeArgumentSystemType) + ) + ) + .AssertOnlyViolations(helper); + should + .Be( + Types() + .That() + .HaveAttributeWithNamedArguments( + helper.Attribute1, + [("InvalidName", helper.Attribute1TypeArgumentSystemType)] + ) + ) + .AssertOnlyViolations(helper); + should + .Be( + Types() + .That() + .HaveAttributeWithNamedArguments( + helper.Attribute1, + ("NamedParameter1", helper.UnusedTypeArgumentSystemType) + ) + ) + .AssertOnlyViolations(helper); + should + .Be( + Types() + .That() + .HaveAttributeWithNamedArguments( + helper.Attribute1, + [("NamedParameter1", helper.UnusedTypeArgumentSystemType)] + ) + ) + .AssertOnlyViolations(helper); + should + .Be( + Types() + .That() + .HaveAttributeWithNamedArguments( + helper.Attribute1SystemType, + ("NamedParameter1", helper.UnusedTypeArgumentSystemType) + ) + ) + .AssertOnlyViolations(helper); + should + .Be( + Types() + .That() + .HaveAttributeWithNamedArguments( + helper.Attribute1SystemType, + [("NamedParameter1", helper.UnusedTypeArgumentSystemType)] + ) + ) + .AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should + .BeTypesThat() + .HaveAttributeWithNamedArguments( + helper.Attribute1, + ("InvalidName", helper.Attribute1TypeArgumentSystemType) + ) + .AssertOnlyViolations(helper); + should + .BeTypesThat() + .HaveAttributeWithNamedArguments( + helper.Attribute1, + [("InvalidName", helper.Attribute1TypeArgumentSystemType)] + ) + .AssertOnlyViolations(helper); + should + .BeTypesThat() + .HaveAttributeWithNamedArguments( + helper.Attribute1, + ("NamedParameter1", helper.UnusedTypeArgumentSystemType) + ) + .AssertOnlyViolations(helper); + should + .BeTypesThat() + .HaveAttributeWithNamedArguments( + helper.Attribute1, + [("NamedParameter1", helper.UnusedTypeArgumentSystemType)] + ) + .AssertOnlyViolations(helper); + should + .BeTypesThat() + .HaveAttributeWithNamedArguments( + helper.Attribute1SystemType, + ("NamedParameter1", helper.UnusedTypeArgumentSystemType) + ) + .AssertOnlyViolations(helper); + should + .BeTypesThat() + .HaveAttributeWithNamedArguments( + helper.Attribute1SystemType, + [("NamedParameter1", helper.UnusedTypeArgumentSystemType)] + ) + .AssertOnlyViolations(helper); + + helper.AddSnapshotHeader("Violations with value arguments"); + should = Types().That().Are(helper.ClassWithSingleAttributeWithNamedArguments).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should + .HaveAttributeWithNamedArguments( + helper.Attribute1, + ("InvalidName", helper.Attribute1StringArgument) + ) + .AssertOnlyViolations(helper); + should + .HaveAttributeWithNamedArguments( + helper.Attribute1, + [("InvalidName", helper.Attribute1StringArgument)] + ) + .AssertOnlyViolations(helper); + should + .HaveAttributeWithNamedArguments( + helper.Attribute1, + ("NamedParameter2", helper.UnusedAttributeStringValue) + ) + .AssertOnlyViolations(helper); + should + .HaveAttributeWithNamedArguments( + helper.Attribute1, + [("NamedParameter2", helper.UnusedAttributeStringValue)] + ) + .AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should + .Be( + Types() + .That() + .HaveAttributeWithNamedArguments( + helper.Attribute1, + ("InvalidName", helper.Attribute1StringArgument) + ) + ) + .AssertOnlyViolations(helper); + should + .Be( + Types() + .That() + .HaveAttributeWithNamedArguments( + helper.Attribute1, + [("InvalidName", helper.Attribute1StringArgument)] + ) + ) + .AssertOnlyViolations(helper); + should + .Be( + Types() + .That() + .HaveAttributeWithNamedArguments( + helper.Attribute1, + ("NamedParameter2", helper.UnusedAttributeStringValue) + ) + ) + .AssertOnlyViolations(helper); + should + .Be( + Types() + .That() + .HaveAttributeWithNamedArguments( + helper.Attribute1, + [("NamedParameter2", helper.UnusedAttributeStringValue)] + ) + ) + .AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should + .BeTypesThat() + .HaveAttributeWithNamedArguments( + helper.Attribute1, + ("InvalidName", helper.Attribute1StringArgument) + ) + .AssertOnlyViolations(helper); + should + .BeTypesThat() + .HaveAttributeWithNamedArguments( + helper.Attribute1, + [("InvalidName", helper.Attribute1StringArgument)] + ) + .AssertOnlyViolations(helper); + should + .BeTypesThat() + .HaveAttributeWithNamedArguments( + helper.Attribute1, + ("NamedParameter2", helper.UnusedAttributeStringValue) + ) + .AssertOnlyViolations(helper); + should + .BeTypesThat() + .HaveAttributeWithNamedArguments( + helper.Attribute1, + [("NamedParameter2", helper.UnusedAttributeStringValue)] + ) + .AssertOnlyViolations(helper); + + helper.AddSnapshotHeader("Unused attribute"); + should = Types().That().Are(helper.ClassWithSingleAttributeWithNamedArguments).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should + .HaveAttributeWithNamedArguments( + helper.UnusedAttribute, + ("NamedParameter1", helper.Attribute1TypeArgument) + ) + .AssertOnlyViolations(helper); + should + .HaveAttributeWithNamedArguments( + helper.UnusedAttribute, + [("NamedParameter1", helper.Attribute1TypeArgument)] + ) + .AssertOnlyViolations(helper); + should + .HaveAttributeWithNamedArguments( + helper.UnusedAttributeSystemType, + ("NamedParameter1", helper.Attribute1TypeArgument) + ) + .AssertOnlyViolations(helper); + should + .HaveAttributeWithNamedArguments( + helper.UnusedAttributeSystemType, + [("NamedParameter1", helper.Attribute1TypeArgument)] + ) + .AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should + .Be( + Types() + .That() + .HaveAttributeWithNamedArguments( + helper.UnusedAttribute, + ("NamedParameter1", helper.Attribute1TypeArgument) + ) + ) + .AssertOnlyViolations(helper); + should + .Be( + Types() + .That() + .HaveAttributeWithNamedArguments( + helper.UnusedAttribute, + [("NamedParameter1", helper.Attribute1TypeArgument)] + ) + ) + .AssertOnlyViolations(helper); + should + .Be( + Types() + .That() + .HaveAttributeWithNamedArguments( + helper.UnusedAttributeSystemType, + ("NamedParameter1", helper.Attribute1TypeArgument) + ) + ) + .AssertOnlyViolations(helper); + should + .Be( + Types() + .That() + .HaveAttributeWithNamedArguments( + helper.UnusedAttributeSystemType, + [("NamedParameter1", helper.Attribute1TypeArgument)] + ) + ) + .AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should + .BeTypesThat() + .HaveAttributeWithNamedArguments( + helper.UnusedAttribute, + ("NamedParameter1", helper.Attribute1TypeArgument) + ) + .AssertOnlyViolations(helper); + should + .BeTypesThat() + .HaveAttributeWithNamedArguments( + helper.UnusedAttribute, + [("NamedParameter1", helper.Attribute1TypeArgument)] + ) + .AssertOnlyViolations(helper); + should + .BeTypesThat() + .HaveAttributeWithNamedArguments( + helper.UnusedAttributeSystemType, + ("NamedParameter1", helper.Attribute1TypeArgument) + ) + .AssertOnlyViolations(helper); + should + .BeTypesThat() + .HaveAttributeWithNamedArguments( + helper.UnusedAttributeSystemType, + [("NamedParameter1", helper.Attribute1TypeArgument)] + ) + .AssertOnlyViolations(helper); + + helper.AddSnapshotHeader("Type outside of architecture"); + should = Types().That().Are(helper.ClassWithSingleAttributeWithNamedArguments).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should + .HaveAttributeWithNamedArguments( + typeof(TypeDependencyNamespace.BaseClass), + ("NamedParameter1", helper.Attribute1TypeArgument) + ) + .AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should + .Be( + Types() + .That() + .HaveAttributeWithNamedArguments( + typeof(TypeDependencyNamespace.BaseClass), + ("NamedParameter1", helper.Attribute1TypeArgument) + ) + ) + .AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should + .BeTypesThat() + .HaveAttributeWithNamedArguments( + typeof(TypeDependencyNamespace.BaseClass), + ("NamedParameter1", helper.Attribute1TypeArgument) + ) + .AssertOnlyViolations(helper); + + helper.AddSnapshotHeader("Empty arguments"); + should = Types().That().Are(helper.ClassWithSingleAttributeWithNamedArguments).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should.HaveAttributeWithNamedArguments(helper.Attribute1, []).AssertNoViolations(helper); + should + .HaveAttributeWithNamedArguments(helper.Attribute1SystemType, []) + .AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should + .Be(Types().That().HaveAttributeWithNamedArguments(helper.Attribute1, [])) + .AssertNoViolations(helper); + should + .Be(Types().That().HaveAttributeWithNamedArguments(helper.Attribute1SystemType, [])) + .AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should + .BeTypesThat() + .HaveAttributeWithNamedArguments(helper.Attribute1, []) + .AssertNoViolations(helper); + should + .BeTypesThat() + .HaveAttributeWithNamedArguments(helper.Attribute1SystemType, []) + .AssertNoViolations(helper); + + helper.AddSnapshotHeader("Multiple arguments"); + should = Types().That().Are(helper.ClassWithSingleAttributeWithNamedArguments).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should + .HaveAttributeWithNamedArguments( + helper.Attribute1, + ("NamedParameter1", helper.Attribute1TypeArgument), + ("NamedParameter2", helper.Attribute1StringArgument) + ) + .AssertOnlyViolations(helper); + should + .HaveAttributeWithNamedArguments( + helper.Attribute1, + [ + ("NamedParameter1", helper.Attribute1TypeArgument), + ("NamedParameter2", helper.Attribute1StringArgument), + ] + ) + .AssertOnlyViolations(helper); + should + .HaveAttributeWithNamedArguments( + helper.Attribute1SystemType, + ("NamedParameter1", helper.Attribute1TypeArgument), + ("NamedParameter2", helper.Attribute1StringArgument) + ) + .AssertOnlyViolations(helper); + should + .HaveAttributeWithNamedArguments( + helper.Attribute1SystemType, + [ + ("NamedParameter1", helper.Attribute1TypeArgument), + ("NamedParameter2", helper.Attribute1StringArgument), + ] + ) + .AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should + .Be( + Types() + .That() + .HaveAttributeWithNamedArguments( + helper.Attribute1, + ("NamedParameter1", helper.Attribute1TypeArgument), + ("NamedParameter2", helper.Attribute1StringArgument) + ) + ) + .AssertOnlyViolations(helper); + should + .Be( + Types() + .That() + .HaveAttributeWithNamedArguments( + helper.Attribute1, + [ + ("NamedParameter1", helper.Attribute1TypeArgument), + ("NamedParameter2", helper.Attribute1StringArgument), + ] + ) + ) + .AssertOnlyViolations(helper); + should + .Be( + Types() + .That() + .HaveAttributeWithNamedArguments( + helper.Attribute1SystemType, + ("NamedParameter1", helper.Attribute1TypeArgument), + ("NamedParameter2", helper.Attribute1StringArgument) + ) + ) + .AssertOnlyViolations(helper); + should + .Be( + Types() + .That() + .HaveAttributeWithNamedArguments( + helper.Attribute1SystemType, + [ + ("NamedParameter1", helper.Attribute1TypeArgument), + ("NamedParameter2", helper.Attribute1StringArgument), + ] + ) + ) + .AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should + .BeTypesThat() + .HaveAttributeWithNamedArguments( + helper.Attribute1, + ("NamedParameter1", helper.Attribute1TypeArgument), + ("NamedParameter2", helper.Attribute1StringArgument) + ) + .AssertOnlyViolations(helper); + should + .BeTypesThat() + .HaveAttributeWithNamedArguments( + helper.Attribute1, + [ + ("NamedParameter1", helper.Attribute1TypeArgument), + ("NamedParameter2", helper.Attribute1StringArgument), + ] + ) + .AssertOnlyViolations(helper); + should + .BeTypesThat() + .HaveAttributeWithNamedArguments( + helper.Attribute1SystemType, + ("NamedParameter1", helper.Attribute1TypeArgument), + ("NamedParameter2", helper.Attribute1StringArgument) + ) + .AssertOnlyViolations(helper); + should + .BeTypesThat() + .HaveAttributeWithNamedArguments( + helper.Attribute1SystemType, + [ + ("NamedParameter1", helper.Attribute1TypeArgument), + ("NamedParameter2", helper.Attribute1StringArgument), + ] + ) + .AssertOnlyViolations(helper); + + helper.AddSnapshotHeader("Multiple inputs"); + should = Types() + .That() + .Are( + helper.ClassWithSingleAttributeWithNamedArguments, + helper.ClassWithTwoAttributesWithNamedArguments + ) + .Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should + .HaveAttributeWithNamedArguments( + helper.Attribute2, + ("NamedParameter3", helper.Attribute2TypeArgumentSystemType) + ) + .AssertAnyViolations(helper); + should + .HaveAttributeWithNamedArguments( + helper.Attribute2, + [("NamedParameter3", helper.Attribute2TypeArgumentSystemType)] + ) + .AssertAnyViolations(helper); + should + .HaveAttributeWithNamedArguments( + helper.Attribute2SystemType, + ("NamedParameter3", helper.Attribute2TypeArgumentSystemType) + ) + .AssertAnyViolations(helper); + should + .HaveAttributeWithNamedArguments( + helper.Attribute2SystemType, + [("NamedParameter3", helper.Attribute2TypeArgumentSystemType)] + ) + .AssertAnyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should + .Be( + Types() + .That() + .HaveAttributeWithNamedArguments( + helper.Attribute2, + ("NamedParameter3", helper.Attribute2TypeArgumentSystemType) + ) + ) + .AssertAnyViolations(helper); + should + .Be( + Types() + .That() + .HaveAttributeWithNamedArguments( + helper.Attribute2, + [("NamedParameter3", helper.Attribute2TypeArgumentSystemType)] + ) + ) + .AssertAnyViolations(helper); + should + .Be( + Types() + .That() + .HaveAttributeWithNamedArguments( + helper.Attribute2SystemType, + ("NamedParameter3", helper.Attribute2TypeArgumentSystemType) + ) + ) + .AssertAnyViolations(helper); + should + .Be( + Types() + .That() + .HaveAttributeWithNamedArguments( + helper.Attribute2SystemType, + [("NamedParameter3", helper.Attribute2TypeArgumentSystemType)] + ) + ) + .AssertAnyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should + .BeTypesThat() + .HaveAttributeWithNamedArguments( + helper.Attribute2, + ("NamedParameter3", helper.Attribute2TypeArgumentSystemType) + ) + .AssertAnyViolations(helper); + should + .BeTypesThat() + .HaveAttributeWithNamedArguments( + helper.Attribute2, + [("NamedParameter3", helper.Attribute2TypeArgumentSystemType)] + ) + .AssertAnyViolations(helper); + should + .BeTypesThat() + .HaveAttributeWithNamedArguments( + helper.Attribute2SystemType, + ("NamedParameter3", helper.Attribute2TypeArgumentSystemType) + ) + .AssertAnyViolations(helper); + should + .BeTypesThat() + .HaveAttributeWithNamedArguments( + helper.Attribute2SystemType, + [("NamedParameter3", helper.Attribute2TypeArgumentSystemType)] + ) + .AssertAnyViolations(helper); + + await helper.AssertSnapshotMatches(); + } + + [Fact] + public async Task HaveNameTest() + { + var helper = new DependencyAssemblyTestHelper(); + helper.AddSnapshotHeader("No violations"); + var should = Types().That().Are(helper.BaseClass).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should.HaveName(helper.BaseClass.Name).AssertNoViolations(helper); + should.HaveNameMatching("^Base.*$").AssertNoViolations(helper); + should.HaveFullName(helper.BaseClass.FullName).AssertNoViolations(helper); + should.HaveFullNameMatching("^.*\\.Base.*$").AssertNoViolations(helper); + should.HaveNameContaining("Base").AssertNoViolations(helper); + should.HaveFullNameContaining(helper.BaseClass.Namespace.Name).AssertNoViolations(helper); + should.HaveNameStartingWith("Base").AssertNoViolations(helper); + should.HaveNameEndingWith("Class").AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().HaveName(helper.BaseClass.Name)).AssertNoViolations(helper); + should.Be(Types().That().HaveNameMatching("^Base.*$")).AssertNoViolations(helper); + should + .Be(Types().That().HaveFullName(helper.BaseClass.FullName)) + .AssertNoViolations(helper); + should.Be(Types().That().HaveFullNameMatching("^.*\\.Base.*$")).AssertNoViolations(helper); + should.Be(Types().That().HaveNameContaining("Base")).AssertNoViolations(helper); + should + .Be(Types().That().HaveFullNameContaining(helper.BaseClass.Namespace.Name)) + .AssertNoViolations(helper); + should.Be(Types().That().HaveNameStartingWith("Base")).AssertNoViolations(helper); + should.Be(Types().That().HaveNameEndingWith("Class")).AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should.BeTypesThat().HaveName(helper.BaseClass.Name).AssertNoViolations(helper); + should.BeTypesThat().HaveNameMatching("^Base.*$").AssertNoViolations(helper); + should.BeTypesThat().HaveFullName(helper.BaseClass.FullName).AssertNoViolations(helper); + should.BeTypesThat().HaveFullNameMatching("^.*\\.Base.*$").AssertNoViolations(helper); + should.BeTypesThat().HaveNameContaining("Base").AssertNoViolations(helper); + should + .BeTypesThat() + .HaveFullNameContaining(helper.BaseClass.Namespace.Name) + .AssertNoViolations(helper); + should.BeTypesThat().HaveNameStartingWith("Base").AssertNoViolations(helper); + should.BeTypesThat().HaveNameEndingWith("Class").AssertNoViolations(helper); + + helper.AddSnapshotHeader("Violations"); + should = Types().That().Are(helper.BaseClass).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should.HaveName(helper.BaseClass.FullName).AssertOnlyViolations(helper); + should.HaveName("^.*\\.Base.*$").AssertOnlyViolations(helper); + should.HaveFullName(helper.BaseClass.Name).AssertOnlyViolations(helper); + should.HaveFullName("^Base.*$").AssertOnlyViolations(helper); + should.HaveNameContaining(helper.BaseClass.Namespace.Name).AssertOnlyViolations(helper); + should.HaveFullNameContaining(helper.NonExistentObjectName).AssertOnlyViolations(helper); + should.HaveNameStartingWith(helper.BaseClass.Namespace.Name).AssertOnlyViolations(helper); + should.HaveNameEndingWith("Base").AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().HaveName(helper.BaseClass.Name)).AssertNoViolations(helper); + should.Be(Types().That().HaveNameMatching("^Base.*$")).AssertNoViolations(helper); + should + .Be(Types().That().HaveFullName(helper.BaseClass.FullName)) + .AssertNoViolations(helper); + should.Be(Types().That().HaveFullNameMatching("^.*\\.Base.*$")).AssertNoViolations(helper); + should.Be(Types().That().HaveNameContaining("Base")).AssertNoViolations(helper); + should + .Be(Types().That().HaveFullNameContaining(helper.BaseClass.Namespace.Name)) + .AssertNoViolations(helper); + should.Be(Types().That().HaveNameStartingWith("Base")).AssertNoViolations(helper); + should.Be(Types().That().HaveNameEndingWith("Class")).AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should.BeTypesThat().HaveName(helper.BaseClass.Name).AssertNoViolations(helper); + should.BeTypesThat().HaveNameMatching("^Base.*$").AssertNoViolations(helper); + should.BeTypesThat().HaveFullName(helper.BaseClass.FullName).AssertNoViolations(helper); + should.BeTypesThat().HaveFullNameMatching("^.*\\.Base.*$").AssertNoViolations(helper); + should.BeTypesThat().HaveNameContaining("Base").AssertNoViolations(helper); + should + .BeTypesThat() + .HaveFullNameContaining(helper.BaseClass.Namespace.Name) + .AssertNoViolations(helper); + should.BeTypesThat().HaveNameStartingWith("Base").AssertNoViolations(helper); + should.BeTypesThat().HaveNameEndingWith("Class").AssertNoViolations(helper); + + await helper.AssertSnapshotMatches(); + } + + [Fact] + public async Task NotBeTest() + { + var helper = new DependencyAssemblyTestHelper(); + + helper.AddSnapshotHeader("No violations"); + var should = Types().That().DependOnAny(helper.BaseClass).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should.NotBe(helper.ClassWithoutDependencies).AssertNoViolations(helper); + should.NotBe(helper.ClassWithoutDependenciesSystemType).AssertNoViolations(helper); + should + .NotBe(Classes().That().Are(helper.ClassWithoutDependencies)) + .AssertNoViolations(helper); + should.NotBe([helper.ClassWithoutDependencies]).AssertNoViolations(helper); + should.NotBe([helper.ClassWithoutDependenciesSystemType]).AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should + .Be(Types().That().AreNot(helper.ClassWithoutDependencies)) + .AssertNoViolations(helper); + should + .Be(Types().That().AreNot(helper.ClassWithoutDependenciesSystemType)) + .AssertNoViolations(helper); + should + .Be(Types().That().AreNot(helper.ClassWithoutDependencies)) + .AssertNoViolations(helper); + should + .Be(Types().That().AreNot([helper.ClassWithoutDependencies])) + .AssertNoViolations(helper); + should + .Be(Types().That().AreNot([helper.ClassWithoutDependenciesSystemType])) + .AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should.BeTypesThat().AreNot(helper.ClassWithoutDependencies).AssertNoViolations(helper); + should + .BeTypesThat() + .AreNot(helper.ClassWithoutDependenciesSystemType) + .AssertNoViolations(helper); + should + .BeTypesThat() + .AreNot(Classes().That().Are(helper.ClassWithoutDependencies)) + .AssertNoViolations(helper); + should.BeTypesThat().AreNot([helper.ClassWithoutDependencies]).AssertNoViolations(helper); + should + .BeTypesThat() + .AreNot([helper.ClassWithoutDependenciesSystemType]) + .AssertNoViolations(helper); + + helper.AddSnapshotHeader("Violations"); + should = Types().That().DependOnAny(helper.BaseClass).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should.NotBe(helper.ChildClass).AssertAnyViolations(helper); + should.NotBe(helper.ChildClassSystemType).AssertAnyViolations(helper); + should.NotBe(Classes().That().Are(helper.ChildClass)).AssertAnyViolations(helper); + should.NotBe([helper.ChildClass]).AssertAnyViolations(helper); + should.NotBe([helper.ChildClassSystemType]).AssertAnyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().AreNot(helper.ChildClass)).AssertAnyViolations(helper); + should.Be(Types().That().AreNot(helper.ChildClassSystemType)).AssertAnyViolations(helper); + should + .Be(Types().That().AreNot(Classes().That().Are(helper.ChildClass))) + .AssertAnyViolations(helper); + should.Be(Types().That().AreNot([helper.ChildClass])).AssertAnyViolations(helper); + should.Be(Types().That().AreNot([helper.ChildClassSystemType])).AssertAnyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should.BeTypesThat().AreNot(helper.ChildClass).AssertAnyViolations(helper); + should.BeTypesThat().AreNot(helper.ChildClassSystemType).AssertAnyViolations(helper); + should + .BeTypesThat() + .AreNot(Classes().That().Are(helper.ChildClass)) + .AssertAnyViolations(helper); + should.BeTypesThat().AreNot([helper.ChildClass]).AssertAnyViolations(helper); + should.BeTypesThat().AreNot([helper.ChildClassSystemType]).AssertAnyViolations(helper); + + helper.AddSnapshotHeader("Empty arguments"); + should = Types().That().DependOnAny(helper.BaseClass).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should.NotBe(new List()).AssertNoViolations(helper); + should.NotBe(new List()).AssertNoViolations(helper); + should + .NotBe(Classes().That().HaveFullName(helper.NonExistentObjectName)) + .AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().AreNot(new List())).AssertNoViolations(helper); + should.Be(Types().That().AreNot(new List())).AssertNoViolations(helper); + should + .Be(Types().That().AreNot(Classes().That().HaveFullName(helper.NonExistentObjectName))) + .AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should.BeTypesThat().AreNot(new List()).AssertNoViolations(helper); + should.BeTypesThat().AreNot(new List()).AssertNoViolations(helper); + should + .BeTypesThat() + .AreNot(Classes().That().HaveFullName(helper.NonExistentObjectName)) + .AssertNoViolations(helper); + + helper.AddSnapshotHeader("Multiple arguments"); + should = Types().That().DependOnAny(helper.BaseClass).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should.NotBe(helper.ClassWithoutDependencies, helper.BaseClass).AssertNoViolations(helper); + should + .NotBe([helper.ClassWithoutDependencies, helper.BaseClass]) + .AssertNoViolations(helper); + should + .NotBe(helper.ClassWithoutDependenciesSystemType, helper.BaseClassSystemType) + .AssertNoViolations(helper); + should + .NotBe([helper.ClassWithoutDependenciesSystemType, helper.BaseClassSystemType]) + .AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should + .Be(Types().That().AreNot(helper.ClassWithoutDependencies, helper.BaseClass)) + .AssertNoViolations(helper); + should + .Be(Types().That().AreNot([helper.ClassWithoutDependencies, helper.BaseClass])) + .AssertNoViolations(helper); + should + .Be( + Types() + .That() + .AreNot(helper.ClassWithoutDependenciesSystemType, helper.BaseClassSystemType) + ) + .AssertNoViolations(helper); + should + .Be( + Types() + .That() + .AreNot([helper.ClassWithoutDependenciesSystemType, helper.BaseClassSystemType]) + ) + .AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should + .BeTypesThat() + .AreNot(helper.ClassWithoutDependencies, helper.BaseClass) + .AssertNoViolations(helper); + should + .BeTypesThat() + .AreNot([helper.ClassWithoutDependencies, helper.BaseClass]) + .AssertNoViolations(helper); + should + .BeTypesThat() + .AreNot(helper.ClassWithoutDependenciesSystemType, helper.BaseClassSystemType) + .AssertNoViolations(helper); + should + .BeTypesThat() + .AreNot([helper.ClassWithoutDependenciesSystemType, helper.BaseClassSystemType]) + .AssertNoViolations(helper); + + await helper.AssertSnapshotMatches(); + } + + [Fact] + public async Task NotCallAnyTest() + { + var helper = new DependencyAssemblyTestHelper(); + + helper.AddSnapshotHeader("No violations"); + var should = MethodMembers().That().Are(helper.MethodWithSingleDependency).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should.NotCallAny(helper.MethodWithoutDependencies).AssertNoViolations(helper); + should.NotCallAny([helper.MethodWithoutDependencies]).AssertNoViolations(helper); + should + .NotCallAny(MethodMembers().That().Are(helper.MethodWithoutDependencies)) + .AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should + .Be(MethodMembers().That().DoNotCallAny(helper.MethodWithoutDependencies)) + .AssertNoViolations(helper); + should + .Be(MethodMembers().That().DoNotCallAny([helper.MethodWithoutDependencies])) + .AssertNoViolations(helper); + should + .Be( + MethodMembers() + .That() + .DoNotCallAny(MethodMembers().That().Are(helper.MethodWithoutDependencies)) + ) + .AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should + .BeMethodMembersThat() + .DoNotCallAny(helper.MethodWithoutDependencies) + .AssertNoViolations(helper); + should + .BeMethodMembersThat() + .DoNotCallAny([helper.MethodWithoutDependencies]) + .AssertNoViolations(helper); + should + .BeMethodMembersThat() + .DoNotCallAny(MethodMembers().That().Are(helper.MethodWithoutDependencies)) + .AssertNoViolations(helper); + + helper.AddSnapshotHeader("Violations"); + should = MethodMembers().That().Are(helper.MethodWithSingleDependency).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should.NotCallAny(helper.CalledMethod).AssertOnlyViolations(helper); + should.NotCallAny([helper.CalledMethod]).AssertOnlyViolations(helper); + should + .NotCallAny(MethodMembers().That().Are(helper.CalledMethod)) + .AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should + .Be(MethodMembers().That().DoNotCallAny(helper.CalledMethod)) + .AssertOnlyViolations(helper); + should + .Be(MethodMembers().That().DoNotCallAny([helper.CalledMethod])) + .AssertOnlyViolations(helper); + should + .Be( + MethodMembers().That().DoNotCallAny(MethodMembers().That().Are(helper.CalledMethod)) + ) + .AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should.BeMethodMembersThat().DoNotCallAny(helper.CalledMethod).AssertOnlyViolations(helper); + should + .BeMethodMembersThat() + .DoNotCallAny([helper.CalledMethod]) + .AssertOnlyViolations(helper); + should + .BeMethodMembersThat() + .DoNotCallAny(MethodMembers().That().Are(helper.CalledMethod)) + .AssertOnlyViolations(helper); + + helper.AddSnapshotHeader("Empty arguments"); + should = MethodMembers().That().Are(helper.MethodWithSingleDependency).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should.NotCallAny(new List()).AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should + .Be(MethodMembers().That().DoNotCallAny(new List())) + .AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should + .BeMethodMembersThat() + .DoNotCallAny(new List()) + .AssertNoViolations(helper); + + helper.AddSnapshotHeader("Multiple arguments"); + should = MethodMembers().That().Are(helper.MethodWithMultipleDependencies).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should + .NotCallAny( + helper.MethodWithoutDependencies, + helper.CalledMethod1, + helper.CalledMethod2 + ) + .AssertOnlyViolations(helper); + should + .NotCallAny( + [helper.MethodWithoutDependencies, helper.CalledMethod1, helper.CalledMethod2] + ) + .AssertOnlyViolations(helper); + should + .NotCallAny( + MethodMembers() + .That() + .Are( + helper.MethodWithoutDependencies, + helper.CalledMethod1, + helper.CalledMethod2 + ) + ) + .AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should + .Be( + MethodMembers() + .That() + .DoNotCallAny( + helper.MethodWithoutDependencies, + helper.CalledMethod1, + helper.CalledMethod2 + ) + ) + .AssertOnlyViolations(helper); + should + .Be( + MethodMembers() + .That() + .DoNotCallAny( + [ + helper.MethodWithoutDependencies, + helper.CalledMethod1, + helper.CalledMethod2, + ] + ) + ) + .AssertOnlyViolations(helper); + should + .Be( + MethodMembers() + .That() + .DoNotCallAny( + MethodMembers() + .That() + .Are( + helper.MethodWithoutDependencies, + helper.CalledMethod1, + helper.CalledMethod2 + ) + ) + ) + .AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should + .BeMethodMembersThat() + .DoNotCallAny( + helper.MethodWithoutDependencies, + helper.CalledMethod1, + helper.CalledMethod2 + ) + .AssertOnlyViolations(helper); + should + .BeMethodMembersThat() + .DoNotCallAny( + [helper.MethodWithoutDependencies, helper.CalledMethod1, helper.CalledMethod2] + ) + .AssertOnlyViolations(helper); + should + .BeMethodMembersThat() + .DoNotCallAny( + MethodMembers() + .That() + .Are( + helper.MethodWithoutDependencies, + helper.CalledMethod1, + helper.CalledMethod2 + ) + ) + .AssertOnlyViolations(helper); + + helper.AddSnapshotHeader("Multiple inputs"); + should = MethodMembers() + .That() + .Are(helper.MethodWithSingleDependency, helper.MethodWithMultipleDependencies) + .Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should.NotCallAny(helper.MethodWithoutDependencies).AssertNoViolations(helper); + should + .NotCallAny(helper.CalledMethod, helper.CalledMethod1, helper.CalledMethod2) + .AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should + .Be(MethodMembers().That().DoNotCallAny(helper.MethodWithoutDependencies)) + .AssertNoViolations(helper); + should + .Be( + MethodMembers() + .That() + .DoNotCallAny(helper.CalledMethod, helper.CalledMethod1, helper.CalledMethod2) + ) + .AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should + .BeMethodMembersThat() + .DoNotCallAny(helper.MethodWithoutDependencies) + .AssertNoViolations(helper); + should + .BeMethodMembersThat() + .DoNotCallAny(helper.CalledMethod, helper.CalledMethod1, helper.CalledMethod2) + .AssertOnlyViolations(helper); + + await helper.AssertSnapshotMatches(); + } + + [Fact] + public async Task NotDependOnAnyTypesThatTest() + { + var helper = new DependencyAssemblyTestHelper(); + helper.AddSnapshotHeader("No violations"); + Types() + .That() + .Are(helper.BaseClass) + .Should() + .NotDependOnAnyTypesThat() + .Are(helper.ChildClass) + .AssertNoViolations(helper); + + helper.AddSnapshotHeader("Violations"); + Types() + .That() + .Are(helper.ChildClass) + .Should() + .NotDependOnAnyTypesThat() + .Are(helper.BaseClass) + .AssertOnlyViolations(helper); + await helper.AssertSnapshotMatches(); + } + + [Fact] + public async Task NotDependOnAnyTest() + { + var helper = new DependencyAssemblyTestHelper(); + + helper.AddSnapshotHeader("No violations"); + var should = Types().That().Are(helper.ChildClass).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should.NotDependOnAny(helper.ClassWithoutDependencies).AssertNoViolations(helper); + should.NotDependOnAny(helper.ClassWithoutDependenciesSystemType).AssertNoViolations(helper); + should + .NotDependOnAny(Classes().That().Are(helper.ClassWithoutDependencies)) + .AssertNoViolations(helper); + should.NotDependOnAny([helper.ClassWithoutDependencies]).AssertNoViolations(helper); + should + .NotDependOnAny([helper.ClassWithoutDependenciesSystemType]) + .AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should + .Be(Types().That().DoNotDependOnAny(helper.ClassWithoutDependencies)) + .AssertNoViolations(helper); + should + .Be(Types().That().DoNotDependOnAny(helper.ClassWithoutDependenciesSystemType)) + .AssertNoViolations(helper); + should + .Be(Types().That().DoNotDependOnAny(helper.ClassWithoutDependencies)) + .AssertNoViolations(helper); + should + .Be(Types().That().DoNotDependOnAny([helper.ClassWithoutDependencies])) + .AssertNoViolations(helper); + should + .Be(Types().That().DoNotDependOnAny([helper.ClassWithoutDependenciesSystemType])) + .AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should + .BeTypesThat() + .DoNotDependOnAny(helper.ClassWithoutDependencies) + .AssertNoViolations(helper); + should + .BeTypesThat() + .DoNotDependOnAny(helper.ClassWithoutDependenciesSystemType) + .AssertNoViolations(helper); + should + .BeTypesThat() + .DoNotDependOnAny(Classes().That().Are(helper.ClassWithoutDependencies)) + .AssertNoViolations(helper); + should + .BeTypesThat() + .DoNotDependOnAny([helper.ClassWithoutDependencies]) + .AssertNoViolations(helper); + should + .BeTypesThat() + .DoNotDependOnAny([helper.ClassWithoutDependenciesSystemType]) + .AssertNoViolations(helper); + + helper.AddSnapshotHeader("Violations"); + should = Types().That().Are(helper.ChildClass).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should.NotDependOnAny(helper.BaseClass).AssertOnlyViolations(helper); + should.NotDependOnAny(helper.BaseClassSystemType).AssertOnlyViolations(helper); + should.NotDependOnAny(Classes().That().Are(helper.BaseClass)).AssertOnlyViolations(helper); + should.NotDependOnAny([helper.BaseClass]).AssertOnlyViolations(helper); + should.NotDependOnAny([helper.BaseClassSystemType]).AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().DoNotDependOnAny(helper.BaseClass)).AssertOnlyViolations(helper); + should + .Be(Types().That().DoNotDependOnAny(helper.BaseClassSystemType)) + .AssertOnlyViolations(helper); + should + .Be(Types().That().DoNotDependOnAny(Classes().That().Are(helper.BaseClass))) + .AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should.BeTypesThat().DoNotDependOnAny(helper.BaseClass).AssertOnlyViolations(helper); + should + .BeTypesThat() + .DoNotDependOnAny(helper.BaseClassSystemType) + .AssertOnlyViolations(helper); + should + .BeTypesThat() + .DoNotDependOnAny(Classes().That().Are(helper.BaseClass)) + .AssertOnlyViolations(helper); + should.BeTypesThat().DoNotDependOnAny([helper.BaseClass]).AssertOnlyViolations(helper); + should + .BeTypesThat() + .DoNotDependOnAny([helper.BaseClassSystemType]) + .AssertOnlyViolations(helper); + + helper.AddSnapshotHeader("Type outside of architecture"); + should = Types().That().Are(helper.ChildClass).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should + .NotDependOnAny(typeof(AttributeNamespace.ClassWithoutAttributes)) + .AssertException(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should + .Be(Types().That().DoNotDependOnAny(typeof(AttributeNamespace.ClassWithoutAttributes))) + .AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should + .BeTypesThat() + .DoNotDependOnAny(typeof(AttributeNamespace.ClassWithoutAttributes)) + .AssertNoViolations(helper); + + helper.AddSnapshotHeader("Empty arguments"); + should = Types().That().Are(helper.ChildClass).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should.NotDependOnAny(new List()).AssertNoViolations(helper); + should.NotDependOnAny(new List()).AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().DoNotDependOnAny(new List())).AssertNoViolations(helper); + should + .Be(Types().That().DoNotDependOnAny(new List())) + .AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should.BeTypesThat().DoNotDependOnAny(new List()).AssertNoViolations(helper); + should.BeTypesThat().DoNotDependOnAny(new List()).AssertNoViolations(helper); + + helper.AddSnapshotHeader("Multiple arguments"); + should = Types().That().Are(helper.ChildClass).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should + .NotDependOnAny(helper.ClassWithoutDependencies, helper.BaseClass) + .AssertOnlyViolations(helper); + should + .NotDependOnAny([helper.ClassWithoutDependencies, helper.BaseClass]) + .AssertOnlyViolations(helper); + should + .NotDependOnAny(helper.ClassWithoutDependenciesSystemType, helper.BaseClassSystemType) + .AssertOnlyViolations(helper); + should + .NotDependOnAny([helper.ClassWithoutDependenciesSystemType, helper.BaseClassSystemType]) + .AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should + .Be(Types().That().DoNotDependOnAny(helper.ClassWithoutDependencies, helper.BaseClass)) + .AssertOnlyViolations(helper); + should + .Be( + Types().That().DoNotDependOnAny([helper.ClassWithoutDependencies, helper.BaseClass]) + ) + .AssertOnlyViolations(helper); + should + .Be( + Types() + .That() + .DoNotDependOnAny( + helper.ClassWithoutDependenciesSystemType, + helper.BaseClassSystemType + ) + ) + .AssertOnlyViolations(helper); + should + .Be( + Types() + .That() + .DoNotDependOnAny( + [helper.ClassWithoutDependenciesSystemType, helper.BaseClassSystemType] + ) + ) + .AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should + .BeTypesThat() + .DoNotDependOnAny(helper.ClassWithoutDependencies, helper.BaseClass) + .AssertOnlyViolations(helper); + should + .BeTypesThat() + .DoNotDependOnAny([helper.ClassWithoutDependencies, helper.BaseClass]) + .AssertOnlyViolations(helper); + should + .BeTypesThat() + .DoNotDependOnAny(helper.ClassWithoutDependenciesSystemType, helper.BaseClassSystemType) + .AssertOnlyViolations(helper); + should + .BeTypesThat() + .DoNotDependOnAny( + [helper.ClassWithoutDependenciesSystemType, helper.BaseClassSystemType] + ) + .AssertOnlyViolations(helper); + + helper.AddSnapshotHeader("Input with multiple dependencies"); + should = Types().That().Are(helper.ClassWithMultipleDependencies).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should + .NotDependOnAny(helper.BaseClassWithMember, helper.OtherBaseClass) + .AssertOnlyViolations(helper); + should + .NotDependOnAny([helper.BaseClassWithMember, helper.OtherBaseClass]) + .AssertOnlyViolations(helper); + should + .NotDependOnAny(helper.BaseClassWithMemberSystemType, helper.OtherBaseClassSystemType) + .AssertOnlyViolations(helper); + should + .NotDependOnAny([helper.BaseClassWithMemberSystemType, helper.OtherBaseClassSystemType]) + .AssertOnlyViolations(helper); + should + .NotDependOnAny(Classes().That().Are(helper.BaseClassWithMember, helper.OtherBaseClass)) + .AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should + .Be(Types().That().DoNotDependOnAny(helper.BaseClassWithMember, helper.OtherBaseClass)) + .AssertOnlyViolations(helper); + should + .Be( + Types().That().DoNotDependOnAny([helper.BaseClassWithMember, helper.OtherBaseClass]) + ) + .AssertOnlyViolations(helper); + should + .Be( + Types() + .That() + .DoNotDependOnAny( + helper.BaseClassWithMemberSystemType, + helper.OtherBaseClassSystemType + ) + ) + .AssertOnlyViolations(helper); + should + .Be( + Types() + .That() + .DoNotDependOnAny( + [helper.BaseClassWithMemberSystemType, helper.OtherBaseClassSystemType] + ) + ) + .AssertOnlyViolations(helper); + should + .Be( + Classes().That().DoNotDependOnAny(helper.BaseClassWithMember, helper.OtherBaseClass) + ) + .AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should + .BeTypesThat() + .DoNotDependOnAny(helper.BaseClassWithMember, helper.OtherBaseClass) + .AssertOnlyViolations(helper); + should + .BeTypesThat() + .DoNotDependOnAny([helper.BaseClassWithMember, helper.OtherBaseClass]) + .AssertOnlyViolations(helper); + should + .BeTypesThat() + .DoNotDependOnAny(helper.BaseClassWithMemberSystemType, helper.OtherBaseClassSystemType) + .AssertOnlyViolations(helper); + should + .BeTypesThat() + .DoNotDependOnAny( + [helper.BaseClassWithMemberSystemType, helper.OtherBaseClassSystemType] + ) + .AssertOnlyViolations(helper); + should + .BeTypesThat() + .DoNotDependOnAny( + Classes().That().Are(helper.BaseClassWithMember, helper.OtherBaseClass) + ) + .AssertOnlyViolations(helper); + + await helper.AssertSnapshotMatches(); + } + + [Fact] + public async Task NotExistTest() + { + var helper = new DependencyAssemblyTestHelper(); + helper.AddSnapshotHeader("No violations"); + var should = Types().That().DependOnAny(helper.ChildClass).Should(); + should.NotExist().AssertNoViolations(helper); + + helper.AddSnapshotHeader("Violations"); + should = Types().That().DependOnAny(helper.BaseClass).Should(); + should.NotExist().AssertOnlyViolations(helper); + await helper.AssertSnapshotMatches(); + } + + [Fact] + public async Task NotHaveAnyAttributesTest() + { + var helper = new AttributeAssemblyTestHelpers(); + + helper.AddSnapshotHeader("No violations"); + var should = Types().That().Are(helper.ClassWithSingleAttribute).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should.NotHaveAnyAttributes(helper.UnusedAttribute).AssertNoViolations(helper); + should.NotHaveAnyAttributes([helper.UnusedAttribute]).AssertNoViolations(helper); + should.NotHaveAnyAttributes(helper.UnusedAttributeSystemType).AssertNoViolations(helper); + should.NotHaveAnyAttributes([helper.UnusedAttributeSystemType]).AssertNoViolations(helper); + should + .NotHaveAnyAttributes(Attributes().That().Are(helper.UnusedAttribute)) + .AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should + .Be(Types().That().DoNotHaveAnyAttributes(helper.UnusedAttribute)) + .AssertNoViolations(helper); + should + .Be(Types().That().DoNotHaveAnyAttributes([helper.UnusedAttribute])) + .AssertNoViolations(helper); + should + .Be(Types().That().DoNotHaveAnyAttributes(helper.UnusedAttributeSystemType)) + .AssertNoViolations(helper); + should + .Be(Types().That().DoNotHaveAnyAttributes([helper.UnusedAttributeSystemType])) + .AssertNoViolations(helper); + should + .Be( + Types() + .That() + .DoNotHaveAnyAttributes(Attributes().That().Are(helper.UnusedAttribute)) + ) + .AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should + .BeTypesThat() + .DoNotHaveAnyAttributes(helper.UnusedAttribute) + .AssertNoViolations(helper); + should + .BeTypesThat() + .DoNotHaveAnyAttributes([helper.UnusedAttribute]) + .AssertNoViolations(helper); + should + .BeTypesThat() + .DoNotHaveAnyAttributes(helper.UnusedAttributeSystemType) + .AssertNoViolations(helper); + should + .BeTypesThat() + .DoNotHaveAnyAttributes([helper.UnusedAttributeSystemType]) + .AssertNoViolations(helper); + should + .BeTypesThat() + .DoNotHaveAnyAttributes(Attributes().That().Are(helper.UnusedAttribute)) + .AssertNoViolations(helper); + + helper.AddSnapshotHeader("Violations"); + should = Types().That().Are(helper.ClassWithSingleAttribute).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should.NotHaveAnyAttributes(helper.Attribute1).AssertOnlyViolations(helper); + should.NotHaveAnyAttributes([helper.Attribute1]).AssertOnlyViolations(helper); + should.NotHaveAnyAttributes(helper.Attribute1SystemType).AssertOnlyViolations(helper); + should.NotHaveAnyAttributes([helper.Attribute1SystemType]).AssertOnlyViolations(helper); + should + .NotHaveAnyAttributes(Attributes().That().Are(helper.Attribute1)) + .AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should + .Be(Types().That().DoNotHaveAnyAttributes(helper.Attribute1)) + .AssertOnlyViolations(helper); + should + .Be(Types().That().DoNotHaveAnyAttributes([helper.Attribute1])) + .AssertOnlyViolations(helper); + should + .Be(Types().That().DoNotHaveAnyAttributes(helper.Attribute1SystemType)) + .AssertOnlyViolations(helper); + should + .Be(Types().That().DoNotHaveAnyAttributes([helper.Attribute1SystemType])) + .AssertOnlyViolations(helper); + should + .Be(Types().That().DoNotHaveAnyAttributes(Attributes().That().Are(helper.Attribute1))) + .AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should.BeTypesThat().DoNotHaveAnyAttributes(helper.Attribute1).AssertOnlyViolations(helper); + should + .BeTypesThat() + .DoNotHaveAnyAttributes([helper.Attribute1]) + .AssertOnlyViolations(helper); + should + .BeTypesThat() + .DoNotHaveAnyAttributes(helper.Attribute1SystemType) + .AssertOnlyViolations(helper); + should + .BeTypesThat() + .DoNotHaveAnyAttributes([helper.Attribute1SystemType]) + .AssertOnlyViolations(helper); + should + .BeTypesThat() + .DoNotHaveAnyAttributes(Attributes().That().Are(helper.Attribute1)) + .AssertOnlyViolations(helper); + + helper.AddSnapshotHeader("Type outside of architecture"); + should = Types().That().Are(helper.ClassWithTwoAttributes).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should + .NotHaveAnyAttributes(typeof(TypeDependencyNamespace.BaseClass)) + .AssertException(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should + .Be(Types().That().DoNotHaveAnyAttributes(typeof(TypeDependencyNamespace.BaseClass))) + .AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should + .BeTypesThat() + .DoNotHaveAnyAttributes(typeof(TypeDependencyNamespace.BaseClass)) + .AssertNoViolations(helper); + + helper.AddSnapshotHeader("Empty arguments"); + should = Types().That().Are(helper.ClassWithoutAttributes).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should.NotHaveAnyAttributes(new List()).AssertNoViolations(helper); + should.NotHaveAnyAttributes(new List()).AssertNoViolations(helper); + should + .NotHaveAnyAttributes(Attributes().That().HaveFullName(helper.NonExistentObjectName)) + .AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should + .Be(Types().That().DoNotHaveAnyAttributes(new List())) + .AssertNoViolations(helper); + should + .Be(Types().That().DoNotHaveAnyAttributes(new List())) + .AssertNoViolations(helper); + should + .Be( + Types() + .That() + .DoNotHaveAnyAttributes( + Attributes().That().HaveFullName(helper.NonExistentObjectName) + ) + ) + .AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should + .BeTypesThat() + .DoNotHaveAnyAttributes(new List()) + .AssertNoViolations(helper); + should + .BeTypesThat() + .DoNotHaveAnyAttributes(new List()) + .AssertNoViolations(helper); + should + .BeTypesThat() + .DoNotHaveAnyAttributes(Attributes().That().HaveFullName(helper.NonExistentObjectName)) + .AssertNoViolations(helper); + + helper.AddSnapshotHeader("Multiple arguments"); + should = Types().That().Are(helper.ClassWithTwoAttributes).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should + .NotHaveAnyAttributes(helper.Attribute1, helper.Attribute2) + .AssertOnlyViolations(helper); + should + .NotHaveAnyAttributes([helper.Attribute1, helper.Attribute2]) + .AssertOnlyViolations(helper); + should + .NotHaveAnyAttributes(helper.Attribute1SystemType, helper.Attribute2SystemType) + .AssertOnlyViolations(helper); + should + .NotHaveAnyAttributes([helper.Attribute1SystemType, helper.Attribute2SystemType]) + .AssertOnlyViolations(helper); + should + .NotHaveAnyAttributes(Attributes().That().Are(helper.Attribute1, helper.Attribute2)) + .AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should + .Be(Types().That().DoNotHaveAnyAttributes(helper.Attribute1, helper.Attribute2)) + .AssertOnlyViolations(helper); + should + .Be(Types().That().DoNotHaveAnyAttributes([helper.Attribute1, helper.Attribute2])) + .AssertOnlyViolations(helper); + should + .Be( + Types() + .That() + .DoNotHaveAnyAttributes( + helper.Attribute1SystemType, + helper.Attribute2SystemType + ) + ) + .AssertOnlyViolations(helper); + should + .Be( + Types() + .That() + .DoNotHaveAnyAttributes( + [helper.Attribute1SystemType, helper.Attribute2SystemType] + ) + ) + .AssertOnlyViolations(helper); + should + .Be( + Types() + .That() + .DoNotHaveAnyAttributes( + Attributes().That().Are(helper.Attribute1, helper.Attribute2) + ) + ) + .AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should + .BeTypesThat() + .DoNotHaveAnyAttributes(helper.Attribute1, helper.Attribute2) + .AssertOnlyViolations(helper); + should + .BeTypesThat() + .DoNotHaveAnyAttributes([helper.Attribute1, helper.Attribute2]) + .AssertOnlyViolations(helper); + should + .BeTypesThat() + .DoNotHaveAnyAttributes(helper.Attribute1SystemType, helper.Attribute2SystemType) + .AssertOnlyViolations(helper); + should + .BeTypesThat() + .DoNotHaveAnyAttributes([helper.Attribute1SystemType, helper.Attribute2SystemType]) + .AssertOnlyViolations(helper); + should + .BeTypesThat() + .DoNotHaveAnyAttributes(Attributes().That().Are(helper.Attribute1, helper.Attribute2)) + .AssertOnlyViolations(helper); + + helper.AddSnapshotHeader("Multiple inputs"); + should = Types() + .That() + .Are(helper.ClassWithoutAttributes, helper.ClassWithSingleAttribute) + .Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should.NotHaveAnyAttributes(helper.Attribute2).AssertNoViolations(helper); + should.NotHaveAnyAttributes(helper.Attribute1).AssertAnyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should + .Be(Types().That().DoNotHaveAnyAttributes(helper.Attribute2)) + .AssertNoViolations(helper); + should + .Be(Types().That().DoNotHaveAnyAttributes(helper.Attribute1)) + .AssertAnyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should.BeTypesThat().DoNotHaveAnyAttributes(helper.Attribute2).AssertNoViolations(helper); + should.BeTypesThat().DoNotHaveAnyAttributes(helper.Attribute1).AssertAnyViolations(helper); + + await helper.AssertSnapshotMatches(); + } + + [Fact] + public async Task NotHaveAnyAttributesThatTest() + { + var helper = new AttributeAssemblyTestHelpers(); + helper.AddSnapshotHeader("No violations"); + var should = Types().That().Are(helper.ClassWithSingleAttribute).Should(); + should.NotHaveAnyAttributesThat().Are(helper.UnusedAttribute).AssertNoViolations(helper); + + helper.AddSnapshotHeader("Violations"); + should = Types().That().Are(helper.ClassWithSingleAttribute).Should(); + should.NotHaveAnyAttributesThat().Are(helper.Attribute1).AssertOnlyViolations(helper); + await helper.AssertSnapshotMatches(); + } + + [Fact] + public async Task NotHaveAnyAttributesWithArgumentsTest() + { + var helper = new AttributeAssemblyTestHelpers(); + + helper.AddSnapshotHeader("No violations with type arguments"); + var should = Types().That().Are(helper.ClassWithSingleAttributeWithArguments).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should + .NotHaveAnyAttributesWithArguments(helper.UnusedTypeArgumentSystemType) + .AssertNoViolations(helper); + should + .NotHaveAnyAttributesWithArguments([helper.UnusedTypeArgumentSystemType]) + .AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should + .Be( + Types() + .That() + .DoNotHaveAnyAttributesWithArguments(helper.UnusedTypeArgumentSystemType) + ) + .AssertNoViolations(helper); + should + .Be( + Types() + .That() + .DoNotHaveAnyAttributesWithArguments([helper.UnusedTypeArgumentSystemType]) + ) + .AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should + .BeTypesThat() + .DoNotHaveAnyAttributesWithArguments(helper.UnusedTypeArgumentSystemType) + .AssertNoViolations(helper); + should + .BeTypesThat() + .DoNotHaveAnyAttributesWithArguments([helper.UnusedTypeArgumentSystemType]) + .AssertNoViolations(helper); + + helper.AddSnapshotHeader("No violations with value arguments"); + should = Types().That().Are(helper.ClassWithSingleAttributeWithArguments).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should + .NotHaveAnyAttributesWithArguments(helper.UnusedAttributeStringValue) + .AssertNoViolations(helper); + should + .NotHaveAnyAttributesWithArguments([helper.UnusedAttributeStringValue]) + .AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should + .Be( + Types() + .That() + .DoNotHaveAnyAttributesWithArguments(helper.UnusedAttributeStringValue) + ) + .AssertNoViolations(helper); + should + .Be( + Types() + .That() + .DoNotHaveAnyAttributesWithArguments([helper.UnusedAttributeStringValue]) + ) + .AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should + .BeTypesThat() + .DoNotHaveAnyAttributesWithArguments(helper.UnusedAttributeStringValue) + .AssertNoViolations(helper); + should + .BeTypesThat() + .DoNotHaveAnyAttributesWithArguments([helper.UnusedAttributeStringValue]) + .AssertNoViolations(helper); + + helper.AddSnapshotHeader("Violations with type arguments"); + should = Types().That().Are(helper.ClassWithSingleAttributeWithArguments).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should + .NotHaveAnyAttributesWithArguments(helper.Attribute1TypeArgumentSystemType) + .AssertOnlyViolations(helper); + should + .NotHaveAnyAttributesWithArguments([helper.Attribute1TypeArgumentSystemType]) + .AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should + .Be( + Types() + .That() + .DoNotHaveAnyAttributesWithArguments(helper.Attribute1TypeArgumentSystemType) + ) + .AssertOnlyViolations(helper); + should + .Be( + Types() + .That() + .DoNotHaveAnyAttributesWithArguments([helper.Attribute1TypeArgumentSystemType]) + ) + .AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should + .BeTypesThat() + .DoNotHaveAnyAttributesWithArguments(helper.Attribute1TypeArgumentSystemType) + .AssertOnlyViolations(helper); + should + .BeTypesThat() + .DoNotHaveAnyAttributesWithArguments([helper.Attribute1TypeArgumentSystemType]) + .AssertOnlyViolations(helper); + + helper.AddSnapshotHeader("Violations with value arguments"); + should = Types().That().Are(helper.ClassWithSingleAttributeWithArguments).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should + .NotHaveAnyAttributesWithArguments(helper.Attribute1IntegerArgument) + .AssertOnlyViolations(helper); + should + .NotHaveAnyAttributesWithArguments([helper.Attribute1IntegerArgument]) + .AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should + .Be( + Types().That().DoNotHaveAnyAttributesWithArguments(helper.Attribute1IntegerArgument) + ) + .AssertOnlyViolations(helper); + should + .Be( + Types() + .That() + .DoNotHaveAnyAttributesWithArguments([helper.Attribute1IntegerArgument]) + ) + .AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should + .BeTypesThat() + .DoNotHaveAnyAttributesWithArguments(helper.Attribute1IntegerArgument) + .AssertOnlyViolations(helper); + should + .BeTypesThat() + .DoNotHaveAnyAttributesWithArguments([helper.Attribute1IntegerArgument]) + .AssertOnlyViolations(helper); + + helper.AddSnapshotHeader("Type without attributes"); + should = Types().That().Are(helper.ClassWithoutAttributes).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should + .NotHaveAnyAttributesWithArguments(helper.Attribute1StringArgument) + .AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should + .Be(Types().That().DoNotHaveAnyAttributesWithArguments(helper.Attribute1StringArgument)) + .AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should + .BeTypesThat() + .DoNotHaveAnyAttributesWithArguments(helper.Attribute1StringArgument) + .AssertNoViolations(helper); + + helper.AddSnapshotHeader("Null argument"); + should = Types().That().Are(helper.ClassWithSingleAttributeWithArguments).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should.NotHaveAnyAttributesWithArguments(null).AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should + .Be(Types().That().DoNotHaveAnyAttributesWithArguments(null)) + .AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should.BeTypesThat().DoNotHaveAnyAttributesWithArguments(null).AssertNoViolations(helper); + + helper.AddSnapshotHeader("Empty arguments"); + should = Types().That().Are(helper.ClassWithSingleAttributeWithArguments).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should.NotHaveAnyAttributesWithArguments([]).AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should + .Be(Types().That().DoNotHaveAnyAttributesWithArguments([])) + .AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should.BeTypesThat().DoNotHaveAnyAttributesWithArguments([]).AssertNoViolations(helper); + + helper.AddSnapshotHeader("Multiple arguments"); + should = Types().That().Are(helper.ClassWithSingleAttributeWithArguments).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should + .NotHaveAnyAttributesWithArguments( + [helper.UnusedTypeArgument, helper.Attribute1StringArgument] + ) + .AssertOnlyViolations(helper); + should + .NotHaveAnyAttributesWithArguments( + helper.UnusedTypeArgument, + helper.Attribute1StringArgument + ) + .AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should + .Be( + Types() + .That() + .DoNotHaveAnyAttributesWithArguments( + [helper.UnusedTypeArgument, helper.Attribute1StringArgument] + ) + ) + .AssertOnlyViolations(helper); + should + .Be( + Types() + .That() + .DoNotHaveAnyAttributesWithArguments( + helper.UnusedTypeArgument, + helper.Attribute1StringArgument + ) + ) + .AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should + .BeTypesThat() + .DoNotHaveAnyAttributesWithArguments( + [helper.UnusedTypeArgument, helper.Attribute1StringArgument] + ) + .AssertOnlyViolations(helper); + should + .BeTypesThat() + .DoNotHaveAnyAttributesWithArguments( + helper.UnusedTypeArgument, + helper.Attribute1StringArgument + ) + .AssertOnlyViolations(helper); + + helper.AddSnapshotHeader("Multiple inputs"); + should = Types() + .That() + .Are( + helper.ClassWithSingleAttributeWithArguments, + helper.ClassWithTwoAttributesWithArguments + ) + .Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should + .NotHaveAnyAttributesWithArguments(helper.Attribute1StringArgument) + .AssertOnlyViolations(helper); + should + .NotHaveAnyAttributesWithArguments([helper.Attribute1StringArgument]) + .AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should + .Be(Types().That().DoNotHaveAnyAttributesWithArguments(helper.Attribute1StringArgument)) + .AssertOnlyViolations(helper); + should + .Be( + Types() + .That() + .DoNotHaveAnyAttributesWithArguments([helper.Attribute1StringArgument]) + ) + .AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should + .BeTypesThat() + .DoNotHaveAnyAttributesWithArguments(helper.Attribute1StringArgument) + .AssertOnlyViolations(helper); + should + .BeTypesThat() + .DoNotHaveAnyAttributesWithArguments([helper.Attribute1StringArgument]) + .AssertOnlyViolations(helper); + + await helper.AssertSnapshotMatches(); + } + + [Fact] + public async Task NotHaveAnyAttributesWithNamedArgumentsTest() + { + var helper = new AttributeAssemblyTestHelpers(); + + helper.AddSnapshotHeader("No violations with type arguments"); + var should = Types().That().Are(helper.ClassWithSingleAttributeWithNamedArguments).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should + .NotHaveAnyAttributesWithNamedArguments( + ("InvalidName", helper.Attribute1TypeArgumentSystemType) + ) + .AssertNoViolations(helper); + should + .NotHaveAnyAttributesWithNamedArguments( + [("InvalidName", helper.Attribute1TypeArgumentSystemType)] + ) + .AssertNoViolations(helper); + should + .NotHaveAnyAttributesWithNamedArguments( + ("NamedParameter1", helper.UnusedTypeArgumentSystemType) + ) + .AssertNoViolations(helper); + should + .NotHaveAnyAttributesWithNamedArguments( + [("NamedParameter1", helper.UnusedTypeArgumentSystemType)] + ) + .AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should + .Be( + Types() + .That() + .DoNotHaveAnyAttributesWithNamedArguments( + ("InvalidName", helper.Attribute1TypeArgumentSystemType) + ) + ) + .AssertNoViolations(helper); + should + .Be( + Types() + .That() + .DoNotHaveAnyAttributesWithNamedArguments( + [("InvalidName", helper.Attribute1TypeArgumentSystemType)] + ) + ) + .AssertNoViolations(helper); + should + .Be( + Types() + .That() + .DoNotHaveAnyAttributesWithNamedArguments( + ("NamedParameter1", helper.UnusedTypeArgumentSystemType) + ) + ) + .AssertNoViolations(helper); + should + .Be( + Types() + .That() + .DoNotHaveAnyAttributesWithNamedArguments( + [("NamedParameter1", helper.UnusedTypeArgumentSystemType)] + ) + ) + .AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should + .BeTypesThat() + .DoNotHaveAnyAttributesWithNamedArguments( + ("InvalidName", helper.Attribute1TypeArgumentSystemType) + ) + .AssertNoViolations(helper); + should + .BeTypesThat() + .DoNotHaveAnyAttributesWithNamedArguments( + [("InvalidName", helper.Attribute1TypeArgumentSystemType)] + ) + .AssertNoViolations(helper); + should + .BeTypesThat() + .DoNotHaveAnyAttributesWithNamedArguments( + ("NamedParameter1", helper.UnusedTypeArgumentSystemType) + ) + .AssertNoViolations(helper); + should + .BeTypesThat() + .DoNotHaveAnyAttributesWithNamedArguments( + [("NamedParameter1", helper.UnusedTypeArgumentSystemType)] + ) + .AssertNoViolations(helper); + + helper.AddSnapshotHeader("No violations with value arguments"); + should = Types().That().Are(helper.ClassWithSingleAttributeWithNamedArguments).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should + .NotHaveAnyAttributesWithNamedArguments( + ("InvalidName", helper.Attribute1StringArgument) + ) + .AssertNoViolations(helper); + should + .NotHaveAnyAttributesWithNamedArguments( + [("InvalidName", helper.Attribute1StringArgument)] + ) + .AssertNoViolations(helper); + should + .NotHaveAnyAttributesWithNamedArguments( + ("NamedParameter2", helper.UnusedAttributeStringValue) + ) + .AssertNoViolations(helper); + should + .NotHaveAnyAttributesWithNamedArguments( + [("NamedParameter2", helper.UnusedAttributeStringValue)] + ) + .AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should + .Be( + Types() + .That() + .DoNotHaveAnyAttributesWithNamedArguments( + ("InvalidName", helper.Attribute1StringArgument) + ) + ) + .AssertNoViolations(helper); + should + .Be( + Types() + .That() + .DoNotHaveAnyAttributesWithNamedArguments( + [("InvalidName", helper.Attribute1StringArgument)] + ) + ) + .AssertNoViolations(helper); + should + .Be( + Types() + .That() + .DoNotHaveAnyAttributesWithNamedArguments( + ("NamedParameter2", helper.UnusedAttributeStringValue) + ) + ) + .AssertNoViolations(helper); + should + .Be( + Types() + .That() + .DoNotHaveAnyAttributesWithNamedArguments( + [("NamedParameter2", helper.UnusedAttributeStringValue)] + ) + ) + .AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should + .BeTypesThat() + .DoNotHaveAnyAttributesWithNamedArguments( + ("InvalidName", helper.Attribute1StringArgument) + ) + .AssertNoViolations(helper); + should + .BeTypesThat() + .DoNotHaveAnyAttributesWithNamedArguments( + [("InvalidName", helper.Attribute1StringArgument)] + ) + .AssertNoViolations(helper); + should + .BeTypesThat() + .DoNotHaveAnyAttributesWithNamedArguments( + ("NamedParameter2", helper.UnusedAttributeStringValue) + ) + .AssertNoViolations(helper); + should + .BeTypesThat() + .DoNotHaveAnyAttributesWithNamedArguments( + [("NamedParameter2", helper.UnusedAttributeStringValue)] + ) + .AssertNoViolations(helper); + + helper.AddSnapshotHeader("Violations with type arguments"); + should = Types().That().Are(helper.ClassWithSingleAttributeWithNamedArguments).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should + .NotHaveAnyAttributesWithNamedArguments( + ("NamedParameter1", helper.Attribute1TypeArgumentSystemType) + ) + .AssertOnlyViolations(helper); + should + .NotHaveAnyAttributesWithNamedArguments( + [("NamedParameter1", helper.Attribute1TypeArgumentSystemType)] + ) + .AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should + .Be( + Types() + .That() + .DoNotHaveAnyAttributesWithNamedArguments( + ("NamedParameter1", helper.Attribute1TypeArgumentSystemType) + ) + ) + .AssertOnlyViolations(helper); + should + .Be( + Types() + .That() + .DoNotHaveAnyAttributesWithNamedArguments( + [("NamedParameter1", helper.Attribute1TypeArgumentSystemType)] + ) + ) + .AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should + .BeTypesThat() + .DoNotHaveAnyAttributesWithNamedArguments( + ("NamedParameter1", helper.Attribute1TypeArgumentSystemType) + ) + .AssertOnlyViolations(helper); + should + .BeTypesThat() + .DoNotHaveAnyAttributesWithNamedArguments( + [("NamedParameter1", helper.Attribute1TypeArgumentSystemType)] + ) + .AssertOnlyViolations(helper); + + helper.AddSnapshotHeader("Violations with value arguments"); + should = Types().That().Are(helper.ClassWithSingleAttributeWithNamedArguments).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should + .NotHaveAnyAttributesWithNamedArguments( + ("NamedParameter2", helper.Attribute1StringArgument) + ) + .AssertOnlyViolations(helper); + should + .NotHaveAnyAttributesWithNamedArguments( + [("NamedParameter2", helper.Attribute1StringArgument)] + ) + .AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should + .Be( + Types() + .That() + .DoNotHaveAnyAttributesWithNamedArguments( + ("NamedParameter2", helper.Attribute1StringArgument) + ) + ) + .AssertOnlyViolations(helper); + should + .Be( + Types() + .That() + .DoNotHaveAnyAttributesWithNamedArguments( + [("NamedParameter2", helper.Attribute1StringArgument)] + ) + ) + .AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should + .BeTypesThat() + .DoNotHaveAnyAttributesWithNamedArguments( + ("NamedParameter2", helper.Attribute1StringArgument) + ) + .AssertOnlyViolations(helper); + should + .BeTypesThat() + .DoNotHaveAnyAttributesWithNamedArguments( + [("NamedParameter2", helper.Attribute1StringArgument)] + ) + .AssertOnlyViolations(helper); + + helper.AddSnapshotHeader("Empty arguments"); + should = Types().That().Are(helper.ClassWithSingleAttributeWithNamedArguments).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should.NotHaveAnyAttributesWithNamedArguments([]).AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should + .Be(Types().That().DoNotHaveAnyAttributesWithNamedArguments([])) + .AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should + .BeTypesThat() + .DoNotHaveAnyAttributesWithNamedArguments([]) + .AssertNoViolations(helper); + + helper.AddSnapshotHeader("Multiple arguments"); + should = Types().That().Are(helper.ClassWithSingleAttributeWithNamedArguments).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should + .NotHaveAnyAttributesWithNamedArguments( + ("NamedParameter1", helper.Attribute1TypeArgument), + ("NamedParameter2", helper.Attribute1StringArgument) + ) + .AssertOnlyViolations(helper); + should + .NotHaveAnyAttributesWithNamedArguments( + [ + ("NamedParameter1", helper.Attribute1TypeArgument), + ("NamedParameter2", helper.Attribute1StringArgument), + ] + ) + .AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should + .Be( + Types() + .That() + .DoNotHaveAnyAttributesWithNamedArguments( + ("NamedParameter1", helper.Attribute1TypeArgument), + ("NamedParameter2", helper.Attribute1StringArgument) + ) + ) + .AssertOnlyViolations(helper); + should + .Be( + Types() + .That() + .DoNotHaveAnyAttributesWithNamedArguments( + [ + ("NamedParameter1", helper.Attribute1TypeArgument), + ("NamedParameter2", helper.Attribute1StringArgument), + ] + ) + ) + .AssertOnlyViolations(helper); + + helper.AddSnapshotHeader("Multiple inputs"); + should = Types() + .That() + .Are( + helper.ClassWithSingleAttributeWithNamedArguments, + helper.ClassWithTwoAttributesWithNamedArguments + ) + .Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should + .NotHaveAnyAttributesWithNamedArguments( + ("NamedParameter1", helper.Attribute1TypeArgumentSystemType) + ) + .AssertOnlyViolations(helper); + should + .NotHaveAnyAttributesWithNamedArguments( + [("NamedParameter1", helper.Attribute1TypeArgumentSystemType)] + ) + .AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should + .Be( + Types() + .That() + .DoNotHaveAnyAttributesWithNamedArguments( + ("NamedParameter1", helper.Attribute1TypeArgumentSystemType) + ) + ) + .AssertOnlyViolations(helper); + should + .Be( + Types() + .That() + .DoNotHaveAnyAttributesWithNamedArguments( + [("NamedParameter1", helper.Attribute1TypeArgumentSystemType)] + ) + ) + .AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should + .BeTypesThat() + .DoNotHaveAnyAttributesWithNamedArguments( + ("NamedParameter1", helper.Attribute1TypeArgumentSystemType) + ) + .AssertOnlyViolations(helper); + should + .BeTypesThat() + .DoNotHaveAnyAttributesWithNamedArguments( + [("NamedParameter1", helper.Attribute1TypeArgumentSystemType)] + ) + .AssertOnlyViolations(helper); + + await helper.AssertSnapshotMatches(); + } + + [Fact] + public async Task NotHaveAttributeWithArgumentsTest() + { + var helper = new AttributeAssemblyTestHelpers(); + + helper.AddSnapshotHeader("No violations with type arguments"); + var should = Types().That().Are(helper.ClassWithSingleAttributeWithArguments).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should + .NotHaveAttributeWithArguments( + helper.Attribute1, + helper.Attribute2TypeArgumentSystemType + ) + .AssertNoViolations(helper); + should + .NotHaveAttributeWithArguments( + helper.Attribute1, + [helper.Attribute2TypeArgumentSystemType] + ) + .AssertNoViolations(helper); + should + .NotHaveAttributeWithArguments( + helper.Attribute1SystemType, + helper.Attribute2TypeArgumentSystemType + ) + .AssertNoViolations(helper); + should + .NotHaveAttributeWithArguments( + helper.Attribute1SystemType, + [helper.Attribute2TypeArgumentSystemType] + ) + .AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should + .Be( + Types() + .That() + .DoNotHaveAttributeWithArguments( + helper.Attribute1, + helper.Attribute2TypeArgumentSystemType + ) + ) + .AssertNoViolations(helper); + should + .Be( + Types() + .That() + .DoNotHaveAttributeWithArguments( + helper.Attribute1, + [helper.Attribute2TypeArgumentSystemType] + ) + ) + .AssertNoViolations(helper); + should + .Be( + Types() + .That() + .DoNotHaveAttributeWithArguments( + helper.Attribute1SystemType, + helper.Attribute2TypeArgumentSystemType + ) + ) + .AssertNoViolations(helper); + should + .Be( + Types() + .That() + .DoNotHaveAttributeWithArguments( + helper.Attribute1SystemType, + [helper.Attribute2TypeArgumentSystemType] + ) + ) + .AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should + .BeTypesThat() + .DoNotHaveAttributeWithArguments( + helper.Attribute1, + helper.Attribute2TypeArgumentSystemType + ) + .AssertNoViolations(helper); + should + .BeTypesThat() + .DoNotHaveAttributeWithArguments( + helper.Attribute1, + [helper.Attribute2TypeArgumentSystemType] + ) + .AssertNoViolations(helper); + should + .BeTypesThat() + .DoNotHaveAttributeWithArguments( + helper.Attribute1SystemType, + helper.Attribute2TypeArgumentSystemType + ) + .AssertNoViolations(helper); + should + .BeTypesThat() + .DoNotHaveAttributeWithArguments( + helper.Attribute1SystemType, + [helper.Attribute2TypeArgumentSystemType] + ) + .AssertNoViolations(helper); + + helper.AddSnapshotHeader("No violations with value arguments"); + should = Types().That().Are(helper.ClassWithSingleAttributeWithArguments).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should + .NotHaveAttributeWithArguments(helper.Attribute1, helper.Attribute2StringArgument) + .AssertNoViolations(helper); + should + .NotHaveAttributeWithArguments(helper.Attribute1, [helper.Attribute2StringArgument]) + .AssertNoViolations(helper); + should + .NotHaveAttributeWithArguments( + helper.Attribute1SystemType, + helper.Attribute2StringArgument + ) + .AssertNoViolations(helper); + should + .NotHaveAttributeWithArguments( + helper.Attribute1SystemType, + [helper.Attribute2StringArgument] + ) + .AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should + .Be( + Types() + .That() + .DoNotHaveAttributeWithArguments( + helper.Attribute1, + helper.Attribute2StringArgument + ) + ) + .AssertNoViolations(helper); + should + .Be( + Types() + .That() + .DoNotHaveAttributeWithArguments( + helper.Attribute1, + [helper.Attribute2StringArgument] + ) + ) + .AssertNoViolations(helper); + should + .Be( + Types() + .That() + .DoNotHaveAttributeWithArguments( + helper.Attribute1SystemType, + helper.Attribute2StringArgument + ) + ) + .AssertNoViolations(helper); + should + .Be( + Types() + .That() + .DoNotHaveAttributeWithArguments( + helper.Attribute1SystemType, + [helper.Attribute2StringArgument] + ) + ) + .AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should + .BeTypesThat() + .DoNotHaveAttributeWithArguments(helper.Attribute1, helper.Attribute2StringArgument) + .AssertNoViolations(helper); + should + .BeTypesThat() + .DoNotHaveAttributeWithArguments(helper.Attribute1, [helper.Attribute2StringArgument]) + .AssertNoViolations(helper); + should + .BeTypesThat() + .DoNotHaveAttributeWithArguments( + helper.Attribute1SystemType, + helper.Attribute2StringArgument + ) + .AssertNoViolations(helper); + should + .BeTypesThat() + .DoNotHaveAttributeWithArguments( + helper.Attribute1SystemType, + [helper.Attribute2StringArgument] + ) + .AssertNoViolations(helper); + + helper.AddSnapshotHeader("Violations with type arguments"); + should = Types().That().Are(helper.ClassWithSingleAttributeWithArguments).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should + .NotHaveAttributeWithArguments( + helper.Attribute1, + helper.Attribute1TypeArgumentSystemType + ) + .AssertOnlyViolations(helper); + should + .NotHaveAttributeWithArguments( + helper.Attribute1, + [helper.Attribute1TypeArgumentSystemType] + ) + .AssertOnlyViolations(helper); + should + .NotHaveAttributeWithArguments( + helper.Attribute1SystemType, + helper.Attribute1TypeArgumentSystemType + ) + .AssertOnlyViolations(helper); + should + .NotHaveAttributeWithArguments( + helper.Attribute1SystemType, + [helper.Attribute1TypeArgumentSystemType] + ) + .AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should + .Be( + Types() + .That() + .DoNotHaveAttributeWithArguments( + helper.Attribute1, + helper.Attribute1TypeArgumentSystemType + ) + ) + .AssertOnlyViolations(helper); + should + .Be( + Types() + .That() + .DoNotHaveAttributeWithArguments( + helper.Attribute1, + [helper.Attribute1TypeArgumentSystemType] + ) + ) + .AssertOnlyViolations(helper); + should + .Be( + Types() + .That() + .DoNotHaveAttributeWithArguments( + helper.Attribute1SystemType, + helper.Attribute1TypeArgumentSystemType + ) + ) + .AssertOnlyViolations(helper); + should + .Be( + Types() + .That() + .DoNotHaveAttributeWithArguments( + helper.Attribute1SystemType, + [helper.Attribute1TypeArgumentSystemType] + ) + ) + .AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should + .BeTypesThat() + .DoNotHaveAttributeWithArguments( + helper.Attribute1, + helper.Attribute1TypeArgumentSystemType + ) + .AssertOnlyViolations(helper); + should + .BeTypesThat() + .DoNotHaveAttributeWithArguments( + helper.Attribute1, + [helper.Attribute1TypeArgumentSystemType] + ) + .AssertOnlyViolations(helper); + should + .BeTypesThat() + .DoNotHaveAttributeWithArguments( + helper.Attribute1SystemType, + helper.Attribute1TypeArgumentSystemType + ) + .AssertOnlyViolations(helper); + should + .BeTypesThat() + .DoNotHaveAttributeWithArguments( + helper.Attribute1SystemType, + [helper.Attribute1TypeArgumentSystemType] + ) + .AssertOnlyViolations(helper); + + helper.AddSnapshotHeader("Violations with value arguments"); + should = Types().That().Are(helper.ClassWithSingleAttributeWithArguments).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should + .NotHaveAttributeWithArguments(helper.Attribute1, helper.Attribute1IntegerArgument) + .AssertOnlyViolations(helper); + should + .NotHaveAttributeWithArguments(helper.Attribute1, [helper.Attribute1IntegerArgument]) + .AssertOnlyViolations(helper); + should + .NotHaveAttributeWithArguments( + helper.Attribute1SystemType, + helper.Attribute1IntegerArgument + ) + .AssertOnlyViolations(helper); + should + .NotHaveAttributeWithArguments( + helper.Attribute1SystemType, + [helper.Attribute1IntegerArgument] + ) + .AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should + .Be( + Types() + .That() + .DoNotHaveAttributeWithArguments( + helper.Attribute1, + helper.Attribute1IntegerArgument + ) + ) + .AssertOnlyViolations(helper); + should + .Be( + Types() + .That() + .DoNotHaveAttributeWithArguments( + helper.Attribute1, + [helper.Attribute1IntegerArgument] + ) + ) + .AssertOnlyViolations(helper); + should + .Be( + Types() + .That() + .DoNotHaveAttributeWithArguments( + helper.Attribute1SystemType, + helper.Attribute1IntegerArgument + ) + ) + .AssertOnlyViolations(helper); + should + .Be( + Types() + .That() + .DoNotHaveAttributeWithArguments( + helper.Attribute1SystemType, + [helper.Attribute1IntegerArgument] + ) + ) + .AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should + .BeTypesThat() + .DoNotHaveAttributeWithArguments(helper.Attribute1, helper.Attribute1IntegerArgument) + .AssertOnlyViolations(helper); + should + .BeTypesThat() + .DoNotHaveAttributeWithArguments(helper.Attribute1, [helper.Attribute1IntegerArgument]) + .AssertOnlyViolations(helper); + should + .BeTypesThat() + .DoNotHaveAttributeWithArguments( + helper.Attribute1SystemType, + helper.Attribute1IntegerArgument + ) + .AssertOnlyViolations(helper); + should + .BeTypesThat() + .DoNotHaveAttributeWithArguments( + helper.Attribute1SystemType, + [helper.Attribute1IntegerArgument] + ) + .AssertOnlyViolations(helper); + + helper.AddSnapshotHeader("Unused attribute"); + should = Types().That().Are(helper.ClassWithSingleAttributeWithArguments).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should + .NotHaveAttributeWithArguments(helper.UnusedAttribute, helper.Attribute1StringArgument) + .AssertNoViolations(helper); + should + .NotHaveAttributeWithArguments( + helper.UnusedAttribute, + [helper.Attribute1StringArgument] + ) + .AssertNoViolations(helper); + should + .NotHaveAttributeWithArguments( + helper.UnusedAttributeSystemType, + helper.Attribute1StringArgument + ) + .AssertNoViolations(helper); + should + .NotHaveAttributeWithArguments( + helper.UnusedAttributeSystemType, + [helper.Attribute1StringArgument] + ) + .AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should + .Be( + Types() + .That() + .DoNotHaveAttributeWithArguments( + helper.UnusedAttribute, + helper.Attribute1StringArgument + ) + ) + .AssertNoViolations(helper); + should + .Be( + Types() + .That() + .DoNotHaveAttributeWithArguments( + helper.UnusedAttribute, + [helper.Attribute1StringArgument] + ) + ) + .AssertNoViolations(helper); + should + .Be( + Types() + .That() + .DoNotHaveAttributeWithArguments( + helper.UnusedAttributeSystemType, + helper.Attribute1StringArgument + ) + ) + .AssertNoViolations(helper); + should + .Be( + Types() + .That() + .DoNotHaveAttributeWithArguments( + helper.UnusedAttributeSystemType, + [helper.Attribute1StringArgument] + ) + ) + .AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should + .BeTypesThat() + .DoNotHaveAttributeWithArguments( + helper.UnusedAttribute, + helper.Attribute1StringArgument + ) + .AssertNoViolations(helper); + should + .BeTypesThat() + .DoNotHaveAttributeWithArguments( + helper.UnusedAttribute, + [helper.Attribute1StringArgument] + ) + .AssertNoViolations(helper); + should + .BeTypesThat() + .DoNotHaveAttributeWithArguments( + helper.UnusedAttributeSystemType, + helper.Attribute1StringArgument + ) + .AssertNoViolations(helper); + should + .BeTypesThat() + .DoNotHaveAttributeWithArguments( + helper.UnusedAttributeSystemType, + [helper.Attribute1StringArgument] + ) + .AssertNoViolations(helper); + + helper.AddSnapshotHeader("Type outside of architecture"); + should = Types().That().Are(helper.ClassWithSingleAttributeWithArguments).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should + .NotHaveAttributeWithArguments(typeof(TypeDependencyNamespace.BaseClass), 1) + .AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should + .Be( + Types() + .That() + .DoNotHaveAttributeWithArguments(typeof(TypeDependencyNamespace.BaseClass), 1) + ) + .AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should + .BeTypesThat() + .DoNotHaveAttributeWithArguments(typeof(TypeDependencyNamespace.BaseClass), 1) + .AssertNoViolations(helper); + + helper.AddSnapshotHeader("Null argument"); + should = Types().That().Are(helper.ClassWithSingleAttributeWithArguments).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should + .NotHaveAttributeWithArguments(helper.UnusedAttribute, null) + .AssertNoViolations(helper); + should + .NotHaveAttributeWithArguments(helper.UnusedAttributeSystemType, null) + .AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should + .Be(Types().That().DoNotHaveAttributeWithArguments(helper.UnusedAttribute, null)) + .AssertNoViolations(helper); + should + .Be( + Types() + .That() + .DoNotHaveAttributeWithArguments(helper.UnusedAttributeSystemType, null) + ) + .AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should + .BeTypesThat() + .DoNotHaveAttributeWithArguments(helper.UnusedAttribute, null) + .AssertNoViolations(helper); + should + .BeTypesThat() + .DoNotHaveAttributeWithArguments(helper.UnusedAttributeSystemType, null) + .AssertNoViolations(helper); + + helper.AddSnapshotHeader("Empty arguments"); + should = Types().That().Are(helper.ClassWithSingleAttributeWithArguments).Should(); + should.NotHaveAttributeWithArguments(helper.Attribute1, []).AssertOnlyViolations(helper); + should + .NotHaveAttributeWithArguments(helper.Attribute1SystemType, []) + .AssertOnlyViolations(helper); + + helper.AddSnapshotHeader("Multiple arguments"); + should = Types().That().Are(helper.ClassWithSingleAttributeWithArguments).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should + .NotHaveAttributeWithArguments( + helper.Attribute1, + helper.Attribute1TypeArgumentSystemType, + helper.Attribute1IntegerArgument + ) + .AssertOnlyViolations(helper); + should + .NotHaveAttributeWithArguments( + helper.Attribute1, + [helper.Attribute1TypeArgumentSystemType, helper.Attribute1IntegerArgument] + ) + .AssertOnlyViolations(helper); + should + .NotHaveAttributeWithArguments( + helper.Attribute1SystemType, + helper.Attribute1TypeArgumentSystemType, + helper.Attribute1IntegerArgument + ) + .AssertOnlyViolations(helper); + should + .NotHaveAttributeWithArguments( + helper.Attribute1SystemType, + [helper.Attribute1TypeArgumentSystemType, helper.Attribute1IntegerArgument] + ) + .AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should + .Be( + Types() + .That() + .DoNotHaveAttributeWithArguments( + helper.Attribute1, + helper.Attribute1TypeArgumentSystemType, + helper.Attribute1IntegerArgument + ) + ) + .AssertOnlyViolations(helper); + should + .Be( + Types() + .That() + .DoNotHaveAttributeWithArguments( + helper.Attribute1, + [helper.Attribute1TypeArgumentSystemType, helper.Attribute1IntegerArgument] + ) + ) + .AssertOnlyViolations(helper); + should + .Be( + Types() + .That() + .DoNotHaveAttributeWithArguments( + helper.Attribute1SystemType, + helper.Attribute1TypeArgumentSystemType, + helper.Attribute1IntegerArgument + ) + ) + .AssertOnlyViolations(helper); + should + .Be( + Types() + .That() + .DoNotHaveAttributeWithArguments( + helper.Attribute1SystemType, + [helper.Attribute1TypeArgumentSystemType, helper.Attribute1IntegerArgument] + ) + ) + .AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should + .BeTypesThat() + .DoNotHaveAttributeWithArguments( + helper.Attribute1, + helper.Attribute1TypeArgumentSystemType, + helper.Attribute1IntegerArgument + ) + .AssertOnlyViolations(helper); + should + .BeTypesThat() + .DoNotHaveAttributeWithArguments( + helper.Attribute1, + [helper.Attribute1TypeArgumentSystemType, helper.Attribute1IntegerArgument] + ) + .AssertOnlyViolations(helper); + should + .BeTypesThat() + .DoNotHaveAttributeWithArguments( + helper.Attribute1SystemType, + helper.Attribute1TypeArgumentSystemType, + helper.Attribute1IntegerArgument + ) + .AssertOnlyViolations(helper); + should + .BeTypesThat() + .DoNotHaveAttributeWithArguments( + helper.Attribute1SystemType, + [helper.Attribute1TypeArgumentSystemType, helper.Attribute1IntegerArgument] + ) + .AssertOnlyViolations(helper); + + helper.AddSnapshotHeader("Multiple inputs"); + should = Types() + .That() + .Are( + helper.ClassWithSingleAttributeWithArguments, + helper.ClassWithTwoAttributesWithNamedArguments + ) + .Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should + .NotHaveAttributeWithArguments(helper.Attribute1, helper.Attribute1StringArgument) + .AssertOnlyViolations(helper); + should + .NotHaveAttributeWithArguments(helper.Attribute1, [helper.Attribute1StringArgument]) + .AssertOnlyViolations(helper); + should + .NotHaveAttributeWithArguments( + helper.Attribute1SystemType, + helper.Attribute1StringArgument + ) + .AssertOnlyViolations(helper); + should + .NotHaveAttributeWithArguments( + helper.Attribute1SystemType, + [helper.Attribute1StringArgument] + ) + .AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should + .Be( + Types() + .That() + .DoNotHaveAttributeWithArguments( + helper.Attribute1, + helper.Attribute1StringArgument + ) + ) + .AssertOnlyViolations(helper); + should + .Be( + Types() + .That() + .DoNotHaveAttributeWithArguments( + helper.Attribute1, + [helper.Attribute1StringArgument] + ) + ) + .AssertOnlyViolations(helper); + should + .Be( + Types() + .That() + .DoNotHaveAttributeWithArguments( + helper.Attribute1SystemType, + helper.Attribute1StringArgument + ) + ) + .AssertOnlyViolations(helper); + should + .Be( + Types() + .That() + .DoNotHaveAttributeWithArguments( + helper.Attribute1SystemType, + [helper.Attribute1StringArgument] + ) + ) + .AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should + .BeTypesThat() + .DoNotHaveAttributeWithArguments(helper.Attribute1, helper.Attribute1StringArgument) + .AssertOnlyViolations(helper); + should + .BeTypesThat() + .DoNotHaveAttributeWithArguments(helper.Attribute1, [helper.Attribute1StringArgument]) + .AssertOnlyViolations(helper); + should + .BeTypesThat() + .DoNotHaveAttributeWithArguments( + helper.Attribute1SystemType, + helper.Attribute1StringArgument + ) + .AssertOnlyViolations(helper); + should + .BeTypesThat() + .DoNotHaveAttributeWithArguments( + helper.Attribute1SystemType, + [helper.Attribute1StringArgument] + ) + .AssertOnlyViolations(helper); + + await helper.AssertSnapshotMatches(); + } + + [Fact] + public async Task NotHaveAttributeWithNamedArgumentsTest() + { + var helper = new AttributeAssemblyTestHelpers(); + + helper.AddSnapshotHeader("No violations with type arguments"); + var should = Types().That().Are(helper.ClassWithSingleAttributeWithNamedArguments).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should + .NotHaveAttributeWithNamedArguments( + helper.Attribute1, + ("NamedParameter1", helper.Attribute2TypeArgumentSystemType) + ) + .AssertNoViolations(helper); + should + .NotHaveAttributeWithNamedArguments( + helper.Attribute1, + [("NamedParameter1", helper.Attribute2TypeArgumentSystemType)] + ) + .AssertNoViolations(helper); + should + .NotHaveAttributeWithNamedArguments( + helper.Attribute1SystemType, + ("NamedParameter1", helper.Attribute2TypeArgumentSystemType) + ) + .AssertNoViolations(helper); + should + .NotHaveAttributeWithNamedArguments( + helper.Attribute1SystemType, + [("NamedParameter1", helper.Attribute2TypeArgumentSystemType)] + ) + .AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should + .Be( + Types() + .That() + .DoNotHaveAttributeWithNamedArguments( + helper.Attribute1, + ("NamedParameter1", helper.Attribute2TypeArgumentSystemType) + ) + ) + .AssertNoViolations(helper); + should + .Be( + Types() + .That() + .DoNotHaveAttributeWithNamedArguments( + helper.Attribute1, + [("NamedParameter1", helper.Attribute2TypeArgumentSystemType)] + ) + ) + .AssertNoViolations(helper); + should + .Be( + Types() + .That() + .DoNotHaveAttributeWithNamedArguments( + helper.Attribute1SystemType, + ("NamedParameter1", helper.Attribute2TypeArgumentSystemType) + ) + ) + .AssertNoViolations(helper); + should + .Be( + Types() + .That() + .DoNotHaveAttributeWithNamedArguments( + helper.Attribute1SystemType, + [("NamedParameter1", helper.Attribute2TypeArgumentSystemType)] + ) + ) + .AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should + .BeTypesThat() + .DoNotHaveAttributeWithNamedArguments( + helper.Attribute1, + ("NamedParameter1", helper.Attribute2TypeArgumentSystemType) + ) + .AssertNoViolations(helper); + should + .BeTypesThat() + .DoNotHaveAttributeWithNamedArguments( + helper.Attribute1, + [("NamedParameter1", helper.Attribute2TypeArgumentSystemType)] + ) + .AssertNoViolations(helper); + should + .BeTypesThat() + .DoNotHaveAttributeWithNamedArguments( + helper.Attribute1SystemType, + ("NamedParameter1", helper.Attribute2TypeArgumentSystemType) + ) + .AssertNoViolations(helper); + should + .BeTypesThat() + .DoNotHaveAttributeWithNamedArguments( + helper.Attribute1SystemType, + [("NamedParameter1", helper.Attribute2TypeArgumentSystemType)] + ) + .AssertNoViolations(helper); + + helper.AddSnapshotHeader("No violations with value arguments"); + should = Types().That().Are(helper.ClassWithSingleAttributeWithNamedArguments).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should + .NotHaveAttributeWithNamedArguments( + helper.Attribute1, + ("NamedParameter2", helper.Attribute2StringArgument) + ) + .AssertNoViolations(helper); + should + .NotHaveAttributeWithNamedArguments( + helper.Attribute1, + [("NamedParameter2", helper.Attribute2StringArgument)] + ) + .AssertNoViolations(helper); + should + .NotHaveAttributeWithNamedArguments( + helper.Attribute1SystemType, + ("NamedParameter2", helper.Attribute2StringArgument) + ) + .AssertNoViolations(helper); + should + .NotHaveAttributeWithNamedArguments( + helper.Attribute1SystemType, + [("NamedParameter2", helper.Attribute2StringArgument)] + ) + .AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should + .Be( + Types() + .That() + .DoNotHaveAttributeWithNamedArguments( + helper.Attribute1, + ("NamedParameter2", helper.Attribute2StringArgument) + ) + ) + .AssertNoViolations(helper); + should + .Be( + Types() + .That() + .DoNotHaveAttributeWithNamedArguments( + helper.Attribute1, + [("NamedParameter2", helper.Attribute2StringArgument)] + ) + ) + .AssertNoViolations(helper); + should + .Be( + Types() + .That() + .DoNotHaveAttributeWithNamedArguments( + helper.Attribute1SystemType, + ("NamedParameter2", helper.Attribute2StringArgument) + ) + ) + .AssertNoViolations(helper); + should + .Be( + Types() + .That() + .DoNotHaveAttributeWithNamedArguments( + helper.Attribute1SystemType, + [("NamedParameter2", helper.Attribute2StringArgument)] + ) + ) + .AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should + .BeTypesThat() + .DoNotHaveAttributeWithNamedArguments( + helper.Attribute1, + ("NamedParameter2", helper.Attribute2StringArgument) + ) + .AssertNoViolations(helper); + should + .BeTypesThat() + .DoNotHaveAttributeWithNamedArguments( + helper.Attribute1, + [("NamedParameter2", helper.Attribute2StringArgument)] + ) + .AssertNoViolations(helper); + should + .BeTypesThat() + .DoNotHaveAttributeWithNamedArguments( + helper.Attribute1SystemType, + ("NamedParameter2", helper.Attribute2StringArgument) + ) + .AssertNoViolations(helper); + should + .BeTypesThat() + .DoNotHaveAttributeWithNamedArguments( + helper.Attribute1SystemType, + [("NamedParameter2", helper.Attribute2StringArgument)] + ) + .AssertNoViolations(helper); + + helper.AddSnapshotHeader("Violations with type arguments"); + should = Types().That().Are(helper.ClassWithSingleAttributeWithNamedArguments).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should + .NotHaveAttributeWithNamedArguments( + helper.Attribute1, + ("NamedParameter1", helper.Attribute1TypeArgumentSystemType) + ) + .AssertOnlyViolations(helper); + should + .NotHaveAttributeWithNamedArguments( + helper.Attribute1, + [("NamedParameter1", helper.Attribute1TypeArgumentSystemType)] + ) + .AssertOnlyViolations(helper); + should + .NotHaveAttributeWithNamedArguments( + helper.Attribute1SystemType, + ("NamedParameter1", helper.Attribute1TypeArgumentSystemType) + ) + .AssertOnlyViolations(helper); + should + .NotHaveAttributeWithNamedArguments( + helper.Attribute1SystemType, + [("NamedParameter1", helper.Attribute1TypeArgumentSystemType)] + ) + .AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should + .Be( + Types() + .That() + .DoNotHaveAttributeWithNamedArguments( + helper.Attribute1, + ("NamedParameter1", helper.Attribute1TypeArgumentSystemType) + ) + ) + .AssertOnlyViolations(helper); + should + .Be( + Types() + .That() + .DoNotHaveAttributeWithNamedArguments( + helper.Attribute1, + [("NamedParameter1", helper.Attribute1TypeArgumentSystemType)] + ) + ) + .AssertOnlyViolations(helper); + should + .Be( + Types() + .That() + .DoNotHaveAttributeWithNamedArguments( + helper.Attribute1SystemType, + ("NamedParameter1", helper.Attribute1TypeArgumentSystemType) + ) + ) + .AssertOnlyViolations(helper); + should + .Be( + Types() + .That() + .DoNotHaveAttributeWithNamedArguments( + helper.Attribute1SystemType, + [("NamedParameter1", helper.Attribute1TypeArgumentSystemType)] + ) + ) + .AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should + .BeTypesThat() + .DoNotHaveAttributeWithNamedArguments( + helper.Attribute1, + ("NamedParameter1", helper.Attribute1TypeArgumentSystemType) + ) + .AssertOnlyViolations(helper); + should + .BeTypesThat() + .DoNotHaveAttributeWithNamedArguments( + helper.Attribute1, + [("NamedParameter1", helper.Attribute1TypeArgumentSystemType)] + ) + .AssertOnlyViolations(helper); + should + .BeTypesThat() + .DoNotHaveAttributeWithNamedArguments( + helper.Attribute1SystemType, + ("NamedParameter1", helper.Attribute1TypeArgumentSystemType) + ) + .AssertOnlyViolations(helper); + should + .BeTypesThat() + .DoNotHaveAttributeWithNamedArguments( + helper.Attribute1SystemType, + [("NamedParameter1", helper.Attribute1TypeArgumentSystemType)] + ) + .AssertOnlyViolations(helper); + + helper.AddSnapshotHeader("Violations with value arguments"); + should = Types().That().Are(helper.ClassWithSingleAttributeWithNamedArguments).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should + .NotHaveAttributeWithNamedArguments( + helper.Attribute1, + ("NamedParameter2", helper.Attribute1StringArgument) + ) + .AssertOnlyViolations(helper); + should + .NotHaveAttributeWithNamedArguments( + helper.Attribute1, + [("NamedParameter2", helper.Attribute1StringArgument)] + ) + .AssertOnlyViolations(helper); + should + .NotHaveAttributeWithNamedArguments( + helper.Attribute1SystemType, + ("NamedParameter2", helper.Attribute1StringArgument) + ) + .AssertOnlyViolations(helper); + should + .NotHaveAttributeWithNamedArguments( + helper.Attribute1SystemType, + [("NamedParameter2", helper.Attribute1StringArgument)] + ) + .AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should + .Be( + Types() + .That() + .DoNotHaveAttributeWithNamedArguments( + helper.Attribute1, + ("NamedParameter2", helper.Attribute1StringArgument) + ) + ) + .AssertOnlyViolations(helper); + should + .Be( + Types() + .That() + .DoNotHaveAttributeWithNamedArguments( + helper.Attribute1, + [("NamedParameter2", helper.Attribute1StringArgument)] + ) + ) + .AssertOnlyViolations(helper); + should + .Be( + Types() + .That() + .DoNotHaveAttributeWithNamedArguments( + helper.Attribute1SystemType, + ("NamedParameter2", helper.Attribute1StringArgument) + ) + ) + .AssertOnlyViolations(helper); + should + .Be( + Types() + .That() + .DoNotHaveAttributeWithNamedArguments( + helper.Attribute1SystemType, + [("NamedParameter2", helper.Attribute1StringArgument)] + ) + ) + .AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should + .BeTypesThat() + .DoNotHaveAttributeWithNamedArguments( + helper.Attribute1, + ("NamedParameter2", helper.Attribute1StringArgument) + ) + .AssertOnlyViolations(helper); + should + .BeTypesThat() + .DoNotHaveAttributeWithNamedArguments( + helper.Attribute1, + [("NamedParameter2", helper.Attribute1StringArgument)] + ) + .AssertOnlyViolations(helper); + should + .BeTypesThat() + .DoNotHaveAttributeWithNamedArguments( + helper.Attribute1SystemType, + ("NamedParameter2", helper.Attribute1StringArgument) + ) + .AssertOnlyViolations(helper); + should + .BeTypesThat() + .DoNotHaveAttributeWithNamedArguments( + helper.Attribute1SystemType, + [("NamedParameter2", helper.Attribute1StringArgument)] + ) + .AssertOnlyViolations(helper); + + helper.AddSnapshotHeader("Unused attribute"); + should = Types().That().Are(helper.ClassWithSingleAttributeWithNamedArguments).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should + .NotHaveAttributeWithNamedArguments( + helper.UnusedAttribute, + ("NamedParameter1", helper.Attribute1TypeArgument) + ) + .AssertNoViolations(helper); + should + .NotHaveAttributeWithNamedArguments( + helper.UnusedAttribute, + [("NamedParameter1", helper.Attribute1TypeArgument)] + ) + .AssertNoViolations(helper); + should + .NotHaveAttributeWithNamedArguments( + helper.UnusedAttributeSystemType, + ("NamedParameter1", helper.Attribute1TypeArgument) + ) + .AssertNoViolations(helper); + should + .NotHaveAttributeWithNamedArguments( + helper.UnusedAttributeSystemType, + [("NamedParameter1", helper.Attribute1TypeArgument)] + ) + .AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should + .Be( + Types() + .That() + .DoNotHaveAttributeWithNamedArguments( + helper.UnusedAttribute, + ("NamedParameter1", helper.Attribute1TypeArgument) + ) + ) + .AssertNoViolations(helper); + should + .Be( + Types() + .That() + .DoNotHaveAttributeWithNamedArguments( + helper.UnusedAttribute, + [("NamedParameter1", helper.Attribute1TypeArgument)] + ) + ) + .AssertNoViolations(helper); + should + .Be( + Types() + .That() + .DoNotHaveAttributeWithNamedArguments( + helper.UnusedAttributeSystemType, + ("NamedParameter1", helper.Attribute1TypeArgument) + ) + ) + .AssertNoViolations(helper); + should + .Be( + Types() + .That() + .DoNotHaveAttributeWithNamedArguments( + helper.UnusedAttributeSystemType, + [("NamedParameter1", helper.Attribute1TypeArgument)] + ) + ) + .AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should + .BeTypesThat() + .DoNotHaveAttributeWithNamedArguments( + helper.UnusedAttribute, + ("NamedParameter1", helper.Attribute1TypeArgument) + ) + .AssertNoViolations(helper); + should + .BeTypesThat() + .DoNotHaveAttributeWithNamedArguments( + helper.UnusedAttribute, + [("NamedParameter1", helper.Attribute1TypeArgument)] + ) + .AssertNoViolations(helper); + should + .BeTypesThat() + .DoNotHaveAttributeWithNamedArguments( + helper.UnusedAttributeSystemType, + ("NamedParameter1", helper.Attribute1TypeArgument) + ) + .AssertNoViolations(helper); + should + .BeTypesThat() + .DoNotHaveAttributeWithNamedArguments( + helper.UnusedAttributeSystemType, + [("NamedParameter1", helper.Attribute1TypeArgument)] + ) + .AssertNoViolations(helper); + + helper.AddSnapshotHeader("Type outside of architecture"); + should = Types().That().Are(helper.ClassWithSingleAttributeWithNamedArguments).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should + .NotHaveAttributeWithNamedArguments( + typeof(TypeDependencyNamespace.BaseClass), + ("NamedParameter1", helper.Attribute1TypeArgument) + ) + .AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should + .Be( + Types() + .That() + .DoNotHaveAttributeWithNamedArguments( + typeof(TypeDependencyNamespace.BaseClass), + ("NamedParameter1", helper.Attribute1TypeArgument) + ) + ) + .AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should + .BeTypesThat() + .DoNotHaveAttributeWithNamedArguments( + typeof(TypeDependencyNamespace.BaseClass), + ("NamedParameter1", helper.Attribute1TypeArgument) + ) + .AssertNoViolations(helper); + + helper.AddSnapshotHeader("Empty arguments"); + should = Types().That().Are(helper.ClassWithSingleAttributeWithNamedArguments).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should + .NotHaveAttributeWithNamedArguments(helper.Attribute1, []) + .AssertOnlyViolations(helper); + should + .NotHaveAttributeWithNamedArguments(helper.Attribute1SystemType, []) + .AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should + .Be(Types().That().DoNotHaveAttributeWithNamedArguments(helper.Attribute1, [])) + .AssertOnlyViolations(helper); + should + .Be( + Types().That().DoNotHaveAttributeWithNamedArguments(helper.Attribute1SystemType, []) + ) + .AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should + .BeTypesThat() + .DoNotHaveAttributeWithNamedArguments(helper.Attribute1, []) + .AssertOnlyViolations(helper); + should + .BeTypesThat() + .DoNotHaveAttributeWithNamedArguments(helper.Attribute1SystemType, []) + .AssertOnlyViolations(helper); + + helper.AddSnapshotHeader("Multiple arguments"); + should = Types().That().Are(helper.ClassWithSingleAttributeWithNamedArguments).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should + .NotHaveAttributeWithNamedArguments( + helper.Attribute1, + ("NamedParameter1", helper.Attribute1TypeArgumentSystemType), + ("NamedParameter2", helper.Attribute1StringArgument) + ) + .AssertOnlyViolations(helper); + should + .NotHaveAttributeWithNamedArguments( + helper.Attribute1, + [ + ("NamedParameter1", helper.Attribute1TypeArgumentSystemType), + ("NamedParameter2", helper.Attribute1StringArgument), + ] + ) + .AssertOnlyViolations(helper); + should + .NotHaveAttributeWithNamedArguments( + helper.Attribute1SystemType, + ("NamedParameter1", helper.Attribute1TypeArgumentSystemType), + ("NamedParameter2", helper.Attribute1StringArgument) + ) + .AssertOnlyViolations(helper); + should + .NotHaveAttributeWithNamedArguments( + helper.Attribute1SystemType, + [ + ("NamedParameter1", helper.Attribute1TypeArgumentSystemType), + ("NamedParameter2", helper.Attribute1StringArgument), + ] + ) + .AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should + .Be( + Types() + .That() + .DoNotHaveAttributeWithNamedArguments( + helper.Attribute1, + ("NamedParameter1", helper.Attribute1TypeArgumentSystemType), + ("NamedParameter2", helper.Attribute1StringArgument) + ) + ) + .AssertOnlyViolations(helper); + should + .Be( + Types() + .That() + .DoNotHaveAttributeWithNamedArguments( + helper.Attribute1, + [ + ("NamedParameter1", helper.Attribute1TypeArgumentSystemType), + ("NamedParameter2", helper.Attribute1StringArgument), + ] + ) + ) + .AssertOnlyViolations(helper); + should + .Be( + Types() + .That() + .DoNotHaveAttributeWithNamedArguments( + helper.Attribute1SystemType, + ("NamedParameter1", helper.Attribute1TypeArgumentSystemType), + ("NamedParameter2", helper.Attribute1StringArgument) + ) + ) + .AssertOnlyViolations(helper); + should + .Be( + Types() + .That() + .DoNotHaveAttributeWithNamedArguments( + helper.Attribute1SystemType, + [ + ("NamedParameter1", helper.Attribute1TypeArgumentSystemType), + ("NamedParameter2", helper.Attribute1StringArgument), + ] + ) + ) + .AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should + .BeTypesThat() + .DoNotHaveAttributeWithNamedArguments( + helper.Attribute1, + ("NamedParameter1", helper.Attribute1TypeArgumentSystemType), + ("NamedParameter2", helper.Attribute1StringArgument) + ) + .AssertOnlyViolations(helper); + should + .BeTypesThat() + .DoNotHaveAttributeWithNamedArguments( + helper.Attribute1, + [ + ("NamedParameter1", helper.Attribute1TypeArgumentSystemType), + ("NamedParameter2", helper.Attribute1StringArgument), + ] + ) + .AssertOnlyViolations(helper); + should + .BeTypesThat() + .DoNotHaveAttributeWithNamedArguments( + helper.Attribute1SystemType, + ("NamedParameter1", helper.Attribute1TypeArgumentSystemType), + ("NamedParameter2", helper.Attribute1StringArgument) + ) + .AssertOnlyViolations(helper); + should + .BeTypesThat() + .DoNotHaveAttributeWithNamedArguments( + helper.Attribute1SystemType, + [ + ("NamedParameter1", helper.Attribute1TypeArgumentSystemType), + ("NamedParameter2", helper.Attribute1StringArgument), + ] + ) + .AssertOnlyViolations(helper); + + helper.AddSnapshotHeader("Multiple inputs"); + should = Types() + .That() + .Are( + helper.ClassWithSingleAttributeWithNamedArguments, + helper.ClassWithTwoAttributesWithNamedArguments + ) + .Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should + .NotHaveAttributeWithNamedArguments( + helper.Attribute1, + ("NamedParameter1", helper.Attribute1TypeArgumentSystemType) + ) + .AssertOnlyViolations(helper); + should + .NotHaveAttributeWithNamedArguments( + helper.Attribute1, + [("NamedParameter1", helper.Attribute1TypeArgumentSystemType)] + ) + .AssertOnlyViolations(helper); + should + .NotHaveAttributeWithNamedArguments( + helper.Attribute1SystemType, + ("NamedParameter1", helper.Attribute1TypeArgumentSystemType) + ) + .AssertOnlyViolations(helper); + should + .NotHaveAttributeWithNamedArguments( + helper.Attribute1SystemType, + [("NamedParameter1", helper.Attribute1TypeArgumentSystemType)] + ) + .AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should + .Be( + Types() + .That() + .DoNotHaveAttributeWithNamedArguments( + helper.Attribute1, + ("NamedParameter1", helper.Attribute1TypeArgumentSystemType) + ) + ) + .AssertOnlyViolations(helper); + should + .Be( + Types() + .That() + .DoNotHaveAttributeWithNamedArguments( + helper.Attribute1, + [("NamedParameter1", helper.Attribute1TypeArgumentSystemType)] + ) + ) + .AssertOnlyViolations(helper); + should + .Be( + Types() + .That() + .DoNotHaveAttributeWithNamedArguments( + helper.Attribute1SystemType, + ("NamedParameter1", helper.Attribute1TypeArgumentSystemType) + ) + ) + .AssertOnlyViolations(helper); + should + .Be( + Types() + .That() + .DoNotHaveAttributeWithNamedArguments( + helper.Attribute1SystemType, + [("NamedParameter1", helper.Attribute1TypeArgumentSystemType)] + ) + ) + .AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should + .BeTypesThat() + .DoNotHaveAttributeWithNamedArguments( + helper.Attribute1, + ("NamedParameter1", helper.Attribute1TypeArgumentSystemType) + ) + .AssertOnlyViolations(helper); + should + .BeTypesThat() + .DoNotHaveAttributeWithNamedArguments( + helper.Attribute1, + [("NamedParameter1", helper.Attribute1TypeArgumentSystemType)] + ) + .AssertOnlyViolations(helper); + should + .BeTypesThat() + .DoNotHaveAttributeWithNamedArguments( + helper.Attribute1SystemType, + ("NamedParameter1", helper.Attribute1TypeArgumentSystemType) + ) + .AssertOnlyViolations(helper); + should + .BeTypesThat() + .DoNotHaveAttributeWithNamedArguments( + helper.Attribute1SystemType, + [("NamedParameter1", helper.Attribute1TypeArgumentSystemType)] + ) + .AssertOnlyViolations(helper); + + await helper.AssertSnapshotMatches(); + } + + [Fact] + public async Task NotHaveNameTest() { - private const string NoTypeName = "NotTheNameOfAnyType_58391351286"; - private static readonly Architecture Architecture = - StaticTestArchitectures.ArchUnitNETTestArchitecture; + var helper = new DependencyAssemblyTestHelper(); - private readonly IEnumerable _falseDependencies = new List - { - typeof(ClassWithNoDependencies1), - typeof(ClassWithNoDependencies2), - }; + helper.AddSnapshotHeader("No violations"); + var should = Types().That().Are(helper.BaseClass).Should(); - private readonly IEnumerable _types = Architecture.Types; + helper.AddSnapshotSubHeader("Conditions"); + should.NotHaveName(helper.BaseClass.FullName).AssertNoViolations(helper); + should.NotHaveNameMatching("^.*\\.Base.*$").AssertNoViolations(helper); + should.NotHaveFullName(helper.BaseClass.Name).AssertNoViolations(helper); + should.NotHaveFullNameMatching("^Base.*$").AssertNoViolations(helper); + should.NotHaveNameContaining(helper.BaseClass.Namespace.Name).AssertNoViolations(helper); + should.NotHaveFullNameContaining(helper.NonExistentObjectName).AssertNoViolations(helper); + should.NotHaveNameStartingWith(helper.BaseClass.Namespace.Name).AssertNoViolations(helper); + should.NotHaveNameEndingWith("Test").AssertNoViolations(helper); - [Fact] - public void AreTest() - { - //Tests with one argument - - foreach (var type in _types) - { - var typeIsItself = Types().That().Are(type).Should().Be(type); - var typeIsNotItself = Types().That().Are(type).Should().NotBe(type); - var otherTypesAreNotThisType = Types().That().AreNot(type).Should().NotBe(type); - var otherTypesAreThisType = Types().That().AreNot(type).Should().Be(type); - - var typeIsItselfPattern = Types().That().Are(type).Should().Be(type); - var typeIsNotItselfPattern = Types().That().Are(type).Should().NotBe(type); - var otherTypesAreNotThisTypePattern = Types() - .That() - .AreNot(type) - .Should() - .NotBe(type); - var otherTypesAreThisTypePattern = Types().That().AreNot(type).Should().Be(type); - - Assert.True(typeIsItself.HasNoViolations(Architecture)); - Assert.False(typeIsNotItself.HasNoViolations(Architecture)); - Assert.True(otherTypesAreNotThisType.HasNoViolations(Architecture)); - Assert.False(otherTypesAreThisType.HasNoViolations(Architecture)); - - Assert.True(typeIsItselfPattern.HasNoViolations(Architecture)); - Assert.False(typeIsNotItselfPattern.HasNoViolations(Architecture)); - Assert.True(otherTypesAreNotThisTypePattern.HasNoViolations(Architecture)); - Assert.False(otherTypesAreThisTypePattern.HasNoViolations(Architecture)); - } - - var publicTestClassIsPublic = Types() - .That() - .Are(StaticTestTypes.PublicTestClass) - .Should() - .BePublic(); - var publicTestClassIsNotPublic = Types() - .That() - .Are(StaticTestTypes.PublicTestClass) - .Should() - .NotBePublic(); - var notPublicTypesAreNotPublicTestClass = Types() - .That() - .AreNotPublic() - .Should() - .NotBe(StaticTestTypes.PublicTestClass); - var publicTypesAreNotPublicTestClass = Types() - .That() - .ArePublic() - .Should() - .NotBe(StaticTestTypes.PublicTestClass); + helper.AddSnapshotSubHeader("Predicates"); + should + .Be(Types().That().DoNotHaveName(helper.BaseClass.FullName)) + .AssertNoViolations(helper); + should.Be(Types().That().DoNotHaveNameMatching("^.*\\.Base.*$")).AssertNoViolations(helper); + should + .Be(Types().That().DoNotHaveFullName(helper.BaseClass.Name)) + .AssertNoViolations(helper); + should.Be(Types().That().DoNotHaveFullNameMatching("^Base.*$")).AssertNoViolations(helper); + should + .Be(Types().That().DoNotHaveNameContaining(helper.BaseClass.Namespace.Name)) + .AssertNoViolations(helper); + should + .Be(Types().That().DoNotHaveFullNameContaining(helper.NonExistentObjectName)) + .AssertNoViolations(helper); + should + .Be(Types().That().DoNotHaveNameStartingWith(helper.BaseClass.Namespace.Name)) + .AssertNoViolations(helper); + should.Be(Types().That().DoNotHaveNameEndingWith("Test")).AssertNoViolations(helper); - Assert.True(publicTestClassIsPublic.HasNoViolations(Architecture)); - Assert.False(publicTestClassIsNotPublic.HasNoViolations(Architecture)); - Assert.True(notPublicTypesAreNotPublicTestClass.HasNoViolations(Architecture)); - Assert.False(publicTypesAreNotPublicTestClass.HasNoViolations(Architecture)); + helper.AddSnapshotSubHeader("Predicates as conditions"); + should.BeTypesThat().DoNotHaveName(helper.BaseClass.FullName).AssertNoViolations(helper); + should.BeTypesThat().DoNotHaveNameMatching("^.*\\.Base.*$").AssertNoViolations(helper); + should.BeTypesThat().DoNotHaveFullName(helper.BaseClass.Name).AssertNoViolations(helper); + should.BeTypesThat().DoNotHaveFullNameMatching("^Base.*$").AssertNoViolations(helper); + should + .BeTypesThat() + .DoNotHaveNameContaining(helper.BaseClass.Namespace.Name) + .AssertNoViolations(helper); + should + .BeTypesThat() + .DoNotHaveFullNameContaining(helper.NonExistentObjectName) + .AssertNoViolations(helper); + should + .BeTypesThat() + .DoNotHaveNameStartingWith(helper.BaseClass.Namespace.Name) + .AssertNoViolations(helper); + should.BeTypesThat().DoNotHaveNameEndingWith("Test").AssertNoViolations(helper); - //Tests with multiple arguments + helper.AddSnapshotHeader("Violations"); + should = Types().That().Are(helper.BaseClass).Should(); - var publicTestClassAndInternalTestClassIsPublicOrInternal = Types() - .That() - .Are(StaticTestTypes.PublicTestClass, StaticTestTypes.InternalTestClass) - .Should() - .BePublic() - .OrShould() - .BeInternal(); - var publicTestClassAndInternalTestClassIsPublic = Types() - .That() - .Are(StaticTestTypes.PublicTestClass, StaticTestTypes.InternalTestClass) - .Should() - .BePublic(); - var notPublicAndNotInternalClassesAreNotPublicTestClassOrInternalTestClass = Types() - .That() - .AreNotPublic() - .And() - .AreNotInternal() - .Should() - .NotBe(StaticTestTypes.PublicTestClass, StaticTestTypes.InternalTestClass); - var internalTypesAreNotPublicTestClassOrInternalTestClass = Types() - .That() - .AreInternal() - .Should() - .NotBe(StaticTestTypes.PublicTestClass, StaticTestTypes.InternalTestClass); + helper.AddSnapshotSubHeader("Conditions"); + should.NotHaveName(helper.BaseClass.Name).AssertOnlyViolations(helper); + should.NotHaveNameMatching("^Base.*$").AssertOnlyViolations(helper); + should.NotHaveFullName(helper.BaseClass.FullName).AssertOnlyViolations(helper); + should.NotHaveFullNameMatching("^.*\\.Base.*$").AssertOnlyViolations(helper); + should.NotHaveNameContaining(helper.BaseClass.Name).AssertOnlyViolations(helper); + should + .NotHaveFullNameContaining(helper.BaseClass.Namespace.Name) + .AssertOnlyViolations(helper); + should.NotHaveNameStartingWith(helper.BaseClass.Name).AssertOnlyViolations(helper); + should.NotHaveNameEndingWith(helper.BaseClass.Name).AssertOnlyViolations(helper); - Assert.True( - publicTestClassAndInternalTestClassIsPublicOrInternal.HasNoViolations(Architecture) - ); - Assert.False(publicTestClassAndInternalTestClassIsPublic.HasNoViolations(Architecture)); - Assert.True( - notPublicAndNotInternalClassesAreNotPublicTestClassOrInternalTestClass.HasNoViolations( - Architecture - ) - ); - Assert.False( - internalTypesAreNotPublicTestClassOrInternalTestClass.HasNoViolations(Architecture) - ); + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().DoNotHaveName(helper.BaseClass.Name)).AssertOnlyViolations(helper); + should.Be(Types().That().DoNotHaveNameMatching("^Base.*$")).AssertOnlyViolations(helper); + should + .Be(Types().That().DoNotHaveFullName(helper.BaseClass.FullName)) + .AssertOnlyViolations(helper); + should + .Be(Types().That().DoNotHaveFullNameMatching("^.*\\.Base.*$")) + .AssertOnlyViolations(helper); + should + .Be(Types().That().DoNotHaveNameContaining(helper.BaseClass.Name)) + .AssertOnlyViolations(helper); + should + .Be(Types().That().DoNotHaveFullNameContaining(helper.BaseClass.Namespace.Name)) + .AssertOnlyViolations(helper); + should + .Be(Types().That().DoNotHaveNameStartingWith(helper.BaseClass.Name)) + .AssertOnlyViolations(helper); + should + .Be(Types().That().DoNotHaveNameEndingWith(helper.BaseClass.Name)) + .AssertOnlyViolations(helper); - //Tests with list + helper.AddSnapshotSubHeader("Predicates as conditions"); + should.BeTypesThat().DoNotHaveName(helper.BaseClass.Name).AssertOnlyViolations(helper); + should.BeTypesThat().DoNotHaveNameMatching("^Base.*$").AssertOnlyViolations(helper); + should + .BeTypesThat() + .DoNotHaveFullName(helper.BaseClass.FullName) + .AssertOnlyViolations(helper); + should + .BeTypesThat() + .DoNotHaveFullNameMatching("^.*\\.Base.*$") + .AssertOnlyViolations(helper); + should + .BeTypesThat() + .DoNotHaveNameContaining(helper.BaseClass.Name) + .AssertOnlyViolations(helper); + should + .BeTypesThat() + .DoNotHaveFullNameContaining(helper.BaseClass.Namespace.Name) + .AssertOnlyViolations(helper); + should + .BeTypesThat() + .DoNotHaveNameStartingWith(helper.BaseClass.Name) + .AssertOnlyViolations(helper); + should + .BeTypesThat() + .DoNotHaveNameEndingWith(helper.BaseClass.Name) + .AssertOnlyViolations(helper); - var list = new List - { - StaticTestTypes.PublicTestClass, - StaticTestTypes.InternalTestClass, - }; - var listPublicTestClassAndInternalTestClassIsPublicOrInternal = Types() - .That() - .Are(list) - .Should() - .BePublic() - .OrShould() - .BeInternal(); - var listPublicTestClassAndInternalTestClassIsPublic = Types() - .That() - .Are(list) - .Should() - .BePublic(); - var listNotPublicAndNotInternalClassesAreNotPublicTestClassOrInternalTestClass = Types() - .That() - .AreNotPublic() - .And() - .AreNotInternal() - .Should() - .NotBe(list); - var listInternalTypesAreNotPublicTestClassOrInternalTestClass = Types() - .That() - .AreInternal() - .Should() - .NotBe(list); + await helper.AssertSnapshotMatches(); + } - Assert.True( - listPublicTestClassAndInternalTestClassIsPublicOrInternal.HasNoViolations( - Architecture - ) - ); - Assert.False( - listPublicTestClassAndInternalTestClassIsPublic.HasNoViolations(Architecture) - ); - Assert.True( - listNotPublicAndNotInternalClassesAreNotPublicTestClassOrInternalTestClass.HasNoViolations( - Architecture - ) - ); - Assert.False( - listInternalTypesAreNotPublicTestClassOrInternalTestClass.HasNoViolations( - Architecture - ) - ); - } + [Fact] + public async Task OnlyDependOnTest() + { + var helper = new DependencyAssemblyTestHelper(); - [Fact] - public void DependOnPatternTest() - { - foreach (var type in _types) - { - var typesDependOnOwnDependencies = Types() - .That() - .DependOnAny(type) - .Should() - .DependOnAny(type) - .WithoutRequiringPositiveResults(); - var typeDoesNotDependOnFalseDependency = Types() - .That() - .Are(type) - .Should() - .NotDependOnAny(Types().That().HaveFullName(NoTypeName)); - var typeDependsOnFalseDependency = Types() - .That() - .Are(type) - .Should() - .DependOnAny(Types().That().HaveFullName(NoTypeName)) - .WithoutRequiringPositiveResults(); - - Assert.True(typesDependOnOwnDependencies.HasNoViolations(Architecture)); - Assert.True(typeDoesNotDependOnFalseDependency.HasNoViolations(Architecture)); - Assert.False(typeDependsOnFalseDependency.HasNoViolations(Architecture)); - } - - var noTypeDependsOnFalseDependency = Types() - .That() - .DependOnAny(Types().That().HaveFullName(NoTypeName)) - .Should() - .NotExist(); - var typesDoNotDependsOnFalseDependency = Types() - .That() - .DoNotDependOnAny(Types().That().HaveFullName(NoTypeName)) - .Should() - .Exist(); + helper.AddSnapshotHeader("No violations"); + var should = Types().That().Are(helper.ChildClass).Should(); - Assert.True(noTypeDependsOnFalseDependency.HasNoViolations(Architecture)); - Assert.True(typesDoNotDependsOnFalseDependency.HasNoViolations(Architecture)); - } + helper.AddSnapshotSubHeader("Conditions"); + should.OnlyDependOn(helper.BaseClass).AssertNoViolations(helper); + should.OnlyDependOn(helper.BaseClassSystemType).AssertNoViolations(helper); + should.OnlyDependOn(Classes().That().Are(helper.BaseClass)).AssertNoViolations(helper); + should.OnlyDependOn([helper.BaseClass]).AssertNoViolations(helper); + should.OnlyDependOn([helper.BaseClassSystemType]).AssertNoViolations(helper); - [Fact] - public void DependOnTypesTest() - { - foreach (var type in _types) - { - if (type.FullNameContains("ObjectSyntaxElementsTests")) - { - continue; - } - - //One Argument - var typeDependencies = type.GetTypeDependencies(Architecture).ToList(); - var typesDependOnOwnDependencies = Types() - .That() - .DependOnAny(type) - .Should() - .DependOnAnyTypesThat() - .Are(type) - .WithoutRequiringPositiveResults(); - var typeDoesNotDependOnOneFalseDependency = Types() - .That() - .Are(type) - .Should() - .NotDependOnAnyTypesThat() - .Are(typeof(ClassWithNoDependencies1)); - var typeDependsOnOneFalseDependency = Types() - .That() - .Are(type) - .Should() - .DependOnAnyTypesThat() - .Are(typeof(ClassWithNoDependencies1)); - var typeOnlyDependsOnOneFalseDependency = Types() - .That() - .Are(type) - .Should() - .OnlyDependOnTypesThat() - .Are(typeof(ClassWithNoDependencies1)); - - Assert.True(typesDependOnOwnDependencies.HasNoViolations(Architecture)); - typeDoesNotDependOnOneFalseDependency.Check(Architecture); - Assert.True(typeDoesNotDependOnOneFalseDependency.HasNoViolations(Architecture)); - Assert.False(typeDependsOnOneFalseDependency.HasNoViolations(Architecture)); - Assert.Equal( - typeDependencies.IsNullOrEmpty(), - typeOnlyDependsOnOneFalseDependency.HasNoViolations(Architecture) - ); - - //Multiple Arguments - - var typeDoesNotDependOnMultipleFalseDependencies = Types() - .That() - .Are(type) - .Should() - .NotDependOnAnyTypesThat() - .Are(typeof(ClassWithNoDependencies1), typeof(ClassWithNoDependencies2)); - var typeOnlyDependsOnMultipleFalseDependencies = Types() - .That() - .Are(type) - .Should() - .OnlyDependOnTypesThat() - .Are(typeof(ClassWithNoDependencies1), typeof(ClassWithNoDependencies2)); - - Assert.True( - typeDoesNotDependOnMultipleFalseDependencies.HasNoViolations(Architecture) - ); - Assert.Equal( - typeDependencies.IsNullOrEmpty(), - typeOnlyDependsOnMultipleFalseDependencies.HasNoViolations(Architecture) - ); - - //Multiple Arguments as IEnumerable - - var typeOnlyDependsOnOwnDependencies = Types() - .That() - .Are(type) - .Should() - .OnlyDependOnTypesThat() - .Are(typeDependencies); - var typeDoesNotDependsOnOwnDependencies = Types() - .That() - .Are(type) - .Should() - .NotDependOnAnyTypesThat() - .Are(typeDependencies); - var typeDoesNotDependOnListOfMultipleFalseDependencies = Types() - .That() - .Are(type) - .Should() - .NotDependOnAnyTypesThat() - .Are(_falseDependencies); - var typeOnlyDependsOnListOfMultipleFalseDependencies = Types() - .That() - .Are(type) - .Should() - .OnlyDependOnTypesThat() - .Are(_falseDependencies); - - Assert.True(typeOnlyDependsOnOwnDependencies.HasNoViolations(Architecture)); - Assert.Equal( - typeDependencies.IsNullOrEmpty(), - typeDoesNotDependsOnOwnDependencies.HasNoViolations(Architecture) - ); - Assert.True( - typeDoesNotDependOnListOfMultipleFalseDependencies.HasNoViolations(Architecture) - ); - Assert.Equal( - typeDependencies.IsNullOrEmpty(), - typeOnlyDependsOnListOfMultipleFalseDependencies.HasNoViolations(Architecture) - ); - } - } + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().OnlyDependOn(helper.BaseClass)).AssertNoViolations(helper); + should + .Be(Types().That().OnlyDependOn(helper.BaseClassSystemType)) + .AssertNoViolations(helper); + should + .Be(Types().That().OnlyDependOn(Classes().That().Are(helper.BaseClass))) + .AssertNoViolations(helper); + should.Be(Types().That().OnlyDependOn([helper.BaseClass])).AssertNoViolations(helper); + should + .Be(Types().That().OnlyDependOn([helper.BaseClassSystemType])) + .AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should.BeTypesThat().OnlyDependOn(helper.BaseClass).AssertNoViolations(helper); + should.BeTypesThat().OnlyDependOn(helper.BaseClassSystemType).AssertNoViolations(helper); + should + .BeTypesThat() + .OnlyDependOn(Classes().That().Are(helper.BaseClass)) + .AssertNoViolations(helper); + should.BeTypesThat().OnlyDependOn([helper.BaseClass]).AssertNoViolations(helper); + should.BeTypesThat().OnlyDependOn([helper.BaseClassSystemType]).AssertNoViolations(helper); + + helper.AddSnapshotHeader("Violations"); + should = Types().That().Are(helper.ClassWithMultipleDependencies).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should.OnlyDependOn(helper.BaseClass).AssertOnlyViolations(helper); + should.OnlyDependOn(helper.BaseClassSystemType).AssertOnlyViolations(helper); + should.OnlyDependOn(Classes().That().Are(helper.BaseClass)).AssertOnlyViolations(helper); + should.OnlyDependOn([helper.BaseClass]).AssertOnlyViolations(helper); + should.OnlyDependOn([helper.BaseClassSystemType]).AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().OnlyDependOn(helper.BaseClass)).AssertOnlyViolations(helper); + should + .Be(Types().That().OnlyDependOn(helper.BaseClassSystemType)) + .AssertOnlyViolations(helper); + should + .Be(Types().That().OnlyDependOn(Classes().That().Are(helper.BaseClass))) + .AssertOnlyViolations(helper); + should.Be(Types().That().OnlyDependOn([helper.BaseClass])).AssertOnlyViolations(helper); + should + .Be(Types().That().OnlyDependOn([helper.BaseClassSystemType])) + .AssertOnlyViolations(helper); + + helper.AddSnapshotHeader("Type outside of architecture"); + should = Types().That().Are(helper.ClassWithMultipleDependencies).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should + .OnlyDependOn(typeof(AttributeNamespace.ClassWithoutAttributes)) + .AssertException(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should + .Be(Types().That().OnlyDependOn(typeof(AttributeNamespace.ClassWithoutAttributes))) + .AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should + .BeTypesThat() + .OnlyDependOn(typeof(AttributeNamespace.ClassWithoutAttributes)) + .AssertOnlyViolations(helper); + + helper.AddSnapshotHeader("Empty arguments"); + should = Types().That().Are(helper.ClassWithMultipleDependencies).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should.OnlyDependOn(new List()).AssertOnlyViolations(helper); + should.OnlyDependOn(new List()).AssertOnlyViolations(helper); + should + .OnlyDependOn(Classes().That().HaveFullName(helper.NonExistentObjectName)) + .AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().OnlyDependOn(new List())).AssertOnlyViolations(helper); + should + .Be(Types().That().OnlyDependOn(new List())) + .AssertOnlyViolations(helper); + should + .Be( + Types() + .That() + .OnlyDependOn(Classes().That().HaveFullName(helper.NonExistentObjectName)) + ) + .AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should.BeTypesThat().OnlyDependOn(new List()).AssertOnlyViolations(helper); + should.BeTypesThat().OnlyDependOn(new List()).AssertOnlyViolations(helper); + should + .BeTypesThat() + .OnlyDependOn(Classes().That().HaveFullName(helper.NonExistentObjectName)) + .AssertOnlyViolations(helper); + + helper.AddSnapshotHeader("Multiple arguments"); + should = Types().That().Are(helper.ClassWithMultipleDependencies).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should.OnlyDependOn(helper.BaseClass, helper.OtherBaseClass).AssertOnlyViolations(helper); + should.OnlyDependOn([helper.BaseClass, helper.OtherBaseClass]).AssertOnlyViolations(helper); + should + .OnlyDependOn(helper.BaseClassSystemType, helper.OtherBaseClassSystemType) + .AssertOnlyViolations(helper); + should + .OnlyDependOn([helper.BaseClassSystemType, helper.OtherBaseClassSystemType]) + .AssertOnlyViolations(helper); + should + .OnlyDependOn(Classes().That().Are(helper.BaseClass, helper.OtherBaseClass)) + .AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should + .Be(Types().That().OnlyDependOn(helper.BaseClass, helper.OtherBaseClass)) + .AssertOnlyViolations(helper); + should + .Be(Types().That().OnlyDependOn([helper.BaseClass, helper.OtherBaseClass])) + .AssertOnlyViolations(helper); + should + .Be( + Types() + .That() + .OnlyDependOn(helper.BaseClassSystemType, helper.OtherBaseClassSystemType) + ) + .AssertOnlyViolations(helper); + should + .Be( + Types() + .That() + .OnlyDependOn([helper.BaseClassSystemType, helper.OtherBaseClassSystemType]) + ) + .AssertOnlyViolations(helper); + should + .Be( + Types() + .That() + .OnlyDependOn(Classes().That().Are(helper.BaseClass, helper.OtherBaseClass)) + ) + .AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should + .BeTypesThat() + .OnlyDependOn(helper.BaseClass, helper.OtherBaseClass) + .AssertOnlyViolations(helper); + should + .BeTypesThat() + .OnlyDependOn([helper.BaseClass, helper.OtherBaseClass]) + .AssertOnlyViolations(helper); + should + .BeTypesThat() + .OnlyDependOn(helper.BaseClassSystemType, helper.OtherBaseClassSystemType) + .AssertOnlyViolations(helper); + should + .BeTypesThat() + .OnlyDependOn([helper.BaseClassSystemType, helper.OtherBaseClassSystemType]) + .AssertOnlyViolations(helper); + should + .BeTypesThat() + .OnlyDependOn(Classes().That().Are(helper.BaseClass, helper.OtherBaseClass)) + .AssertOnlyViolations(helper); + + await helper.AssertSnapshotMatches(); + } + + [Fact] + public async Task OnlyDependOnTypesThatTest() + { + var helper = new DependencyAssemblyTestHelper(); + helper.AddSnapshotHeader("No violations"); + var should = Types().That().Are(helper.ChildClass).Should(); + should.OnlyDependOnTypesThat().Are(helper.BaseClass).AssertNoViolations(helper); + + helper.AddSnapshotHeader("Violations"); + should = Types().That().Are(helper.ClassWithMultipleDependencies).Should(); + should.OnlyDependOnTypesThat().Are(helper.BaseClass).AssertOnlyViolations(helper); + await helper.AssertSnapshotMatches(); + } + + [Fact] + public async Task OnlyHaveAttributesTest() + { + var helper = new AttributeAssemblyTestHelpers(); + + helper.AddSnapshotHeader("No violations"); + var should = Types().That().Are(helper.ClassWithSingleAttribute).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should.OnlyHaveAttributes(helper.Attribute1).AssertNoViolations(helper); + should.OnlyHaveAttributes([helper.Attribute1]).AssertNoViolations(helper); + should.OnlyHaveAttributes(helper.Attribute1SystemType).AssertNoViolations(helper); + should.OnlyHaveAttributes([helper.Attribute1SystemType]).AssertNoViolations(helper); + should + .OnlyHaveAttributes(Attributes().That().Are(helper.Attribute1)) + .AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().OnlyHaveAttributes(helper.Attribute1)).AssertNoViolations(helper); + should + .Be(Types().That().OnlyHaveAttributes([helper.Attribute1])) + .AssertNoViolations(helper); + should + .Be(Types().That().OnlyHaveAttributes(helper.Attribute1SystemType)) + .AssertNoViolations(helper); + should + .Be(Types().That().OnlyHaveAttributes([helper.Attribute1SystemType])) + .AssertNoViolations(helper); + should + .Be(Types().That().OnlyHaveAttributes(Attributes().That().Are(helper.Attribute1))) + .AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should.BeTypesThat().OnlyHaveAttributes(helper.Attribute1).AssertNoViolations(helper); + should.BeTypesThat().OnlyHaveAttributes([helper.Attribute1]).AssertNoViolations(helper); + should + .BeTypesThat() + .OnlyHaveAttributes(helper.Attribute1SystemType) + .AssertNoViolations(helper); + should + .BeTypesThat() + .OnlyHaveAttributes([helper.Attribute1SystemType]) + .AssertNoViolations(helper); + should + .BeTypesThat() + .OnlyHaveAttributes(Attributes().That().Are(helper.Attribute1)) + .AssertNoViolations(helper); + + helper.AddSnapshotHeader("Violations"); + should = Types().That().Are(helper.ClassWithSingleAttribute).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should.OnlyHaveAttributes(helper.UnusedAttribute).AssertOnlyViolations(helper); + should.OnlyHaveAttributes([helper.UnusedAttribute]).AssertOnlyViolations(helper); + should.OnlyHaveAttributes(helper.UnusedAttributeSystemType).AssertOnlyViolations(helper); + should.OnlyHaveAttributes([helper.UnusedAttributeSystemType]).AssertOnlyViolations(helper); + should + .OnlyHaveAttributes(Attributes().That().Are(helper.UnusedAttribute)) + .AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should + .Be(Types().That().OnlyHaveAttributes(helper.UnusedAttribute)) + .AssertOnlyViolations(helper); + should + .Be(Types().That().OnlyHaveAttributes([helper.UnusedAttribute])) + .AssertOnlyViolations(helper); + should + .Be(Types().That().OnlyHaveAttributes(helper.UnusedAttributeSystemType)) + .AssertOnlyViolations(helper); + should + .Be(Types().That().OnlyHaveAttributes([helper.UnusedAttributeSystemType])) + .AssertOnlyViolations(helper); + should + .Be(Types().That().OnlyHaveAttributes(Attributes().That().Are(helper.UnusedAttribute))) + .AssertOnlyViolations(helper); + + helper.AddSnapshotHeader("Attribute outside of architecture"); + should = Types().That().Are(helper.ClassWithSingleAttribute).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should + .OnlyHaveAttributes(typeof(TypeDependencyNamespace.BaseClass)) + .AssertException(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should + .Be(Types().That().OnlyHaveAttributes(typeof(TypeDependencyNamespace.BaseClass))) + .AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should + .BeTypesThat() + .OnlyHaveAttributes(typeof(TypeDependencyNamespace.BaseClass)) + .AssertOnlyViolations(helper); + + helper.AddSnapshotHeader("Empty arguments"); + should = Types().That().Are(helper.ClassWithSingleAttribute).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should.OnlyHaveAttributes(new List()).AssertOnlyViolations(helper); + should.OnlyHaveAttributes(new List()).AssertOnlyViolations(helper); + should + .OnlyHaveAttributes(Attributes().That().HaveFullName(helper.NonExistentObjectName)) + .AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should + .Be(Types().That().OnlyHaveAttributes(new List())) + .AssertOnlyViolations(helper); + should + .Be(Types().That().OnlyHaveAttributes(new List())) + .AssertOnlyViolations(helper); + should + .Be( + Types() + .That() + .OnlyHaveAttributes( + Attributes().That().HaveFullName(helper.NonExistentObjectName) + ) + ) + .AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should.BeTypesThat().OnlyHaveAttributes(new List()).AssertOnlyViolations(helper); + should + .BeTypesThat() + .OnlyHaveAttributes(new List()) + .AssertOnlyViolations(helper); + should + .BeTypesThat() + .OnlyHaveAttributes(Attributes().That().HaveFullName(helper.NonExistentObjectName)) + .AssertOnlyViolations(helper); + + helper.AddSnapshotHeader("Multiple arguments"); + should = Types().That().Are(helper.ClassWithTwoAttributes).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should.OnlyHaveAttributes(helper.Attribute1, helper.Attribute2).AssertNoViolations(helper); + should + .OnlyHaveAttributes([helper.Attribute1, helper.Attribute2]) + .AssertNoViolations(helper); + should + .OnlyHaveAttributes(helper.Attribute1SystemType, helper.Attribute2SystemType) + .AssertNoViolations(helper); + should + .OnlyHaveAttributes([helper.Attribute1SystemType, helper.Attribute2SystemType]) + .AssertNoViolations(helper); + should + .OnlyHaveAttributes(Attributes().That().Are(helper.Attribute1, helper.Attribute2)) + .AssertNoViolations(helper); - [Fact] - public void DependOnTypesThatTest() + helper.AddSnapshotSubHeader("Predicates"); + should + .Be(Types().That().OnlyHaveAttributes(helper.Attribute1, helper.Attribute2)) + .AssertNoViolations(helper); + should + .Be(Types().That().OnlyHaveAttributes([helper.Attribute1, helper.Attribute2])) + .AssertNoViolations(helper); + should + .Be( + Types() + .That() + .OnlyHaveAttributes(helper.Attribute1SystemType, helper.Attribute2SystemType) + ) + .AssertNoViolations(helper); + should + .Be( + Types() + .That() + .OnlyHaveAttributes([helper.Attribute1SystemType, helper.Attribute2SystemType]) + ) + .AssertNoViolations(helper); + should + .Be( + Types() + .That() + .OnlyHaveAttributes( + Attributes().That().Are(helper.Attribute1, helper.Attribute2) + ) + ) + .AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should + .BeTypesThat() + .OnlyHaveAttributes(helper.Attribute1, helper.Attribute2) + .AssertNoViolations(helper); + should + .BeTypesThat() + .OnlyHaveAttributes([helper.Attribute1, helper.Attribute2]) + .AssertNoViolations(helper); + should + .BeTypesThat() + .OnlyHaveAttributes(helper.Attribute1SystemType, helper.Attribute2SystemType) + .AssertNoViolations(helper); + should + .BeTypesThat() + .OnlyHaveAttributes([helper.Attribute1SystemType, helper.Attribute2SystemType]) + .AssertNoViolations(helper); + should + .BeTypesThat() + .OnlyHaveAttributes(Attributes().That().Are(helper.Attribute1, helper.Attribute2)) + .AssertNoViolations(helper); + + helper.AddSnapshotHeader("Multiple inputs"); + should = Types() + .That() + .Are(helper.ClassWithSingleAttribute, helper.ClassWithTwoAttributes) + .Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should.OnlyHaveAttributes(helper.Attribute1).AssertAnyViolations(helper); + should.OnlyHaveAttributes(helper.Attribute2).AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().OnlyHaveAttributes(helper.Attribute1)).AssertAnyViolations(helper); + should + .Be(Types().That().OnlyHaveAttributes(helper.Attribute2)) + .AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates as conditions"); + should.BeTypesThat().OnlyHaveAttributes(helper.Attribute1).AssertAnyViolations(helper); + should.BeTypesThat().OnlyHaveAttributes(helper.Attribute2).AssertOnlyViolations(helper); + + await helper.AssertSnapshotMatches(); + } + + [Fact] + public async Task OnlyHaveAttributesThatTest() + { + var helper = new AttributeAssemblyTestHelpers(); + helper.AddSnapshotHeader("No violations"); + var should = Types().That().Are(helper.ClassWithSingleAttribute).Should(); + should.OnlyHaveAttributesThat().Are(helper.Attribute1).AssertNoViolations(helper); + + helper.AddSnapshotHeader("Violations"); + should = Types().That().Are(helper.ClassWithSingleAttribute).Should(); + should.OnlyHaveAttributesThat().Are(helper.UnusedAttribute).AssertOnlyViolations(helper); + await helper.AssertSnapshotMatches(); + } + + [Fact] + public void VisibilityTest() + { + var visibilityRules = new List { - foreach (var type in _types) - { - if (type.FullNameContains("ObjectSyntaxElementsTests")) - { - continue; - } - - // ReSharper disable once ForeachCanBePartlyConvertedToQueryUsingAnotherGetEnumerator - foreach (var dependency in type.Dependencies) - { - var typeDependsOnDependency = Types() - .That() - .Are(type) - .Should() - .DependOnAny(dependency.Target); - var typeDoesNotDependOnDependency = Types() - .That() - .Are(type) - .Should() - .NotDependOnAny(dependency.Target); - - Assert.True(typeDependsOnDependency.HasNoViolations(Architecture)); - Assert.False(typeDoesNotDependOnDependency.HasNoViolations(Architecture)); - } - - var typeDependencies = type.GetTypeDependencies(Architecture).ToList(); - - //One Argument - - var typesDependOnOwnDependencies = Types() - .That() - .DependOnAny(type) - .Should() - .DependOnAny(type) - .WithoutRequiringPositiveResults(); - var typeDoesNotDependOnOneFalseDependency = Types() - .That() - .Are(type) - .Should() - .NotDependOnAny(typeof(ClassWithNoDependencies1)); - var typeDependsOnOneFalseDependency = Types() - .That() - .Are(type) - .Should() - .DependOnAny(typeof(ClassWithNoDependencies1)); - var typeOnlyDependsOnOneFalseDependency = Types() - .That() - .Are(type) - .Should() - .OnlyDependOn(typeof(ClassWithNoDependencies1)); - - Assert.True(typesDependOnOwnDependencies.HasNoViolations(Architecture)); - Assert.True(typeDoesNotDependOnOneFalseDependency.HasNoViolations(Architecture)); - Assert.False(typeDependsOnOneFalseDependency.HasNoViolations(Architecture)); - Assert.Equal( - typeDependencies.IsNullOrEmpty(), - typeOnlyDependsOnOneFalseDependency.HasNoViolations(Architecture) - ); - - //Multiple Arguments - - var typeDoesNotDependOnMultipleFalseDependencies = Types() - .That() - .Are(type) - .Should() - .NotDependOnAny( - typeof(ClassWithNoDependencies1), - typeof(ClassWithNoDependencies2) - ); - var typeOnlyDependsOnMultipleFalseDependencies = Types() - .That() - .Are(type) - .Should() - .OnlyDependOn( - typeof(ClassWithNoDependencies1), - typeof(ClassWithNoDependencies2) - ); - - Assert.True( - typeDoesNotDependOnMultipleFalseDependencies.HasNoViolations(Architecture) - ); - Assert.Equal( - typeDependencies.IsNullOrEmpty(), - typeOnlyDependsOnMultipleFalseDependencies.HasNoViolations(Architecture) - ); - - //Multiple Arguments as IEnumerable - - var typeOnlyDependsOnOwnDependencies = Types() - .That() - .Are(type) - .Should() - .OnlyDependOn(typeDependencies); - var typeDoesNotDependsOnOwnDependencies = Types() - .That() - .Are(type) - .Should() - .NotDependOnAny(typeDependencies); - var typeDoesNotDependOnListOfMultipleFalseDependencies = Types() - .That() - .Are(type) - .Should() - .NotDependOnAny(_falseDependencies); - var typeOnlyDependsOnListOfMultipleFalseDependencies = Types() - .That() - .Are(type) - .Should() - .OnlyDependOn(_falseDependencies); - - Assert.True(typeOnlyDependsOnOwnDependencies.HasNoViolations(Architecture)); - Assert.Equal( - typeDependencies.IsNullOrEmpty(), - typeDoesNotDependsOnOwnDependencies.HasNoViolations(Architecture) - ); - Assert.True( - typeDoesNotDependOnListOfMultipleFalseDependencies.HasNoViolations(Architecture) - ); - Assert.Equal( - typeDependencies.IsNullOrEmpty(), - typeOnlyDependsOnListOfMultipleFalseDependencies.HasNoViolations(Architecture) - ); - } - - var noTypeDependsOnFalseDependency = Types() - .That() - .DependOnAny(typeof(ClassWithNoDependencies1)) - .Should() - .Be(typeof(ObjectSyntaxElementsTests)); - var noTypeDependsOnMultipleFalseDependencies = Types() + Types().That().ArePrivate().Should().BePrivate(), + Types().That().ArePrivate().Should().BeTypesThat().ArePrivate(), + Types().That().ArePublic().Should().BePublic(), + Types().That().ArePublic().Should().BeTypesThat().ArePublic(), + Types().That().AreProtected().Should().BeProtected(), + Types().That().AreProtected().Should().BeTypesThat().AreProtected(), + Types().That().AreInternal().Should().BeInternal(), + Types().That().AreInternal().Should().BeTypesThat().AreInternal(), + Types().That().AreProtectedInternal().Should().BeProtectedInternal(), + Types().That().AreProtectedInternal().Should().BeTypesThat().AreProtectedInternal(), + Types().That().ArePrivateProtected().Should().BePrivateProtected(), + Types().That().ArePrivateProtected().Should().BeTypesThat().ArePrivateProtected(), + Types().That().AreNotPrivate().Should().NotBePrivate(), + Types().That().AreNotPrivate().Should().BeTypesThat().AreNotPrivate(), + Types().That().AreNotPublic().Should().NotBePublic(), + Types().That().AreNotPublic().Should().BeTypesThat().AreNotPublic(), + Types().That().AreNotProtected().Should().NotBeProtected(), + Types().That().AreNotProtected().Should().BeTypesThat().AreNotProtected(), + Types().That().AreNotInternal().Should().NotBeInternal(), + Types().That().AreNotInternal().Should().BeTypesThat().AreNotInternal(), + Types().That().AreNotProtectedInternal().Should().NotBeProtectedInternal(), + Types() .That() - .DependOnAny(typeof(ClassWithNoDependencies1), typeof(ClassWithNoDependencies2)) + .AreNotProtectedInternal() .Should() - .Be(typeof(ObjectSyntaxElementsTests)); - var noTypeDependsOnListOfMultipleFalseDependencies = Types() + .BeTypesThat() + .AreNotProtectedInternal(), + Types().That().AreNotPrivateProtected().Should().NotBePrivateProtected(), + Types().That().AreNotPrivateProtected().Should().BeTypesThat().AreNotPrivateProtected(), + Types() .That() - .DependOnAny(_falseDependencies) + .ArePrivate() .Should() - .Be(typeof(ObjectSyntaxElementsTests)); - var typesDoNotDependOnFalseDependency = Types() + .NotBePublic() + .AndShould() + .NotBeProtected() + .AndShould() + .NotBeInternal() + .AndShould() + .NotBeProtectedInternal() + .AndShould() + .NotBePrivateProtected(), + Types() .That() - .DoNotDependOnAny(typeof(ClassWithNoDependencies1)) + .ArePublic() .Should() - .Exist(); - var typesDoNotDependOnMultipleFalseDependencies = Types() + .NotBePrivate() + .AndShould() + .NotBeProtected() + .AndShould() + .NotBeInternal() + .AndShould() + .NotBeProtectedInternal() + .AndShould() + .NotBePrivateProtected(), + Types() .That() - .DoNotDependOnAny( - typeof(ClassWithNoDependencies1), - typeof(ClassWithNoDependencies2) - ) + .AreProtected() .Should() - .Exist(); - var typeDoNotDependOnListOfMultipleFalseDependencies = Types() + .NotBePublic() + .AndShould() + .NotBePrivate() + .AndShould() + .NotBeInternal() + .AndShould() + .NotBeProtectedInternal() + .AndShould() + .NotBePrivateProtected(), + Types() .That() - .DoNotDependOnAny(_falseDependencies) + .AreInternal() .Should() - .Exist(); - - Assert.True(noTypeDependsOnFalseDependency.HasNoViolations(Architecture)); - Assert.True(noTypeDependsOnMultipleFalseDependencies.HasNoViolations(Architecture)); - Assert.True( - noTypeDependsOnListOfMultipleFalseDependencies.HasNoViolations(Architecture) - ); - Assert.True(typesDoNotDependOnFalseDependency.HasNoViolations(Architecture)); - Assert.True(typesDoNotDependOnMultipleFalseDependencies.HasNoViolations(Architecture)); - Assert.True( - typeDoNotDependOnListOfMultipleFalseDependencies.HasNoViolations(Architecture) - ); - - //Fluent arguments - - var typeThatDependOnTypesWithPDoNotDependOnTypesWithP = Types() + .NotBePublic() + .AndShould() + .NotBeProtected() + .AndShould() + .NotBePrivate() + .AndShould() + .NotBeProtectedInternal() + .AndShould() + .NotBePrivateProtected(), + Types() .That() - .DependOnAny(Types().That().HaveNameStartingWith("P")) + .AreProtectedInternal() .Should() - .NotDependOnAny(Types().That().HaveNameStartingWith("P")); - var typesThatDependOnFalseTypeShouldDependOnNoType = Types() + .NotBePublic() + .AndShould() + .NotBeProtected() + .AndShould() + .NotBeInternal() + .AndShould() + .NotBePrivate() + .AndShould() + .NotBePrivateProtected(), + Types() .That() - .OnlyDependOn(Classes().That().Are(typeof(ClassWithNoDependencies1))) + .ArePrivateProtected() .Should() - .NotDependOnAny(Types()); - - Assert.False( - typeThatDependOnTypesWithPDoNotDependOnTypesWithP.HasNoViolations(Architecture) - ); - Assert.True( - typesThatDependOnFalseTypeShouldDependOnNoType.HasNoViolations(Architecture) - ); - } - - [Fact] - public void ExistTest() - { - foreach (var type in _types) - { - var typeExists = Types().That().Are(type).Should().Exist(); - var typeDoesNotExist = Types().That().Are(type).Should().NotExist(); - - Assert.True(typeExists.HasNoViolations(Architecture)); - Assert.False(typeDoesNotExist.HasNoViolations(Architecture)); - } - - var typesExist = Types().Should().Exist(); - var typesDoNotExist = Types().Should().NotExist(); - - Assert.True(typesExist.HasNoViolations(Architecture)); - Assert.False(typesDoNotExist.HasNoViolations(Architecture)); - } - - [Fact] - public void HaveFullNameTest() - { - foreach (var type in _types) - { - var typeHasRightFullName = Types() - .That() - .Are(type) - .Should() - .HaveFullName(type.FullName); - var typeDoesNotHaveRightFullName = Types() - .That() - .Are(type) - .Should() - .NotHaveFullName(type.FullName); - var typeHasFalseFullName = Types() - .That() - .Are(type) - .Should() - .HaveFullName(NoTypeName); - var typeDoesNotHaveFalseFullName = Types() - .That() - .Are(type) - .Should() - .NotHaveFullName(NoTypeName); - var typesWithSameFullNameAreEqual = Types() - .That() - .HaveFullName(type.FullName) - .Should() - .Be(type); - var typesWithDifferentFullNamesAreNotEqual = Types() - .That() - .DoNotHaveFullName(type.FullName) - .Should() - .NotBe(type); - - Assert.True(typeHasRightFullName.HasNoViolations(Architecture)); - Assert.False(typeDoesNotHaveRightFullName.HasNoViolations(Architecture)); - Assert.False(typeHasFalseFullName.HasNoViolations(Architecture)); - Assert.True(typeDoesNotHaveFalseFullName.HasNoViolations(Architecture)); - Assert.True(typesWithSameFullNameAreEqual.HasNoViolations(Architecture)); - Assert.True(typesWithDifferentFullNamesAreNotEqual.HasNoViolations(Architecture)); - } - - var findNoTypesWithFalseFullName = Types() + .NotBePublic() + .AndShould() + .NotBeProtected() + .AndShould() + .NotBeInternal() + .AndShould() + .NotBeProtectedInternal() + .AndShould() + .NotBePrivate(), + Types() .That() - .HaveFullName(NoTypeName) + .AreNotPrivate() .Should() - .NotExist(); - var findTypesWithRightFullName = Types() + .BePublic() + .OrShould() + .BeProtected() + .OrShould() + .BeInternal() + .OrShould() + .BeProtectedInternal() + .OrShould() + .BePrivateProtected(), + Types() .That() - .DoNotHaveFullName(NoTypeName) + .AreNotPublic() .Should() - .Exist(); - - Assert.True(findNoTypesWithFalseFullName.HasNoViolations(Architecture)); - Assert.True(findTypesWithRightFullName.HasNoViolations(Architecture)); - } - - [Fact] - public void HaveNameEndingWithTest() - { - foreach (var type in _types) - { - var name = type.Name; - for (var i = 0; i <= name.Length; i++) - { - var subString = name.Substring(i); - var typeNameEndsWithSubstringOfOwnName = Types() - .That() - .Are(type) - .Should() - .HaveNameEndingWith(subString); - var typeNameDoesNotEndWithSubstringOfOwnName = Types() - .That() - .Are(type) - .Should() - .NotHaveNameEndingWith(subString); - - Assert.True(typeNameEndsWithSubstringOfOwnName.HasNoViolations(Architecture)); - Assert.False( - typeNameDoesNotEndWithSubstringOfOwnName.HasNoViolations(Architecture) - ); - } - - var typeNameDoesNotEndWithFalseTypeName = Types() - .That() - .Are(type) - .Should() - .NotHaveNameEndingWith(NoTypeName); - var typeNameEndsWithFalseTypeName = Types() - .That() - .Are(type) - .Should() - .HaveNameEndingWith(NoTypeName); - - Assert.True(typeNameDoesNotEndWithFalseTypeName.HasNoViolations(Architecture)); - Assert.False(typeNameEndsWithFalseTypeName.HasNoViolations(Architecture)); - } - - var findNoTypesEndingWithFalseName = Types() + .BePrivate() + .OrShould() + .BeProtected() + .OrShould() + .BeInternal() + .OrShould() + .BeProtectedInternal() + .OrShould() + .BePrivateProtected(), + Types() .That() - .HaveNameEndingWith(NoTypeName) - .Or() - .HaveNameContaining(NoTypeName) + .AreNotProtected() .Should() - .NotExist(); - var findTypesStartingWithRightName = Types() + .BePublic() + .OrShould() + .BePrivate() + .OrShould() + .BeInternal() + .OrShould() + .BeProtectedInternal() + .OrShould() + .BePrivateProtected(), + Types() .That() - .DoNotHaveNameStartingWith(NoTypeName) - .Or() - .DoNotHaveNameContaining(NoTypeName) + .AreNotInternal() .Should() - .Exist(); - - Assert.True(findNoTypesEndingWithFalseName.HasNoViolations(Architecture)); - Assert.True(findTypesStartingWithRightName.HasNoViolations(Architecture)); - } - - [Fact] - public void HaveNameStartingWithAndHaveNameContainingTest() - { - foreach (var type in _types) - { - var name = type.Name; - for (var i = 0; i <= name.Length; i++) - { - for (var j = 1; j <= i; j++) - { - var subString = name.Substring(j, i - j); - var typeNameContainsSubstringOfOwnName = Types() - .That() - .Are(type) - .Should() - .HaveNameContaining(subString); - var typeNameDoesNotContainsSubstringOfOwnName = Types() - .That() - .Are(type) - .Should() - .NotHaveNameContaining(subString); - - Assert.True( - typeNameContainsSubstringOfOwnName.HasNoViolations(Architecture) - ); - Assert.False( - typeNameDoesNotContainsSubstringOfOwnName.HasNoViolations(Architecture) - ); - } - - var startString = name.Substring(0, i); - var typeNameStartsWithAndContainsSubstringOfOwnName = Types() - .That() - .Are(type) - .Should() - .HaveNameStartingWith(startString) - .AndShould() - .HaveNameContaining(startString); - var typeNameDoesNotStartWithOrContainSubstringOfOwnName = Types() - .That() - .Are(type) - .Should() - .NotHaveNameStartingWith(startString) - .OrShould() - .NotHaveNameContaining(startString); - - Assert.True( - typeNameStartsWithAndContainsSubstringOfOwnName.HasNoViolations( - Architecture - ) - ); - Assert.False( - typeNameDoesNotStartWithOrContainSubstringOfOwnName.HasNoViolations( - Architecture - ) - ); - } - - var typeNameDoesNotStartWithOrContainFalseTypeName = Types() - .That() - .Are(type) - .Should() - .NotHaveNameStartingWith(NoTypeName) - .AndShould() - .NotHaveNameContaining(NoTypeName); - var typeNameStartsWithOrContainsFalseTypeName = Types() - .That() - .Are(type) - .Should() - .HaveNameStartingWith(NoTypeName) - .OrShould() - .HaveNameContaining(NoTypeName); - - Assert.True( - typeNameDoesNotStartWithOrContainFalseTypeName.HasNoViolations(Architecture) - ); - Assert.False( - typeNameStartsWithOrContainsFalseTypeName.HasNoViolations(Architecture) - ); - } - - var findNoTypesStartingWithOrContainingFalseName = Types() + .BePublic() + .OrShould() + .BeProtected() + .OrShould() + .BePrivate() + .OrShould() + .BeProtectedInternal() + .OrShould() + .BePrivateProtected(), + Types() .That() - .HaveNameStartingWith(NoTypeName) - .Or() - .HaveNameContaining(NoTypeName) + .AreNotProtectedInternal() .Should() - .NotExist(); - var findTypesStartingWithOrContainingRightName = Types() + .BePublic() + .OrShould() + .BeProtected() + .OrShould() + .BeInternal() + .OrShould() + .BePrivate() + .OrShould() + .BePrivateProtected(), + Types() .That() - .DoNotHaveNameStartingWith(NoTypeName) - .Or() - .DoNotHaveNameContaining(NoTypeName) + .AreNotPrivateProtected() .Should() - .Exist(); - - Assert.True(findNoTypesStartingWithOrContainingFalseName.HasNoViolations(Architecture)); - Assert.True(findTypesStartingWithOrContainingRightName.HasNoViolations(Architecture)); - } - - [Fact] - public void HaveNameTest() - { - foreach (var type in _types) - { - var typeHasRightName = Types().That().Are(type).Should().HaveName(type.Name); - var typeDoesNotHaveRightName = Types() - .That() - .Are(type) - .Should() - .NotHaveName(type.Name); - var typeHasFalseName = Types().That().Are(type).Should().HaveName(NoTypeName); - var typeDoesNotHaveFalseName = Types() - .That() - .Are(type) - .Should() - .NotHaveName(NoTypeName); - - Assert.True(typeHasRightName.HasNoViolations(Architecture)); - Assert.False(typeDoesNotHaveRightName.HasNoViolations(Architecture)); - Assert.False(typeHasFalseName.HasNoViolations(Architecture)); - Assert.True(typeDoesNotHaveFalseName.HasNoViolations(Architecture)); - } - - var findTypesWithRightName = Types().That().DoNotHaveName(NoTypeName).Should().Exist(); - var findNoTypesWithFalseName = Types().That().HaveName(NoTypeName).Should().NotExist(); - - Assert.True(findTypesWithRightName.HasNoViolations(Architecture)); - Assert.True(findNoTypesWithFalseName.HasNoViolations(Architecture)); - } + .BePublic() + .OrShould() + .BeProtected() + .OrShould() + .BeInternal() + .OrShould() + .BeProtectedInternal() + .OrShould() + .BePrivate(), + }; - [Fact] - public void VisibilityTest() + foreach (var visibilityRule in visibilityRules) { - var visibilityRules = new List - { - Types().That().ArePrivate().Should().BePrivate(), - Types().That().ArePublic().Should().BePublic(), - Types().That().AreProtected().Should().BeProtected(), - Types().That().AreInternal().Should().BeInternal(), - Types().That().AreProtectedInternal().Should().BeProtectedInternal(), - Types().That().ArePrivateProtected().Should().BePrivateProtected(), - Types().That().AreNotPrivate().Should().NotBePrivate(), - Types().That().AreNotPublic().Should().NotBePublic(), - Types().That().AreNotProtected().Should().NotBeProtected(), - Types().That().AreNotInternal().Should().NotBeInternal(), - Types().That().AreNotProtectedInternal().Should().NotBeProtectedInternal(), - Types().That().AreNotPrivateProtected().Should().NotBePrivateProtected(), - Types() - .That() - .ArePrivate() - .Should() - .NotBePublic() - .AndShould() - .NotBeProtected() - .AndShould() - .NotBeInternal() - .AndShould() - .NotBeProtectedInternal() - .AndShould() - .NotBePrivateProtected(), - Types() - .That() - .ArePublic() - .Should() - .NotBePrivate() - .AndShould() - .NotBeProtected() - .AndShould() - .NotBeInternal() - .AndShould() - .NotBeProtectedInternal() - .AndShould() - .NotBePrivateProtected(), - Types() - .That() - .AreProtected() - .Should() - .NotBePublic() - .AndShould() - .NotBePrivate() - .AndShould() - .NotBeInternal() - .AndShould() - .NotBeProtectedInternal() - .AndShould() - .NotBePrivateProtected(), - Types() - .That() - .AreInternal() - .Should() - .NotBePublic() - .AndShould() - .NotBeProtected() - .AndShould() - .NotBePrivate() - .AndShould() - .NotBeProtectedInternal() - .AndShould() - .NotBePrivateProtected(), - Types() - .That() - .AreProtectedInternal() - .Should() - .NotBePublic() - .AndShould() - .NotBeProtected() - .AndShould() - .NotBeInternal() - .AndShould() - .NotBePrivate() - .AndShould() - .NotBePrivateProtected(), - Types() - .That() - .ArePrivateProtected() - .Should() - .NotBePublic() - .AndShould() - .NotBeProtected() - .AndShould() - .NotBeInternal() - .AndShould() - .NotBeProtectedInternal() - .AndShould() - .NotBePrivate(), - Types() - .That() - .AreNotPrivate() - .Should() - .BePublic() - .OrShould() - .BeProtected() - .OrShould() - .BeInternal() - .OrShould() - .BeProtectedInternal() - .OrShould() - .BePrivateProtected(), - Types() - .That() - .AreNotPublic() - .Should() - .BePrivate() - .OrShould() - .BeProtected() - .OrShould() - .BeInternal() - .OrShould() - .BeProtectedInternal() - .OrShould() - .BePrivateProtected(), - Types() - .That() - .AreNotProtected() - .Should() - .BePublic() - .OrShould() - .BePrivate() - .OrShould() - .BeInternal() - .OrShould() - .BeProtectedInternal() - .OrShould() - .BePrivateProtected(), - Types() - .That() - .AreNotInternal() - .Should() - .BePublic() - .OrShould() - .BeProtected() - .OrShould() - .BePrivate() - .OrShould() - .BeProtectedInternal() - .OrShould() - .BePrivateProtected(), - Types() - .That() - .AreNotProtectedInternal() - .Should() - .BePublic() - .OrShould() - .BeProtected() - .OrShould() - .BeInternal() - .OrShould() - .BePrivate() - .OrShould() - .BePrivateProtected(), - Types() - .That() - .AreNotPrivateProtected() - .Should() - .BePublic() - .OrShould() - .BeProtected() - .OrShould() - .BeInternal() - .OrShould() - .BeProtectedInternal() - .OrShould() - .BePrivate(), - Types().That().Are(StaticTestTypes.PublicTestClass).Should().BePublic(), - Types().That().Are(StaticTestTypes.InternalTestClass).Should().BeInternal(), - Types().That().Are(NestedPrivateTestClass).Should().BePrivate(), - Types().That().Are(NestedPublicTestClass).Should().BePublic(), - Types().That().Are(NestedProtectedTestClass).Should().BeProtected(), - Types().That().Are(NestedInternalTestClass).Should().BeInternal(), - Types().That().Are(NestedProtectedInternalTestClass).Should().BeProtectedInternal(), - Types().That().Are(NestedPrivateProtectedTestClass).Should().BePrivateProtected(), - }; - - foreach (var visibilityRule in visibilityRules) - { - Assert.True(visibilityRule.HasNoViolations(Architecture)); - } + Assert.True( + visibilityRule.HasNoViolations(StaticTestArchitectures.VisibilityArchitecture) + ); } } - - public class ClassWithNoDependencies1 { } - - public class ClassWithNoDependencies2 { } - - public interface IInterfaceWithNoDependencies1 { } - - public interface IInterfaceWithNoDependencies2 { } } diff --git a/ArchUnitNETTests/Fluent/Syntax/Elements/ObjectsShouldTests.cs b/ArchUnitNETTests/Fluent/Syntax/Elements/ObjectsShouldTests.cs deleted file mode 100644 index d1c839089..000000000 --- a/ArchUnitNETTests/Fluent/Syntax/Elements/ObjectsShouldTests.cs +++ /dev/null @@ -1,2926 +0,0 @@ -using System.Collections.Generic; -using System.Linq; -using System.Reflection; -using System.Threading.Tasks; -using ArchUnitNET.Domain; -using ArchUnitNET.Domain.Exceptions; -using ArchUnitNET.Fluent; -using ArchUnitNET.Fluent.Conditions; -using ArchUnitNET.Fluent.Predicates; -using ArchUnitNET.Fluent.Syntax.Elements.Types; -using ArchUnitNETTests.AssemblyTestHelper; -using Xunit; -using static ArchUnitNET.Fluent.ArchRuleDefinition; - -namespace ArchUnitNETTests.Fluent.Syntax.Elements; - -// csharpier-ignore -public class ObjectsShouldTests -{ - [Fact] - public async Task AreTest() - { - var helper = new DependencyAssemblyTestHelper(); - - // Single argument - var predicates = new List { - Types().That().Are(helper.ChildClass), - Types().That().Are(helper.ChildClassSystemType), - Types().That().Are(Classes().That().Are(helper.ChildClass)), - Types().That().Are([helper.ChildClass]), - Types().That().Are([helper.ChildClassSystemType]), - }; - foreach (var predicate in predicates) - { - Assert.Equal([.. predicate.GetObjects(helper.Architecture)], new List { helper.ChildClass }); - } - - // Multiple arguments - predicates = new List { - Types().That().Are(helper.BaseClass, helper.ChildClass), - Types().That().Are(helper.BaseClassSystemType, helper.ChildClassSystemType), - Types().That().Are(Classes().That().Are(helper.BaseClass, helper.ChildClass)), - Types().That().Are([helper.BaseClass, helper.ChildClass]), - Types().That().Are([helper.BaseClassSystemType, helper.ChildClassSystemType]), - }; - foreach (var predicate in predicates) - { - Assert.Equal([.. predicate.GetObjects(helper.Architecture)], new List { helper.BaseClass, helper.ChildClass }); - } - - // Empty arguments - Assert.Equal([.. Types().That().Are(new List()).GetObjects(helper.Architecture)], new List()); - Assert.Equal([.. Types().That().Are([]).GetObjects(helper.Architecture)], new List()); - - // Empty inputs - Types().That().Are([]).Should().BeTypesThat().Are(helper.ChildClass).AssertOnlyViolations(helper); - - // Predicates as conditions - var should = Types().That().Are(helper.ChildClass).Should(); - should.BeTypesThat().Are(helper.ChildClass).AssertNoViolations(helper); - should.BeTypesThat().Are(helper.ChildClassSystemType).AssertNoViolations(helper); - should.BeTypesThat().Are(Classes().That().Are(helper.ChildClass)).AssertNoViolations(helper); - should.BeTypesThat().Are([helper.ChildClass]).AssertNoViolations(helper); - should.BeTypesThat().Are([helper.ChildClassSystemType]).AssertNoViolations(helper); - - await helper.AssertSnapshotMatches(); - } - - [Fact] - public async Task BeTest() - { - var helper = new DependencyAssemblyTestHelper(); - helper.AddSnapshotHeader("No violations"); - var should = Types().That().Are(helper.ChildClass).Should(); - should.Be(helper.ChildClass).AssertNoViolations(helper); - should.Be(helper.ChildClassSystemType).AssertNoViolations(helper); - should.Be(Classes().That().Are(helper.ChildClass)).AssertNoViolations(helper); - should.Be([helper.ChildClass]).AssertNoViolations(helper); - should.Be([helper.ChildClassSystemType]).AssertNoViolations(helper); - - helper.AddSnapshotHeader("Violations"); - should = Types().That().Are(helper.ChildClass).Should(); - should.Be(helper.ClassWithoutDependencies).AssertOnlyViolations(helper); - should.Be(helper.ClassWithoutDependenciesSystemType).AssertOnlyViolations(helper); - should.Be(Classes().That().Are(helper.ClassWithoutDependencies)).AssertOnlyViolations(helper); - should.Be([helper.ClassWithoutDependencies]).AssertOnlyViolations(helper); - should.Be([helper.ClassWithoutDependenciesSystemType]).AssertOnlyViolations(helper); - - helper.AddSnapshotHeader("Empty arguments"); - should = Types().That().Are(helper.BaseClass).Should(); - should.Be(new List()).AssertOnlyViolations(helper); - should.Be(new List()).AssertOnlyViolations(helper); - should.Be(Classes().That().HaveFullName(helper.NonExistentObjectName)).AssertOnlyViolations(helper); - - helper.AddSnapshotHeader("Multiple arguments"); - should = Types().That().Are(helper.ChildClass).Should(); - should.Be(helper.ClassWithoutDependencies, helper.BaseClass).AssertOnlyViolations(helper); - should.Be([helper.ClassWithoutDependencies, helper.BaseClass]).AssertOnlyViolations(helper); - should.Be(helper.ClassWithoutDependenciesSystemType, helper.BaseClassSystemType).AssertOnlyViolations(helper); - should.Be([helper.ClassWithoutDependenciesSystemType, helper.BaseClassSystemType]).AssertOnlyViolations(helper); - - helper.AddSnapshotHeader("Multiple inputs"); - Types().That().Are(helper.ChildClass, helper.BaseClass).Should().Be(helper.ChildClass, helper.BaseClass).AssertNoViolations(helper); - Types().That().Are(helper.ChildClass, helper.BaseClass).Should().Be(helper.ChildClass, helper.ClassWithoutDependencies).AssertAnyViolations(helper); - await helper.AssertSnapshotMatches(); - } - - [Fact] - public async Task BeTypesThatTest() - { - var helper = new DependencyAssemblyTestHelper(); - helper.AddSnapshotHeader("No violations"); - var should = Types().That().Are(helper.ChildClass).Should(); - should.BeTypesThat().Are(helper.ChildClass).AssertNoViolations(helper); - - helper.AddSnapshotHeader("Violations"); - should = Types().That().Are(helper.BaseClass).Should(); - should.BeTypesThat().Are(helper.ChildClass).AssertOnlyViolations(helper); - await helper.AssertSnapshotMatches(); - } - - [Fact] - public async Task BeInternalTest() - { - var helper = new VisibilityAssemblyTestHelper(); - helper.AddSnapshotHeader("No violations"); - Types().That().Are(helper.InternalClass).Should().BeInternal().AssertNoViolations(helper); - Types().That().Are(helper.InternalInnerClass).Should().BeInternal().AssertNoViolations(helper); - - helper.AddSnapshotHeader("Violations"); - Types().That().Are(helper.PublicClass).Should().BeInternal().AssertOnlyViolations(helper); - Types().That().Are(helper.PublicInnerClass).Should().BeInternal().AssertOnlyViolations(helper); - Types().That().Are(helper.ProtectedInnerClass).Should().BeInternal().AssertOnlyViolations(helper); - Types().That().Are(helper.ProtectedInternalInnerClass).Should().BeInternal().AssertOnlyViolations(helper); - Types().That().Are(helper.PrivateInnerClass).Should().BeInternal().AssertOnlyViolations(helper); - Types().That().Are(helper.PrivateProtectedInnerClass).Should().BeInternal().AssertOnlyViolations(helper); - - helper.AddSnapshotHeader("Multiple inputs"); - Types().That().Are(helper.InternalClass, helper.OtherInternalClass).Should().BeInternal().AssertNoViolations(helper); - Types().That().Are(helper.InternalClass, helper.ProtectedInternalInnerClass).Should().BeInternal().AssertAnyViolations(helper); - await helper.AssertSnapshotMatches(); - } - - [Fact] - public async Task BePrivateTest() - { - var helper = new VisibilityAssemblyTestHelper(); - helper.AddSnapshotHeader("No violations"); - Types().That().Are(helper.PrivateInnerClass).Should().BePrivate().AssertNoViolations(helper); - - helper.AddSnapshotHeader("Violations"); - Types().That().Are(helper.PublicClass).Should().BePrivate().AssertOnlyViolations(helper); - Types().That().Are(helper.PublicInnerClass).Should().BePrivate().AssertOnlyViolations(helper); - Types().That().Are(helper.InternalClass).Should().BePrivate().AssertOnlyViolations(helper); - Types().That().Are(helper.InternalInnerClass).Should().BePrivate().AssertOnlyViolations(helper); - Types().That().Are(helper.ProtectedInnerClass).Should().BePrivate().AssertOnlyViolations(helper); - Types().That().Are(helper.ProtectedInternalInnerClass).Should().BePrivate().AssertOnlyViolations(helper); - Types().That().Are(helper.PrivateProtectedInnerClass).Should().BePrivate().AssertOnlyViolations(helper); - - helper.AddSnapshotHeader("Multiple inputs"); - Types().That().Are(helper.PrivateInnerClass, helper.OtherPrivateInnerClass).Should().BePrivate().AssertNoViolations(helper); - Types().That().Are(helper.PrivateInnerClass, helper.PrivateProtectedInnerClass).Should().BePrivate().AssertAnyViolations(helper); - await helper.AssertSnapshotMatches(); - } - - [Fact] - public async Task BePrivateProtectedTest() - { - var helper = new VisibilityAssemblyTestHelper(); - helper.AddSnapshotHeader("No violations"); - Types().That().Are(helper.PrivateProtectedInnerClass).Should().BePrivateProtected().AssertNoViolations(helper); - - helper.AddSnapshotHeader("Violations"); - Types().That().Are(helper.PublicClass).Should().BePrivateProtected().AssertOnlyViolations(helper); - Types().That().Are(helper.PublicInnerClass).Should().BePrivateProtected().AssertOnlyViolations(helper); - Types().That().Are(helper.ProtectedInnerClass).Should().BePrivateProtected().AssertOnlyViolations(helper); - Types().That().Are(helper.ProtectedInternalInnerClass).Should().BePrivateProtected().AssertOnlyViolations(helper); - Types().That().Are(helper.InternalClass).Should().BePrivateProtected().AssertOnlyViolations(helper); - Types().That().Are(helper.InternalInnerClass).Should().BePrivateProtected().AssertOnlyViolations(helper); - Types().That().Are(helper.PrivateInnerClass).Should().BePrivateProtected().AssertOnlyViolations(helper); - - helper.AddSnapshotHeader("Multiple inputs"); - Types().That().Are(helper.PrivateProtectedInnerClass, helper.OtherPrivateProtectedInnerClass).Should().BePrivateProtected().AssertNoViolations(helper); - Types().That().Are(helper.PrivateProtectedInnerClass, helper.PrivateInnerClass).Should().BePrivateProtected().AssertAnyViolations(helper); - await helper.AssertSnapshotMatches(); - } - - [Fact] - public async Task BeProtectedTest() - { - var helper = new VisibilityAssemblyTestHelper(); - helper.AddSnapshotHeader("No violations"); - Types().That().Are(helper.ProtectedInnerClass).Should().BeProtected().AssertNoViolations(helper); - - helper.AddSnapshotHeader("Violations"); - Types().That().Are(helper.PublicClass).Should().BeProtected().AssertOnlyViolations(helper); - Types().That().Are(helper.PublicInnerClass).Should().BeProtected().AssertOnlyViolations(helper); - Types().That().Are(helper.InternalClass).Should().BeProtected().AssertOnlyViolations(helper); - Types().That().Are(helper.InternalInnerClass).Should().BeProtected().AssertOnlyViolations(helper); - Types().That().Are(helper.PrivateInnerClass).Should().BeProtected().AssertOnlyViolations(helper); - Types().That().Are(helper.PrivateProtectedInnerClass).Should().BeProtected().AssertOnlyViolations(helper); - Types().That().Are(helper.ProtectedInternalInnerClass).Should().BeProtected().AssertOnlyViolations(helper); - - helper.AddSnapshotHeader("Multiple inputs"); - Types().That().Are(helper.ProtectedInnerClass, helper.OtherProtectedInnerClass).Should().BeProtected().AssertNoViolations(helper); - Types().That().Are(helper.ProtectedInnerClass, helper.ProtectedInternalInnerClass).Should().BeProtected().AssertAnyViolations(helper); - await helper.AssertSnapshotMatches(); - } - - [Fact] - public async Task BeProtectedInternalTest() - { - var helper = new VisibilityAssemblyTestHelper(); - helper.AddSnapshotHeader("No violations"); - Types().That().Are(helper.ProtectedInternalInnerClass).Should().BeProtectedInternal().AssertNoViolations(helper); - - helper.AddSnapshotHeader("Violations"); - Types().That().Are(helper.PublicClass).Should().BeProtectedInternal().AssertOnlyViolations(helper); - Types().That().Are(helper.PublicInnerClass).Should().BeProtectedInternal().AssertOnlyViolations(helper); - Types().That().Are(helper.ProtectedInnerClass).Should().BeProtectedInternal().AssertOnlyViolations(helper); - Types().That().Are(helper.InternalClass).Should().BeProtectedInternal().AssertOnlyViolations(helper); - Types().That().Are(helper.InternalInnerClass).Should().BeProtectedInternal().AssertOnlyViolations(helper); - Types().That().Are(helper.PrivateInnerClass).Should().BeProtectedInternal().AssertOnlyViolations(helper); - Types().That().Are(helper.PrivateProtectedInnerClass).Should().BeProtectedInternal().AssertOnlyViolations(helper); - - helper.AddSnapshotHeader("Multiple inputs"); - Types().That().Are(helper.ProtectedInternalInnerClass, helper.OtherProtectedInternalInnerClass).Should().BeProtectedInternal().AssertNoViolations(helper); - - Types().That().Are(helper.ProtectedInternalInnerClass, helper.InternalClass).Should().BeProtectedInternal().AssertAnyViolations(helper); - await helper.AssertSnapshotMatches(); - } - - [Fact] - public async Task BePublicTest() - { - var helper = new VisibilityAssemblyTestHelper(); - helper.AddSnapshotHeader("No violations"); - Types().That().Are(helper.PublicClass).Should().BePublic().AssertNoViolations(helper); - Types().That().Are(helper.PublicInnerClass).Should().BePublic().AssertNoViolations(helper); - - helper.AddSnapshotHeader("Violations"); - Types().That().Are(helper.InternalClass).Should().BePublic().AssertOnlyViolations(helper); - Types().That().Are(helper.InternalInnerClass).Should().BePublic().AssertOnlyViolations(helper); - Types().That().Are(helper.ProtectedInnerClass).Should().BePublic().AssertOnlyViolations(helper); - Types().That().Are(helper.ProtectedInternalInnerClass).Should().BePublic().AssertOnlyViolations(helper); - Types().That().Are(helper.PrivateInnerClass).Should().BePublic().AssertOnlyViolations(helper); - Types().That().Are(helper.PrivateProtectedInnerClass).Should().BePublic().AssertOnlyViolations(helper); - - helper.AddSnapshotHeader("Multiple inputs"); - Types().That().Are(helper.PublicClass, helper.OtherPublicClass).Should().BePublic().AssertNoViolations(helper); - Types().That().Are(helper.PublicClass, helper.InternalClass).Should().BePublic().AssertAnyViolations(helper); - await helper.AssertSnapshotMatches(); - } - - [Fact] - public async Task CallAnyTest() - { - var helper = new DependencyAssemblyTestHelper(); - - helper.AddSnapshotHeader("No violations"); - var should = MethodMembers().That().Are(helper.MethodWithSingleDependency).Should(); - - helper.AddSnapshotSubHeader("Conditions"); - should.CallAny(helper.CalledMethod).AssertNoViolations(helper); - should.CallAny([helper.CalledMethod]).AssertNoViolations(helper); - should.CallAny(MethodMembers().That().Are(helper.CalledMethod)).AssertNoViolations(helper); - - helper.AddSnapshotSubHeader("Predicates"); - should.Be(MethodMembers().That().CallAny(helper.CalledMethod)).AssertNoViolations(helper); - should.Be(MethodMembers().That().CallAny([helper.CalledMethod])).AssertNoViolations(helper); - should.Be(MethodMembers().That().CallAny(MethodMembers().That().Are(helper.CalledMethod))).AssertNoViolations(helper); - - helper.AddSnapshotSubHeader("Predicates as conditions"); - should.BeMethodMembersThat().CallAny(helper.CalledMethod).AssertNoViolations(helper); - should.BeMethodMembersThat().CallAny([helper.CalledMethod]).AssertNoViolations(helper); - should.BeMethodMembersThat().CallAny(MethodMembers().That().Are(helper.CalledMethod)).AssertNoViolations(helper); - - helper.AddSnapshotHeader("Violations"); - should = MethodMembers().That().Are(helper.MethodWithoutDependencies).Should(); - - helper.AddSnapshotSubHeader("Conditions"); - should.CallAny(helper.CalledMethod).AssertOnlyViolations(helper); - should.CallAny([helper.CalledMethod]).AssertOnlyViolations(helper); - should.CallAny(MethodMembers().That().Are(helper.CalledMethod)).AssertOnlyViolations(helper); - - helper.AddSnapshotSubHeader("Predicates"); - should.Be(MethodMembers().That().CallAny(helper.CalledMethod)).AssertOnlyViolations(helper); - should.Be(MethodMembers().That().CallAny([helper.CalledMethod])).AssertOnlyViolations(helper); - should.Be(MethodMembers().That().CallAny(MethodMembers().That().Are(helper.CalledMethod))).AssertOnlyViolations(helper); - - helper.AddSnapshotSubHeader("Predicates as conditions"); - should.BeMethodMembersThat().CallAny(helper.CalledMethod).AssertOnlyViolations(helper); - should.BeMethodMembersThat().CallAny([helper.CalledMethod]).AssertOnlyViolations(helper); - should.BeMethodMembersThat().CallAny(MethodMembers().That().Are(helper.CalledMethod)).AssertOnlyViolations(helper); - - helper.AddSnapshotHeader("Empty arguments"); - should = MethodMembers().That().Are(helper.MethodWithSingleDependency).Should(); - - helper.AddSnapshotSubHeader("Conditions"); - should.CallAny(new List()).AssertOnlyViolations(helper); - should.CallAny(MethodMembers().That().HaveFullName(helper.NonExistentObjectName)).AssertOnlyViolations(helper); - - helper.AddSnapshotSubHeader("Predicates"); - should.Be(MethodMembers().That().CallAny(new List())).AssertOnlyViolations(helper); - should.Be(MethodMembers().That().CallAny(MethodMembers().That().HaveFullName(helper.NonExistentObjectName))).AssertOnlyViolations(helper); - - helper.AddSnapshotSubHeader("Predicates as conditions"); - should.BeMethodMembersThat().CallAny(new List()).AssertOnlyViolations(helper); - should.BeMethodMembersThat().CallAny(MethodMembers().That().HaveFullName(helper.NonExistentObjectName)).AssertOnlyViolations(helper); - - helper.AddSnapshotHeader("Multiple arguments"); - should = MethodMembers().That().Are(helper.MethodWithMultipleDependencies).Should(); - - helper.AddSnapshotSubHeader("Conditions"); - should.CallAny(helper.MethodWithoutDependencies, helper.MethodWithMultipleDependencies).AssertOnlyViolations(helper); - should.CallAny([helper.MethodWithoutDependencies, helper.MethodWithMultipleDependencies]).AssertOnlyViolations(helper); - should.CallAny(MethodMembers().That().Are(helper.MethodWithoutDependencies, helper.MethodWithMultipleDependencies)).AssertOnlyViolations(helper); - - helper.AddSnapshotSubHeader("Predicates"); - should.Be(MethodMembers().That().CallAny(helper.MethodWithoutDependencies, helper.MethodWithMultipleDependencies)).AssertOnlyViolations(helper); - should.Be(MethodMembers().That().CallAny([helper.MethodWithoutDependencies, helper.MethodWithMultipleDependencies])).AssertOnlyViolations(helper); - should.Be(MethodMembers().That().CallAny(MethodMembers().That().Are(helper.MethodWithoutDependencies, helper.MethodWithMultipleDependencies))).AssertOnlyViolations(helper); - - helper.AddSnapshotSubHeader("Predicates as conditions"); - should.BeMethodMembersThat().CallAny(helper.MethodWithoutDependencies, helper.MethodWithMultipleDependencies).AssertOnlyViolations(helper); - should.BeMethodMembersThat().CallAny([helper.MethodWithoutDependencies, helper.MethodWithMultipleDependencies]).AssertOnlyViolations(helper); - should.BeMethodMembersThat().CallAny(MethodMembers().That().Are(helper.MethodWithoutDependencies, helper.MethodWithMultipleDependencies)).AssertOnlyViolations(helper); - - helper.AddSnapshotHeader("Input with multiple dependencies"); - should = MethodMembers().That().Are(helper.MethodWithMultipleDependencies).Should(); - - helper.AddSnapshotSubHeader("Conditions"); - should.CallAny(helper.CalledMethod1, helper.MethodWithoutDependencies).AssertNoViolations(helper); - should.CallAny(helper.MethodWithoutDependencies).AssertOnlyViolations(helper); - - helper.AddSnapshotSubHeader("Predicates"); - should.Be(MethodMembers().That().CallAny(helper.CalledMethod1, helper.MethodWithoutDependencies)).AssertNoViolations(helper); - should.Be(MethodMembers().That().CallAny(helper.MethodWithoutDependencies)).AssertOnlyViolations(helper); - - helper.AddSnapshotSubHeader("Predicates as conditions"); - should.BeMethodMembersThat().CallAny(helper.CalledMethod1, helper.MethodWithoutDependencies).AssertNoViolations(helper); - should.BeMethodMembersThat().CallAny(helper.MethodWithoutDependencies).AssertOnlyViolations(helper); - - await helper.AssertSnapshotMatches(); - } - - [Fact] - public async Task DependOnAnyTest() - { - var helper = new DependencyAssemblyTestHelper(); - - helper.AddSnapshotHeader("No violations"); - var should = Types().That().Are(helper.ChildClass).Should(); - - helper.AddSnapshotSubHeader("Conditions"); - should.DependOnAny(helper.BaseClass).AssertNoViolations(helper); - should.DependOnAny(helper.BaseClassSystemType).AssertNoViolations(helper); - should.DependOnAny(Classes().That().Are(helper.BaseClass)).AssertNoViolations(helper); - should.DependOnAny([helper.BaseClass]).AssertNoViolations(helper); - should.DependOnAny([helper.BaseClassSystemType]).AssertNoViolations(helper); - - helper.AddSnapshotSubHeader("Predicates"); - should.Be(Types().That().DependOnAny(helper.BaseClass)).AssertNoViolations(helper); - should.Be(Types().That().DependOnAny(helper.BaseClassSystemType)).AssertNoViolations(helper); - should.Be(Types().That().DependOnAny(Classes().That().Are(helper.BaseClass))).AssertNoViolations(helper); - should.Be(Types().That().DependOnAny([helper.BaseClass])).AssertNoViolations(helper); - should.Be(Types().That().DependOnAny([helper.BaseClassSystemType])).AssertNoViolations(helper); - - helper.AddSnapshotSubHeader("Predicates as conditions"); - should.BeTypesThat().DependOnAny(helper.BaseClass).AssertNoViolations(helper); - should.BeTypesThat().DependOnAny(helper.BaseClassSystemType).AssertNoViolations(helper); - should.BeTypesThat().DependOnAny(Classes().That().Are(helper.BaseClass)).AssertNoViolations(helper); - should.BeTypesThat().DependOnAny([helper.BaseClass]).AssertNoViolations(helper); - should.BeTypesThat().DependOnAny([helper.BaseClassSystemType]).AssertNoViolations(helper); - - helper.AddSnapshotHeader("Violations"); - should = Types().That().HaveFullName(helper.ClassWithMultipleDependencies.FullName).Should(); - - helper.AddSnapshotSubHeader("Conditions"); - should.DependOnAny(helper.ClassWithoutDependencies).AssertOnlyViolations(helper); - should.DependOnAny(helper.ClassWithoutDependenciesSystemType).AssertOnlyViolations(helper); - should.DependOnAny(Classes().That().Are(helper.ClassWithoutDependencies)).AssertOnlyViolations(helper); - should.DependOnAny([helper.ClassWithoutDependencies]).AssertOnlyViolations(helper); - should.DependOnAny([helper.ClassWithoutDependenciesSystemType]).AssertOnlyViolations(helper); - - helper.AddSnapshotSubHeader("Predicates"); - should.Be(Types().That().DependOnAny(helper.ClassWithoutDependencies)).AssertOnlyViolations(helper); - should.Be(Types().That().DependOnAny(helper.ClassWithoutDependenciesSystemType)).AssertOnlyViolations(helper); - should.Be(Types().That().DependOnAny(Classes().That().Are(helper.ClassWithoutDependencies))).AssertOnlyViolations(helper); - should.Be(Types().That().DependOnAny([helper.ClassWithoutDependencies])).AssertOnlyViolations(helper); - should.Be(Types().That().DependOnAny([helper.ClassWithoutDependenciesSystemType])).AssertOnlyViolations(helper); - - helper.AddSnapshotSubHeader("Predicates as conditions"); - should.BeTypesThat().DependOnAny(helper.ClassWithoutDependencies).AssertOnlyViolations(helper); - should.BeTypesThat().DependOnAny(helper.ClassWithoutDependenciesSystemType).AssertOnlyViolations(helper); - should.BeTypesThat().DependOnAny(Classes().That().Are(helper.ClassWithoutDependencies)).AssertOnlyViolations(helper); - should.BeTypesThat().DependOnAny([helper.ClassWithoutDependencies]).AssertOnlyViolations(helper); - should.BeTypesThat().DependOnAny([helper.ClassWithoutDependenciesSystemType]).AssertOnlyViolations(helper); - - helper.AddSnapshotHeader("Type outside of architecture"); - should = Types().That().Are(helper.ClassWithMultipleDependencies).Should(); - - helper.AddSnapshotSubHeader("Conditions"); - should.DependOnAny(typeof(AttributeNamespace.ClassWithoutAttributes)).AssertException(helper); - - helper.AddSnapshotSubHeader("Predicates"); - should.Be(Types().That().DependOnAny(typeof(AttributeNamespace.ClassWithoutAttributes))).AssertOnlyViolations(helper); - - helper.AddSnapshotSubHeader("Predicates as conditions"); - should.BeTypesThat().DependOnAny(typeof(AttributeNamespace.ClassWithoutAttributes)).AssertOnlyViolations(helper); - - helper.AddSnapshotHeader("Empty arguments"); - should = Types().That().Are(helper.ClassWithMultipleDependencies).Should(); - - helper.AddSnapshotSubHeader("Conditions"); - should.DependOnAny(new List()).AssertOnlyViolations(helper); - should.DependOnAny(new List()).AssertOnlyViolations(helper); - should.DependOnAny(Classes().That().HaveFullName(helper.NonExistentObjectName)).AssertOnlyViolations(helper); - - helper.AddSnapshotSubHeader("Predicates"); - should.Be(Types().That().DependOnAny(new List())).AssertOnlyViolations(helper); - should.Be(Types().That().DependOnAny(new List())).AssertOnlyViolations(helper); - should.Be(Types().That().DependOnAny(Classes().That().HaveFullName(helper.NonExistentObjectName))).AssertOnlyViolations(helper); - - helper.AddSnapshotSubHeader("Predicates as conditions"); - should.BeTypesThat().DependOnAny(new List()).AssertOnlyViolations(helper); - should.BeTypesThat().DependOnAny(new List()).AssertOnlyViolations(helper); - should.BeTypesThat().DependOnAny(Classes().That().HaveFullName(helper.NonExistentObjectName)).AssertOnlyViolations(helper); - - helper.AddSnapshotHeader("Multiple arguments"); - should = Types().That().Are(helper.ClassWithMultipleDependencies).Should(); - - helper.AddSnapshotSubHeader("Conditions"); - should.DependOnAny(helper.ClassWithoutDependencies, helper.BaseClass).AssertOnlyViolations(helper); - should.DependOnAny([helper.ClassWithoutDependencies, helper.BaseClass]).AssertOnlyViolations(helper); - should.DependOnAny(helper.ClassWithoutDependenciesSystemType, helper.BaseClassSystemType).AssertOnlyViolations(helper); - should.DependOnAny([helper.ClassWithoutDependenciesSystemType, helper.BaseClassSystemType]).AssertOnlyViolations(helper); - - helper.AddSnapshotSubHeader("Predicates"); - should.Be(Types().That().DependOnAny(helper.ClassWithoutDependencies, helper.BaseClass)).AssertOnlyViolations(helper); - should.Be(Types().That().DependOnAny([helper.ClassWithoutDependencies, helper.BaseClass])).AssertOnlyViolations(helper); - should.Be(Types().That().DependOnAny(helper.ClassWithoutDependenciesSystemType, helper.BaseClassSystemType)).AssertOnlyViolations(helper); - should.Be(Types().That().DependOnAny([helper.ClassWithoutDependenciesSystemType, helper.BaseClassSystemType])).AssertOnlyViolations(helper); - - helper.AddSnapshotSubHeader("Predicates as conditions"); - should.BeTypesThat().DependOnAny(helper.ClassWithoutDependencies, helper.BaseClass).AssertOnlyViolations(helper); - should.BeTypesThat().DependOnAny([helper.ClassWithoutDependencies, helper.BaseClass]).AssertOnlyViolations(helper); - should.BeTypesThat().DependOnAny(helper.ClassWithoutDependenciesSystemType, helper.BaseClassSystemType).AssertOnlyViolations(helper); - should.BeTypesThat().DependOnAny([helper.ClassWithoutDependenciesSystemType, helper.BaseClassSystemType]).AssertOnlyViolations(helper); - - helper.AddSnapshotHeader("Input without dependencies"); - should = Types().That().Are(helper.ClassWithoutDependencies).Should(); - - helper.AddSnapshotSubHeader("Conditions"); - should.DependOnAny([helper.BaseClass, helper.ChildClass]).AssertOnlyViolations(helper); - - helper.AddSnapshotSubHeader("Predicates"); - should.Be(Types().That().DependOnAny([helper.BaseClass, helper.ChildClass])).AssertOnlyViolations(helper); - - helper.AddSnapshotSubHeader("Predicates as conditions"); - should.BeTypesThat().DependOnAny([helper.BaseClass, helper.ChildClass]).AssertOnlyViolations(helper); - - helper.AddSnapshotHeader("Multiple inputs"); - - helper.AddSnapshotSubHeader("Conditions"); - Types().That().Are(helper.ChildClass1, helper.ChildClass2).Should().DependOnAny(helper.BaseClassWithMultipleDependenciesSystemType).AssertNoViolations(helper); - Types().That().Are(helper.ChildClass, helper.BaseClass).Should().DependOnAny(helper.ClassWithoutDependencies).AssertOnlyViolations(helper); - - helper.AddSnapshotSubHeader("Predicates"); - Types().That().Are(helper.ChildClass1, helper.ChildClass2).Should().Be(Types().That().DependOnAny(helper.BaseClassWithMultipleDependenciesSystemType)).AssertNoViolations(helper); - Types().That().Are(helper.ChildClass, helper.BaseClass).Should().Be(Types().That().DependOnAny(helper.ClassWithoutDependencies)).AssertOnlyViolations(helper); - - helper.AddSnapshotSubHeader("Predicates as conditions"); - Types().That().Are(helper.ChildClass1, helper.ChildClass2).Should().BeTypesThat().DependOnAny(helper.BaseClassWithMultipleDependenciesSystemType).AssertNoViolations(helper); - Types().That().Are(helper.ChildClass, helper.BaseClass).Should().BeTypesThat().DependOnAny(helper.ClassWithoutDependencies).AssertOnlyViolations(helper); - - await helper.AssertSnapshotMatches(); - } - - [Fact] - public async Task DependOnAnyTypesThatTest() - { - var helper = new DependencyAssemblyTestHelper(); - helper.AddSnapshotHeader("No violations"); - Types().That().Are(helper.ChildClass).Should().DependOnAnyTypesThat().Are(helper.BaseClass).AssertNoViolations(helper); - - helper.AddSnapshotHeader("Violations"); - Types().That().Are(helper.BaseClass).Should().DependOnAnyTypesThat().Are(helper.ChildClass).AssertOnlyViolations(helper); - await helper.AssertSnapshotMatches(); - } - - [Fact] - public async Task ExistTest() - { - var helper = new DependencyAssemblyTestHelper(); - helper.AddSnapshotHeader("No violations"); - Types().That().Are(helper.BaseClass).Should().Exist().AssertNoViolations(helper); - Types().That().Are(helper.BaseClassSystemType).Should().Exist().AssertNoViolations(helper); - - helper.AddSnapshotHeader("Violations"); - Types().That().HaveFullName(helper.NonExistentObjectName).Should().Exist().AssertOnlyViolations(helper); - await helper.AssertSnapshotMatches(); - } - - class CustomCondition : ICondition - { - public string Description => "follow custom condition"; - - public IEnumerable Check( - IEnumerable objects, - Architecture architecture - ) - { - return objects.Select(t => new ConditionResult( - t, - t.Name == "ChildClass", - "does not follow custom condition" - )); - } - - public bool CheckEmpty() - { - return true; - } - } - - [Fact] - public async Task FollowCustomConditionTest() - { - var helper = new DependencyAssemblyTestHelper(); - - helper.AddSnapshotHeader("No violations"); - var should = Types().That().Are(helper.ChildClass).Should(); - should.FollowCustomCondition(new CustomCondition()).AssertNoViolations(helper); - should.FollowCustomCondition(t => new ConditionResult(t, t.Name == "ChildClass", "does not follow custom condition"), "follow custom condition").AssertNoViolations(helper); - should.FollowCustomCondition(t => t.Name == "ChildClass", "follow custom condition", "does not follow custom condition").AssertNoViolations(helper); - - helper.AddSnapshotHeader("Violations"); - should = Types().That().Are(helper.BaseClass).Should(); - should.FollowCustomCondition(new CustomCondition()).AssertOnlyViolations(helper); - should.FollowCustomCondition(t => new ConditionResult(t, t.Name == "ChildClass", "does not follow custom condition"), "follow custom condition").AssertOnlyViolations(helper); - should.FollowCustomCondition(t => t.Name == "ChildClass", "follow custom condition", "does not follow custom condition").AssertOnlyViolations(helper); - - await helper.AssertSnapshotMatches(); - } - - class CustomPredicate : IPredicate - { - public string Description => "follow custom predicate"; - - public IEnumerable GetMatchingObjects(IEnumerable objects, Architecture architecture) - { - return objects.Where(t => t.Name == "ChildClass"); - } - } - - [Fact] - public async Task FollowCustomPredicateTest() - { - var helper = new DependencyAssemblyTestHelper(); - - helper.AddSnapshotHeader("No violations"); - var should = Types().That().Are(helper.ChildClass).Should(); - helper.AddSnapshotSubHeader("Conditions"); - should.Be(Types().That().FollowCustomPredicate(new CustomPredicate())).AssertNoViolations(helper); - should.Be(Types().That().FollowCustomPredicate(t => t.Name == "ChildClass", "follow custom predicate")).AssertNoViolations(helper); - - helper.AddSnapshotSubHeader("Predicates"); - should.BeTypesThat().FollowCustomPredicate(new CustomPredicate()).AssertNoViolations(helper); - should.BeTypesThat().FollowCustomPredicate(t => t.Name == "ChildClass", "follow custom predicate").AssertNoViolations(helper); - - helper.AddSnapshotHeader("Violations"); - should = Types().That().Are(helper.BaseClass).Should(); - - helper.AddSnapshotSubHeader("Conditions"); - should.Be(Types().That().FollowCustomPredicate(new CustomPredicate())).AssertOnlyViolations(helper); - should.Be(Types().That().FollowCustomPredicate(t => t.Name == "ChildClass", "follow custom predicate")).AssertOnlyViolations(helper); - - helper.AddSnapshotSubHeader("Predicates"); - should.BeTypesThat().FollowCustomPredicate(new CustomPredicate()).AssertOnlyViolations(helper); - should.BeTypesThat().FollowCustomPredicate(t => t.Name == "ChildClass", "follow custom predicate").AssertOnlyViolations(helper); - - await helper.AssertSnapshotMatches(); - } - - [Fact] - public async Task HaveAnyAttributesTest() - { - var helper = new AttributeAssemblyTestHelpers(); - - helper.AddSnapshotHeader("No violations"); - var should = Types().That().Are(helper.ClassWithTwoAttributes).Should(); - - helper.AddSnapshotSubHeader("Conditions"); - should.HaveAnyAttributes(helper.Attribute1).AssertNoViolations(helper); - should.HaveAnyAttributes([helper.Attribute1]).AssertNoViolations(helper); - should.HaveAnyAttributes(helper.Attribute1SystemType).AssertNoViolations(helper); - should.HaveAnyAttributes([helper.Attribute1SystemType]).AssertNoViolations(helper); - should.HaveAnyAttributes(Attributes().That().Are(helper.Attribute1)).AssertNoViolations(helper); - - helper.AddSnapshotSubHeader("Predicates"); - should.Be(Types().That().HaveAnyAttributes(helper.Attribute1)).AssertNoViolations(helper); - should.Be(Types().That().HaveAnyAttributes([helper.Attribute1])).AssertNoViolations(helper); - should.Be(Types().That().HaveAnyAttributes(helper.Attribute1SystemType)).AssertNoViolations(helper); - should.Be(Types().That().HaveAnyAttributes([helper.Attribute1SystemType])).AssertNoViolations(helper); - should.Be(Types().That().HaveAnyAttributes(Attributes().That().Are(helper.Attribute1))).AssertNoViolations(helper); - - helper.AddSnapshotSubHeader("Predicates as conditions"); - should.BeTypesThat().HaveAnyAttributes(helper.Attribute1).AssertNoViolations(helper); - should.BeTypesThat().HaveAnyAttributes([helper.Attribute1]).AssertNoViolations(helper); - should.BeTypesThat().HaveAnyAttributes(helper.Attribute1SystemType).AssertNoViolations(helper); - should.BeTypesThat().HaveAnyAttributes([helper.Attribute1SystemType]).AssertNoViolations(helper); - should.BeTypesThat().HaveAnyAttributes(Attributes().That().Are(helper.Attribute1)).AssertNoViolations(helper); - - helper.AddSnapshotHeader("Violations"); - should = Types().That().Are(helper.ClassWithTwoAttributes).Should(); - - helper.AddSnapshotSubHeader("Conditions"); - should.HaveAnyAttributes(helper.UnusedAttribute).AssertOnlyViolations(helper); - should.HaveAnyAttributes([helper.UnusedAttribute]).AssertOnlyViolations(helper); - should.HaveAnyAttributes(helper.UnusedAttributeSystemType).AssertOnlyViolations(helper); - should.HaveAnyAttributes([helper.UnusedAttributeSystemType]).AssertOnlyViolations(helper); - should.HaveAnyAttributes(Attributes().That().Are(helper.UnusedAttribute)).AssertOnlyViolations(helper); - - helper.AddSnapshotSubHeader("Predicates"); - should.Be(Types().That().HaveAnyAttributes(helper.UnusedAttribute)).AssertOnlyViolations(helper); - should.Be(Types().That().HaveAnyAttributes([helper.UnusedAttribute])).AssertOnlyViolations(helper); - should.Be(Types().That().HaveAnyAttributes(helper.UnusedAttributeSystemType)).AssertOnlyViolations(helper); - should.Be(Types().That().HaveAnyAttributes([helper.UnusedAttributeSystemType])).AssertOnlyViolations(helper); - should.Be(Types().That().HaveAnyAttributes(Attributes().That().Are(helper.UnusedAttribute))).AssertOnlyViolations(helper); - - helper.AddSnapshotSubHeader("Predicates as conditions"); - should.BeTypesThat().HaveAnyAttributes(helper.UnusedAttribute).AssertOnlyViolations(helper); - should.BeTypesThat().HaveAnyAttributes([helper.UnusedAttribute]).AssertOnlyViolations(helper); - should.BeTypesThat().HaveAnyAttributes(helper.UnusedAttributeSystemType).AssertOnlyViolations(helper); - should.BeTypesThat().HaveAnyAttributes([helper.UnusedAttributeSystemType]).AssertOnlyViolations(helper); - should.BeTypesThat().HaveAnyAttributes(Attributes().That().Are(helper.UnusedAttribute)).AssertOnlyViolations(helper); - - helper.AddSnapshotHeader("Empty arguments"); - should = Types().That().Are(helper.ClassWithTwoAttributes).Should(); - - helper.AddSnapshotSubHeader("Conditions"); - should.HaveAnyAttributes(new List()).AssertOnlyViolations(helper); - should.HaveAnyAttributes(new List()).AssertOnlyViolations(helper); - should.HaveAnyAttributes(Attributes().That().HaveFullName(helper.NonExistentObjectName)).AssertOnlyViolations(helper); - - helper.AddSnapshotSubHeader("Predicates"); - should.Be(Types().That().HaveAnyAttributes(new List())).AssertOnlyViolations(helper); - should.Be(Types().That().HaveAnyAttributes(new List())).AssertOnlyViolations(helper); - should.Be(Types().That().HaveAnyAttributes(Attributes().That().HaveFullName(helper.NonExistentObjectName))).AssertOnlyViolations(helper); - - helper.AddSnapshotSubHeader("Predicates as conditions"); - should.BeTypesThat().HaveAnyAttributes(new List()).AssertOnlyViolations(helper); - should.BeTypesThat().HaveAnyAttributes(new List()).AssertOnlyViolations(helper); - should.BeTypesThat().HaveAnyAttributes(Attributes().That().HaveFullName(helper.NonExistentObjectName)).AssertOnlyViolations(helper); - - helper.AddSnapshotHeader("Multiple arguments"); - should = Types().That().Are(helper.ClassWithTwoAttributes).Should(); - - helper.AddSnapshotSubHeader("Conditions"); - should.HaveAnyAttributes(helper.Attribute1, helper.UnusedAttribute).AssertNoViolations(helper); - should.HaveAnyAttributes([helper.Attribute1, helper.UnusedAttribute]).AssertNoViolations(helper); - should.HaveAnyAttributes(helper.Attribute1SystemType, helper.UnusedAttributeSystemType).AssertNoViolations(helper); - should.HaveAnyAttributes([helper.Attribute1SystemType, helper.UnusedAttributeSystemType]).AssertNoViolations(helper); - should.HaveAnyAttributes(Attributes().That().Are(helper.Attribute1, helper.UnusedAttribute)).AssertNoViolations(helper); - - helper.AddSnapshotSubHeader("Predicates"); - should.Be(Types().That().HaveAnyAttributes(helper.Attribute1, helper.UnusedAttribute)).AssertNoViolations(helper); - should.Be(Types().That().HaveAnyAttributes([helper.Attribute1, helper.UnusedAttribute])).AssertNoViolations(helper); - should.Be(Types().That().HaveAnyAttributes(helper.Attribute1SystemType, helper.UnusedAttributeSystemType)).AssertNoViolations(helper); - should.Be(Types().That().HaveAnyAttributes([helper.Attribute1SystemType, helper.UnusedAttributeSystemType])).AssertNoViolations(helper); - should.Be(Types().That().HaveAnyAttributes(Attributes().That().Are(helper.Attribute1, helper.UnusedAttribute))).AssertNoViolations(helper); - - helper.AddSnapshotSubHeader("Predicates as conditions"); - should.BeTypesThat().HaveAnyAttributes(helper.Attribute1, helper.UnusedAttribute).AssertNoViolations(helper); - should.BeTypesThat().HaveAnyAttributes([helper.Attribute1, helper.UnusedAttribute]).AssertNoViolations(helper); - should.BeTypesThat().HaveAnyAttributes(helper.Attribute1SystemType, helper.UnusedAttributeSystemType).AssertNoViolations(helper); - should.BeTypesThat().HaveAnyAttributes([helper.Attribute1SystemType, helper.UnusedAttributeSystemType]).AssertNoViolations(helper); - should.BeTypesThat().HaveAnyAttributes(Attributes().That().Are(helper.Attribute1, helper.UnusedAttribute)).AssertNoViolations(helper); - - helper.AddSnapshotHeader("Multiple inputs"); - - helper.AddSnapshotSubHeader("Conditions"); - Types().That().Are(helper.ClassWithTwoAttributes, helper.ClassWithThreeAttributes).Should().HaveAnyAttributes(helper.Attribute1).AssertNoViolations(helper); - Types().That().Are(helper.ClassWithTwoAttributes, helper.ClassWithoutAttributes).Should().HaveAnyAttributes(helper.Attribute1).AssertAnyViolations(helper); - - helper.AddSnapshotSubHeader("Predicates"); - Types().That().Are(helper.ClassWithTwoAttributes, helper.ClassWithThreeAttributes).Should().Be(Types().That().HaveAnyAttributes(helper.Attribute1)).AssertNoViolations(helper); - Types().That().Are(helper.ClassWithTwoAttributes, helper.ClassWithoutAttributes).Should().Be(Types().That().HaveAnyAttributes(helper.Attribute1)).AssertAnyViolations(helper); - - helper.AddSnapshotSubHeader("Predicates as conditions"); - Types().That().Are(helper.ClassWithTwoAttributes, helper.ClassWithThreeAttributes).Should().BeTypesThat().HaveAnyAttributes(helper.Attribute1).AssertNoViolations(helper); - Types().That().Are(helper.ClassWithTwoAttributes, helper.ClassWithoutAttributes).Should().BeTypesThat().HaveAnyAttributes(helper.Attribute1).AssertAnyViolations(helper); - - await helper.AssertSnapshotMatches(); - } - - [Fact] - public async Task HaveAnyAttributesThatTest() - { - var helper = new AttributeAssemblyTestHelpers(); - helper.AddSnapshotHeader("No violations"); - var should = Types().That().Are(helper.ClassWithTwoAttributes).Should(); - should.HaveAnyAttributesThat().Are(helper.Attribute1).AssertNoViolations(helper); - - helper.AddSnapshotHeader("Violations"); - should = Types().That().Are(helper.ClassWithTwoAttributes).Should(); - should.HaveAnyAttributesThat().Are(helper.UnusedAttribute).AssertOnlyViolations(helper); - await helper.AssertSnapshotMatches(); - } - - [Fact] - public async Task HaveAnyAttributesWithArgumentsTest() - { - var helper = new AttributeAssemblyTestHelpers(); - - helper.AddSnapshotHeader("No violations with type arguments"); - var should = Types().That().Are(helper.ClassWithSingleAttributeWithArguments).Should(); - - helper.AddSnapshotSubHeader("Conditions"); - should.HaveAnyAttributesWithArguments(helper.Attribute1TypeArgumentSystemType).AssertNoViolations(helper); - should.HaveAnyAttributesWithArguments([helper.Attribute1TypeArgumentSystemType]).AssertNoViolations(helper); - - helper.AddSnapshotSubHeader("Predicates"); - should.Be(Types().That().HaveAnyAttributesWithArguments(helper.Attribute1TypeArgumentSystemType)).AssertNoViolations(helper); - should.Be(Types().That().HaveAnyAttributesWithArguments([helper.Attribute1TypeArgumentSystemType])).AssertNoViolations(helper); - - helper.AddSnapshotSubHeader("Predicates as conditions"); - should.BeTypesThat().HaveAnyAttributesWithArguments(helper.Attribute1TypeArgumentSystemType).AssertNoViolations(helper); - should.BeTypesThat().HaveAnyAttributesWithArguments([helper.Attribute1TypeArgumentSystemType]).AssertNoViolations(helper); - - helper.AddSnapshotHeader("No violations with value arguments"); - should = Types().That().Are(helper.ClassWithSingleAttributeWithArguments).Should(); - - helper.AddSnapshotSubHeader("Conditions"); - should.HaveAnyAttributesWithArguments(helper.Attribute1IntegerArgument).AssertNoViolations(helper); - should.HaveAnyAttributesWithArguments([helper.Attribute1IntegerArgument]).AssertNoViolations(helper); - - helper.AddSnapshotSubHeader("Predicates"); - should.Be(Types().That().HaveAnyAttributesWithArguments(helper.Attribute1IntegerArgument)).AssertNoViolations(helper); - should.Be(Types().That().HaveAnyAttributesWithArguments([helper.Attribute1IntegerArgument])).AssertNoViolations(helper); - - helper.AddSnapshotSubHeader("Predicates as conditions"); - should.BeTypesThat().HaveAnyAttributesWithArguments(helper.Attribute1IntegerArgument).AssertNoViolations(helper); - should.BeTypesThat().HaveAnyAttributesWithArguments([helper.Attribute1IntegerArgument]).AssertNoViolations(helper); - - helper.AddSnapshotHeader("Violations with type arguments"); - should = Types().That().Are(helper.ClassWithSingleAttributeWithArguments).Should(); - - helper.AddSnapshotSubHeader("Conditions"); - should.HaveAnyAttributesWithArguments(helper.UnusedTypeArgumentSystemType).AssertOnlyViolations(helper); - should.HaveAnyAttributesWithArguments([helper.UnusedTypeArgumentSystemType]).AssertOnlyViolations(helper); - - helper.AddSnapshotSubHeader("Predicates"); - should.Be(Types().That().HaveAnyAttributesWithArguments(helper.UnusedTypeArgumentSystemType)).AssertOnlyViolations(helper); - should.Be(Types().That().HaveAnyAttributesWithArguments([helper.UnusedTypeArgumentSystemType])).AssertOnlyViolations(helper); - - helper.AddSnapshotSubHeader("Predicates as conditions"); - should.BeTypesThat().HaveAnyAttributesWithArguments(helper.UnusedTypeArgumentSystemType).AssertOnlyViolations(helper); - should.BeTypesThat().HaveAnyAttributesWithArguments([helper.UnusedTypeArgumentSystemType]).AssertOnlyViolations(helper); - - helper.AddSnapshotHeader("Violations with value arguments"); - should = Types().That().Are(helper.ClassWithoutAttributes).Should(); - - helper.AddSnapshotSubHeader("Conditions"); - should.HaveAnyAttributesWithArguments(helper.Attribute1IntegerArgument).AssertOnlyViolations(helper); - should.HaveAnyAttributesWithArguments([helper.Attribute1IntegerArgument]).AssertOnlyViolations(helper); - - helper.AddSnapshotSubHeader("Predicates"); - should.Be(Types().That().HaveAnyAttributesWithArguments(helper.Attribute1IntegerArgument)).AssertOnlyViolations(helper); - should.Be(Types().That().HaveAnyAttributesWithArguments([helper.Attribute1IntegerArgument])).AssertOnlyViolations(helper); - - helper.AddSnapshotSubHeader("Predicates as conditions"); - should.BeTypesThat().HaveAnyAttributesWithArguments(helper.Attribute1IntegerArgument).AssertOnlyViolations(helper); - should.BeTypesThat().HaveAnyAttributesWithArguments([helper.Attribute1IntegerArgument]).AssertOnlyViolations(helper); - - helper.AddSnapshotHeader("Null argument"); - should = Types().That().Are(helper.ClassWithSingleAttributeWithArguments).Should(); - - helper.AddSnapshotSubHeader("Conditions"); - should.HaveAnyAttributesWithArguments(null).AssertOnlyViolations(helper); - - helper.AddSnapshotSubHeader("Predicates"); - should.Be(Types().That().HaveAnyAttributesWithArguments(null)).AssertOnlyViolations(helper); - - helper.AddSnapshotSubHeader("Predicates as conditions"); - should.BeTypesThat().HaveAnyAttributesWithArguments(null).AssertOnlyViolations(helper); - - helper.AddSnapshotHeader("Empty arguments"); - - helper.AddSnapshotSubHeader("Conditions"); - Types().That().Are(helper.ClassWithSingleAttributeWithArguments).Should().HaveAnyAttributesWithArguments([]).AssertNoViolations(helper); - Types().That().Are(helper.ClassWithTwoAttributesWithArguments).Should().HaveAnyAttributesWithArguments([]).AssertNoViolations(helper); - - helper.AddSnapshotSubHeader("Predicates"); - Types().That().Are(helper.ClassWithSingleAttributeWithArguments).Should().Be(Types().That().HaveAnyAttributesWithArguments([])).AssertNoViolations(helper); - Types().That().Are(helper.ClassWithTwoAttributesWithArguments).Should().Be(Types().That().HaveAnyAttributesWithArguments([])).AssertNoViolations(helper); - - helper.AddSnapshotSubHeader("Predicates as conditions"); - Types().That().Are(helper.ClassWithSingleAttributeWithArguments).Should().BeTypesThat().HaveAnyAttributesWithArguments([]).AssertNoViolations(helper); - Types().That().Are(helper.ClassWithTwoAttributesWithArguments).Should().BeTypesThat().HaveAnyAttributesWithArguments([]).AssertNoViolations(helper); - - helper.AddSnapshotHeader("Multiple arguments"); - should = Types().That().Are(helper.ClassWithSingleAttributeWithArguments).Should(); - - helper.AddSnapshotSubHeader("Conditions"); - should.HaveAnyAttributesWithArguments([helper.UnusedAttributeIntValue, helper.UnusedAttributeStringValue]).AssertOnlyViolations(helper); - should.HaveAnyAttributesWithArguments(helper.UnusedAttributeIntValue, helper.UnusedAttributeStringValue).AssertOnlyViolations(helper); - - helper.AddSnapshotSubHeader("Predicates"); - should.Be(Types().That().HaveAnyAttributesWithArguments([helper.UnusedAttributeIntValue, helper.UnusedAttributeStringValue])).AssertOnlyViolations(helper); - should.Be(Types().That().HaveAnyAttributesWithArguments(helper.UnusedAttributeIntValue, helper.UnusedAttributeStringValue)).AssertOnlyViolations(helper); - - helper.AddSnapshotSubHeader("Predicates as conditions"); - should.BeTypesThat().HaveAnyAttributesWithArguments([helper.UnusedAttributeIntValue, helper.UnusedAttributeStringValue]).AssertOnlyViolations(helper); - should.BeTypesThat().HaveAnyAttributesWithArguments(helper.UnusedAttributeIntValue, helper.UnusedAttributeStringValue).AssertOnlyViolations(helper); - - helper.AddSnapshotHeader("Multiple inputs"); - - helper.AddSnapshotSubHeader("Conditions"); - Types().That().Are(helper.ClassWithSingleAttributeWithArguments, helper.ClassWithTwoAttributesWithArguments).Should().HaveAnyAttributesWithArguments(helper.Attribute1StringArgument).AssertNoViolations(helper); - Types().That().Are(helper.ClassWithSingleAttributeWithArguments, helper.ClassWithTwoAttributesWithArguments).Should().HaveAnyAttributesWithArguments(helper.Attribute2IntegerArgument).AssertAnyViolations(helper); - - helper.AddSnapshotSubHeader("Predicates"); - Types().That().Are(helper.ClassWithSingleAttributeWithArguments, helper.ClassWithTwoAttributesWithArguments).Should().Be(Types().That().HaveAnyAttributesWithArguments(helper.Attribute1StringArgument)).AssertNoViolations(helper); - Types().That().Are(helper.ClassWithSingleAttributeWithArguments, helper.ClassWithTwoAttributesWithArguments).Should().Be(Types().That().HaveAnyAttributesWithArguments(helper.Attribute2IntegerArgument)).AssertAnyViolations(helper); - - helper.AddSnapshotSubHeader("Predicates as conditions"); - Types().That().Are(helper.ClassWithSingleAttributeWithArguments, helper.ClassWithTwoAttributesWithArguments).Should().BeTypesThat().HaveAnyAttributesWithArguments(helper.Attribute1StringArgument).AssertNoViolations(helper); - Types().That().Are(helper.ClassWithSingleAttributeWithArguments, helper.ClassWithTwoAttributesWithArguments).Should().BeTypesThat().HaveAnyAttributesWithArguments(helper.Attribute2IntegerArgument).AssertAnyViolations(helper); - - await helper.AssertSnapshotMatches(); - } - - [Fact] - public async Task HaveAnyAttributesWithNamedArguments() - { - var helper = new AttributeAssemblyTestHelpers(); - - helper.AddSnapshotHeader("No violations with type arguments"); - var should = Types().That().Are(helper.ClassWithSingleAttributeWithNamedArguments).Should(); - - helper.AddSnapshotSubHeader("Conditions"); - should.HaveAnyAttributesWithNamedArguments(("NamedParameter1", helper.Attribute1TypeArgumentSystemType)).AssertNoViolations(helper); - should.HaveAnyAttributesWithNamedArguments([("NamedParameter1", helper.Attribute1TypeArgumentSystemType)]).AssertNoViolations(helper); - - helper.AddSnapshotSubHeader("Predicates"); - should.Be(Types().That().HaveAnyAttributesWithNamedArguments(("NamedParameter1", helper.Attribute1TypeArgumentSystemType))).AssertNoViolations(helper); - should.Be(Types().That().HaveAnyAttributesWithNamedArguments([("NamedParameter1", helper.Attribute1TypeArgumentSystemType)])).AssertNoViolations(helper); - - helper.AddSnapshotSubHeader("Predicates as conditions"); - should.BeTypesThat().HaveAnyAttributesWithNamedArguments(("NamedParameter1", helper.Attribute1TypeArgumentSystemType)).AssertNoViolations(helper); - should.BeTypesThat().HaveAnyAttributesWithNamedArguments([("NamedParameter1", helper.Attribute1TypeArgumentSystemType)]).AssertNoViolations(helper); - - helper.AddSnapshotHeader("No violations with value arguments"); - should = Types().That().Are(helper.ClassWithSingleAttributeWithNamedArguments).Should(); - - helper.AddSnapshotSubHeader("Conditions"); - should.HaveAnyAttributesWithNamedArguments(("NamedParameter2", helper.Attribute1StringArgument)).AssertNoViolations(helper); - should.HaveAnyAttributesWithNamedArguments([("NamedParameter2", helper.Attribute1StringArgument)]).AssertNoViolations(helper); - - helper.AddSnapshotSubHeader("Predicates"); - should.Be(Types().That().HaveAnyAttributesWithNamedArguments(("NamedParameter2", helper.Attribute1StringArgument))).AssertNoViolations(helper); - should.Be(Types().That().HaveAnyAttributesWithNamedArguments([("NamedParameter2", helper.Attribute1StringArgument)])).AssertNoViolations(helper); - - helper.AddSnapshotSubHeader("Predicates as conditions"); - should.BeTypesThat().HaveAnyAttributesWithNamedArguments(("NamedParameter2", helper.Attribute1StringArgument)).AssertNoViolations(helper); - should.BeTypesThat().HaveAnyAttributesWithNamedArguments([("NamedParameter2", helper.Attribute1StringArgument)]).AssertNoViolations(helper); - - helper.AddSnapshotHeader("Violations for attribute without named arguments"); - should = Types().That().Are(helper.ClassWithSingleAttribute).Should(); - - helper.AddSnapshotSubHeader("Conditions"); - should.HaveAnyAttributesWithNamedArguments(("NamedParameter1", helper.Attribute1TypeArgumentSystemType)).AssertOnlyViolations(helper); - should.HaveAnyAttributesWithNamedArguments([("NamedParameter1", helper.Attribute1TypeArgumentSystemType)]).AssertOnlyViolations(helper); - should.HaveAnyAttributesWithNamedArguments(("NamedParameter2", helper.Attribute1StringArgument)).AssertOnlyViolations(helper); - should.HaveAnyAttributesWithNamedArguments([("NamedParameter2", helper.Attribute1StringArgument)]).AssertOnlyViolations(helper); - - helper.AddSnapshotSubHeader("Predicates"); - should.Be(Types().That().HaveAnyAttributesWithNamedArguments(("NamedParameter1", helper.Attribute1TypeArgumentSystemType))).AssertOnlyViolations(helper); - should.Be(Types().That().HaveAnyAttributesWithNamedArguments([("NamedParameter1", helper.Attribute1TypeArgumentSystemType)])).AssertOnlyViolations(helper); - should.Be(Types().That().HaveAnyAttributesWithNamedArguments(("NamedParameter2", helper.Attribute1StringArgument))).AssertOnlyViolations(helper); - should.Be(Types().That().HaveAnyAttributesWithNamedArguments([("NamedParameter2", helper.Attribute1StringArgument)])).AssertOnlyViolations(helper); - - helper.AddSnapshotSubHeader("Predicates as conditions"); - should.BeTypesThat().HaveAnyAttributesWithNamedArguments(("NamedParameter1", helper.Attribute1TypeArgumentSystemType)).AssertOnlyViolations(helper); - should.BeTypesThat().HaveAnyAttributesWithNamedArguments([("NamedParameter1", helper.Attribute1TypeArgumentSystemType)]).AssertOnlyViolations(helper); - should.BeTypesThat().HaveAnyAttributesWithNamedArguments(("NamedParameter2", helper.Attribute1StringArgument)).AssertOnlyViolations(helper); - should.BeTypesThat().HaveAnyAttributesWithNamedArguments([("NamedParameter2", helper.Attribute1StringArgument)]).AssertOnlyViolations(helper); - - helper.AddSnapshotHeader("Violations with type arguments"); - should = Types().That().Are(helper.ClassWithSingleAttributeWithNamedArguments).Should(); - - helper.AddSnapshotSubHeader("Conditions"); - should.HaveAnyAttributesWithNamedArguments(("InvalidName", helper.Attribute1TypeArgumentSystemType)).AssertOnlyViolations(helper); - should.HaveAnyAttributesWithNamedArguments([("InvalidName", helper.Attribute1TypeArgumentSystemType)]).AssertOnlyViolations(helper); - should.HaveAnyAttributesWithNamedArguments(("NamedParameter1", helper.UnusedTypeArgumentSystemType)).AssertOnlyViolations(helper); - should.HaveAnyAttributesWithNamedArguments([("NamedParameter1", helper.UnusedTypeArgumentSystemType)]).AssertOnlyViolations(helper); - - helper.AddSnapshotSubHeader("Predicates"); - should.Be(Types().That().HaveAnyAttributesWithNamedArguments(("InvalidName", helper.Attribute1TypeArgumentSystemType))).AssertOnlyViolations(helper); - should.Be(Types().That().HaveAnyAttributesWithNamedArguments([("InvalidName", helper.Attribute1TypeArgumentSystemType)])).AssertOnlyViolations(helper); - should.Be(Types().That().HaveAnyAttributesWithNamedArguments(("NamedParameter1", helper.UnusedTypeArgumentSystemType))).AssertOnlyViolations(helper); - should.Be(Types().That().HaveAnyAttributesWithNamedArguments([("NamedParameter1", helper.UnusedTypeArgumentSystemType)])).AssertOnlyViolations(helper); - - helper.AddSnapshotSubHeader("Predicates as conditions"); - should.BeTypesThat().HaveAnyAttributesWithNamedArguments(("InvalidName", helper.Attribute1TypeArgumentSystemType)).AssertOnlyViolations(helper); - should.BeTypesThat().HaveAnyAttributesWithNamedArguments([("InvalidName", helper.Attribute1TypeArgumentSystemType)]).AssertOnlyViolations(helper); - should.BeTypesThat().HaveAnyAttributesWithNamedArguments(("NamedParameter1", helper.UnusedTypeArgumentSystemType)).AssertOnlyViolations(helper); - should.BeTypesThat().HaveAnyAttributesWithNamedArguments([("NamedParameter1", helper.UnusedTypeArgumentSystemType)]).AssertOnlyViolations(helper); - - helper.AddSnapshotHeader("Violations with value arguments"); - should = Types().That().Are(helper.ClassWithSingleAttributeWithNamedArguments).Should(); - - helper.AddSnapshotSubHeader("Conditions"); - should.HaveAnyAttributesWithNamedArguments(("InvalidName", helper.Attribute1StringArgument)).AssertOnlyViolations(helper); - should.HaveAnyAttributesWithNamedArguments([("InvalidName", helper.Attribute1StringArgument)]).AssertOnlyViolations(helper); - should.HaveAnyAttributesWithNamedArguments(("NamedParameter2", helper.UnusedAttributeStringValue)).AssertOnlyViolations(helper); - should.HaveAnyAttributesWithNamedArguments([("NamedParameter2", helper.UnusedAttributeStringValue)]).AssertOnlyViolations(helper); - - helper.AddSnapshotSubHeader("Predicates"); - should.Be(Types().That().HaveAnyAttributesWithNamedArguments(("InvalidName", helper.Attribute1StringArgument))).AssertOnlyViolations(helper); - should.Be(Types().That().HaveAnyAttributesWithNamedArguments([("InvalidName", helper.Attribute1StringArgument)])).AssertOnlyViolations(helper); - should.Be(Types().That().HaveAnyAttributesWithNamedArguments(("NamedParameter2", helper.UnusedAttributeStringValue))).AssertOnlyViolations(helper); - should.Be(Types().That().HaveAnyAttributesWithNamedArguments([("NamedParameter2", helper.UnusedAttributeStringValue)])).AssertOnlyViolations(helper); - - helper.AddSnapshotSubHeader("Predicates as conditions"); - should.BeTypesThat().HaveAnyAttributesWithNamedArguments(("InvalidName", helper.Attribute1StringArgument)).AssertOnlyViolations(helper); - should.BeTypesThat().HaveAnyAttributesWithNamedArguments([("InvalidName", helper.Attribute1StringArgument)]).AssertOnlyViolations(helper); - should.BeTypesThat().HaveAnyAttributesWithNamedArguments(("NamedParameter2", helper.UnusedAttributeStringValue)).AssertOnlyViolations(helper); - should.BeTypesThat().HaveAnyAttributesWithNamedArguments([("NamedParameter2", helper.UnusedAttributeStringValue)]).AssertOnlyViolations(helper); - - helper.AddSnapshotHeader("Empty arguments"); - should = Types().That().Are(helper.ClassWithSingleAttributeWithNamedArguments).Should(); - - helper.AddSnapshotSubHeader("Conditions"); - should.HaveAnyAttributesWithNamedArguments([]).AssertNoViolations(helper); - - helper.AddSnapshotSubHeader("Predicates"); - should.Be(Types().That().HaveAnyAttributesWithNamedArguments([])).AssertNoViolations(helper); - - helper.AddSnapshotSubHeader("Predicates as conditions"); - should.BeTypesThat().HaveAnyAttributesWithNamedArguments([]).AssertNoViolations(helper); - - helper.AddSnapshotHeader("Multiple arguments"); - should = Types().That().Are(helper.ClassWithSingleAttributeWithNamedArguments).Should(); - - helper.AddSnapshotSubHeader("Conditions"); - should.HaveAnyAttributesWithNamedArguments(("NamedParameter1", helper.Attribute1TypeArgumentSystemType), ("NamedParameter2", helper.Attribute1StringArgument)).AssertNoViolations(helper); - should.HaveAnyAttributesWithNamedArguments([("NamedParameter1", helper.Attribute1TypeArgumentSystemType), ("NamedParameter2", helper.Attribute1StringArgument),]).AssertNoViolations(helper); - should.HaveAnyAttributesWithNamedArguments(("NamedParameter1", helper.Attribute1TypeArgumentSystemType), ("NamedParameter2", helper.UnusedAttributeStringValue)).AssertOnlyViolations(helper); - should.HaveAnyAttributesWithNamedArguments([("NamedParameter1", helper.Attribute1TypeArgumentSystemType), ("NamedParameter2", helper.UnusedAttributeStringValue),]).AssertOnlyViolations(helper); - - helper.AddSnapshotSubHeader("Predicates"); - should.Be(Types().That().HaveAnyAttributesWithNamedArguments(("NamedParameter1", helper.Attribute1TypeArgumentSystemType), ("NamedParameter2", helper.Attribute1StringArgument))).AssertNoViolations(helper); - should.Be(Types().That().HaveAnyAttributesWithNamedArguments([("NamedParameter1", helper.Attribute1TypeArgumentSystemType), ("NamedParameter2", helper.Attribute1StringArgument),])).AssertNoViolations(helper); - should.Be(Types().That().HaveAnyAttributesWithNamedArguments(("NamedParameter1", helper.Attribute1TypeArgumentSystemType), ("NamedParameter2", helper.UnusedAttributeStringValue))).AssertOnlyViolations(helper); - should.Be(Types().That().HaveAnyAttributesWithNamedArguments([("NamedParameter1", helper.Attribute1TypeArgumentSystemType), ("NamedParameter2", helper.UnusedAttributeStringValue),])).AssertOnlyViolations(helper); - - helper.AddSnapshotSubHeader("Predicates as conditions"); - should.BeTypesThat().HaveAnyAttributesWithNamedArguments(("NamedParameter1", helper.Attribute1TypeArgumentSystemType), ("NamedParameter2", helper.Attribute1StringArgument)).AssertNoViolations(helper); - should.BeTypesThat().HaveAnyAttributesWithNamedArguments([("NamedParameter1", helper.Attribute1TypeArgumentSystemType), ("NamedParameter2", helper.Attribute1StringArgument),]).AssertNoViolations(helper); - should.BeTypesThat().HaveAnyAttributesWithNamedArguments(("NamedParameter1", helper.Attribute1TypeArgumentSystemType), ("NamedParameter2", helper.UnusedAttributeStringValue)).AssertOnlyViolations(helper); - should.BeTypesThat().HaveAnyAttributesWithNamedArguments([("NamedParameter1", helper.Attribute1TypeArgumentSystemType), ("NamedParameter2", helper.UnusedAttributeStringValue),]).AssertOnlyViolations(helper); - - helper.AddSnapshotHeader("Multiple inputs"); - should = Types().That().Are(helper.ClassWithSingleAttributeWithNamedArguments, helper.ClassWithTwoAttributesWithNamedArguments).Should(); - - helper.AddSnapshotSubHeader("Conditions"); - should.HaveAnyAttributesWithNamedArguments(("NamedParameter1", helper.Attribute1TypeArgumentSystemType)).AssertNoViolations(helper); - should.HaveAnyAttributesWithNamedArguments([("NamedParameter3", helper.Attribute2TypeArgumentSystemType)]).AssertAnyViolations(helper); - - helper.AddSnapshotSubHeader("Predicates"); - should.Be(Types().That().HaveAnyAttributesWithNamedArguments(("NamedParameter1", helper.Attribute1TypeArgumentSystemType))).AssertNoViolations(helper); - should.Be(Types().That().HaveAnyAttributesWithNamedArguments([("NamedParameter3", helper.Attribute2TypeArgumentSystemType)])).AssertAnyViolations(helper); - - helper.AddSnapshotSubHeader("Predicates as conditions"); - should.BeTypesThat().HaveAnyAttributesWithNamedArguments(("NamedParameter1", helper.Attribute1TypeArgumentSystemType)).AssertNoViolations(helper); - should.BeTypesThat().HaveAnyAttributesWithNamedArguments([("NamedParameter3", helper.Attribute2TypeArgumentSystemType)]).AssertAnyViolations(helper); - - await helper.AssertSnapshotMatches(); - } - - [Fact] - public async Task HaveAttributeWithArgumentsTest() - { - var helper = new AttributeAssemblyTestHelpers(); - - helper.AddSnapshotHeader("No violations with type arguments"); - var should = Types().That().Are(helper.ClassWithSingleAttributeWithArguments).Should(); - - helper.AddSnapshotSubHeader("Conditions"); - should.HaveAttributeWithArguments(helper.Attribute1, helper.Attribute1TypeArgumentSystemType).AssertNoViolations(helper); - should.HaveAttributeWithArguments(helper.Attribute1, [helper.Attribute1TypeArgumentSystemType]).AssertNoViolations(helper); - should.HaveAttributeWithArguments(helper.Attribute1SystemType, helper.Attribute1TypeArgumentSystemType).AssertNoViolations(helper); - should.HaveAttributeWithArguments(helper.Attribute1SystemType, [helper.Attribute1TypeArgumentSystemType]).AssertNoViolations(helper); - - helper.AddSnapshotSubHeader("Predicates"); - should.Be(Types().That().HaveAttributeWithArguments(helper.Attribute1, helper.Attribute1TypeArgumentSystemType)).AssertNoViolations(helper); - should.Be(Types().That().HaveAttributeWithArguments(helper.Attribute1, helper.Attribute1TypeArgumentSystemType)).AssertNoViolations(helper); - should.Be(Types().That().HaveAttributeWithArguments(helper.Attribute1SystemType, helper.Attribute1TypeArgumentSystemType)).AssertNoViolations(helper); - should.Be(Types().That().HaveAttributeWithArguments(helper.Attribute1SystemType, [helper.Attribute1TypeArgumentSystemType])).AssertNoViolations(helper); - - helper.AddSnapshotSubHeader("Predicates as conditions"); - should.BeTypesThat().HaveAttributeWithArguments(helper.Attribute1, helper.Attribute1TypeArgumentSystemType).AssertNoViolations(helper); - should.BeTypesThat().HaveAttributeWithArguments(helper.Attribute1, [helper.Attribute1TypeArgumentSystemType]).AssertNoViolations(helper); - should.BeTypesThat().HaveAttributeWithArguments(helper.Attribute1SystemType, helper.Attribute1TypeArgumentSystemType).AssertNoViolations(helper); - should.BeTypesThat().HaveAttributeWithArguments(helper.Attribute1SystemType, [helper.Attribute1TypeArgumentSystemType]).AssertNoViolations(helper); - - helper.AddSnapshotHeader("No violations with value arguments"); - should = Types().That().Are(helper.ClassWithSingleAttributeWithArguments).Should(); - - helper.AddSnapshotSubHeader("Conditions"); - should.HaveAttributeWithArguments(helper.Attribute1, helper.Attribute1StringArgument).AssertNoViolations(helper); - should.HaveAttributeWithArguments(helper.Attribute1, [helper.Attribute1StringArgument]).AssertNoViolations(helper); - should.HaveAttributeWithArguments(helper.Attribute1SystemType, helper.Attribute1StringArgument).AssertNoViolations(helper); - should.HaveAttributeWithArguments(helper.Attribute1SystemType, [helper.Attribute1StringArgument]).AssertNoViolations(helper); - - helper.AddSnapshotSubHeader("Predicates"); - should.Be(Types().That().HaveAttributeWithArguments(helper.Attribute1, helper.Attribute1StringArgument)).AssertNoViolations(helper); - should.Be(Types().That().HaveAttributeWithArguments(helper.Attribute1, [helper.Attribute1StringArgument])).AssertNoViolations(helper); - should.Be(Types().That().HaveAttributeWithArguments(helper.Attribute1SystemType, helper.Attribute1StringArgument)).AssertNoViolations(helper); - should.Be(Types().That().HaveAttributeWithArguments(helper.Attribute1SystemType, [helper.Attribute1StringArgument])).AssertNoViolations(helper); - - helper.AddSnapshotSubHeader("Predicates as conditions"); - should.BeTypesThat().HaveAttributeWithArguments(helper.Attribute1, helper.Attribute1StringArgument).AssertNoViolations(helper); - should.BeTypesThat().HaveAttributeWithArguments(helper.Attribute1, [helper.Attribute1StringArgument]).AssertNoViolations(helper); - should.BeTypesThat().HaveAttributeWithArguments(helper.Attribute1SystemType, helper.Attribute1StringArgument).AssertNoViolations(helper); - should.BeTypesThat().HaveAttributeWithArguments(helper.Attribute1SystemType, [helper.Attribute1StringArgument]).AssertNoViolations(helper); - - helper.AddSnapshotHeader("Violations for wrong attribute"); - should = Types().That().Are(helper.ClassWithSingleAttributeWithArguments).Should(); - - helper.AddSnapshotSubHeader("Conditions"); - should.HaveAttributeWithArguments(helper.UnusedAttribute, helper.Attribute1TypeArgumentSystemType).AssertOnlyViolations(helper); - should.HaveAttributeWithArguments(helper.UnusedAttribute, [helper.Attribute1TypeArgumentSystemType]).AssertOnlyViolations(helper); - should.HaveAttributeWithArguments(helper.UnusedAttributeSystemType, helper.Attribute1TypeArgumentSystemType).AssertOnlyViolations(helper); - should.HaveAttributeWithArguments(helper.UnusedAttributeSystemType, [helper.Attribute1TypeArgumentSystemType]).AssertOnlyViolations(helper); - - helper.AddSnapshotSubHeader("Predicates"); - should.Be(Types().That().HaveAttributeWithArguments(helper.UnusedAttribute, helper.Attribute1TypeArgumentSystemType)).AssertOnlyViolations(helper); - should.Be(Types().That().HaveAttributeWithArguments(helper.UnusedAttribute, [helper.Attribute1TypeArgumentSystemType])).AssertOnlyViolations(helper); - should.Be(Types().That().HaveAttributeWithArguments(helper.UnusedAttributeSystemType, helper.Attribute1TypeArgumentSystemType)).AssertOnlyViolations(helper); - should.Be(Types().That().HaveAttributeWithArguments(helper.UnusedAttributeSystemType, [helper.Attribute1TypeArgumentSystemType])).AssertOnlyViolations(helper); - - helper.AddSnapshotSubHeader("Predicates as conditions"); - should.BeTypesThat().HaveAttributeWithArguments(helper.UnusedAttribute, helper.Attribute1TypeArgumentSystemType).AssertOnlyViolations(helper); - should.BeTypesThat().HaveAttributeWithArguments(helper.UnusedAttribute, [helper.Attribute1TypeArgumentSystemType]).AssertOnlyViolations(helper); - should.BeTypesThat().HaveAttributeWithArguments(helper.UnusedAttributeSystemType, helper.Attribute1TypeArgumentSystemType).AssertOnlyViolations(helper); - should.BeTypesThat().HaveAttributeWithArguments(helper.UnusedAttributeSystemType, [helper.Attribute1TypeArgumentSystemType]).AssertOnlyViolations(helper); - - helper.AddSnapshotHeader("Violations with type arguments"); - should = Types().That().Are(helper.ClassWithSingleAttributeWithArguments).Should(); - - helper.AddSnapshotSubHeader("Conditions"); - should.HaveAttributeWithArguments(helper.Attribute1, helper.UnusedTypeArgumentSystemType).AssertOnlyViolations(helper); - should.HaveAttributeWithArguments(helper.Attribute1, [helper.UnusedTypeArgumentSystemType]).AssertOnlyViolations(helper); - should.HaveAttributeWithArguments(helper.Attribute1SystemType, helper.UnusedTypeArgumentSystemType).AssertOnlyViolations(helper); - should.HaveAttributeWithArguments(helper.Attribute1SystemType, [helper.UnusedTypeArgumentSystemType]).AssertOnlyViolations(helper); - - helper.AddSnapshotSubHeader("Predicates"); - should.Be(Types().That().HaveAttributeWithArguments(helper.Attribute1, helper.UnusedTypeArgumentSystemType)).AssertOnlyViolations(helper); - should.Be(Types().That().HaveAttributeWithArguments(helper.Attribute1, [helper.UnusedTypeArgumentSystemType])).AssertOnlyViolations(helper); - should.Be(Types().That().HaveAttributeWithArguments(helper.Attribute1SystemType, helper.UnusedTypeArgumentSystemType)).AssertOnlyViolations(helper); - should.Be(Types().That().HaveAttributeWithArguments(helper.Attribute1SystemType, [helper.UnusedTypeArgumentSystemType])).AssertOnlyViolations(helper); - - helper.AddSnapshotSubHeader("Predicates as conditions"); - should.BeTypesThat().HaveAttributeWithArguments(helper.Attribute1, helper.UnusedTypeArgumentSystemType).AssertOnlyViolations(helper); - should.BeTypesThat().HaveAttributeWithArguments(helper.Attribute1, [helper.UnusedTypeArgumentSystemType]).AssertOnlyViolations(helper); - should.BeTypesThat().HaveAttributeWithArguments(helper.Attribute1SystemType, helper.UnusedTypeArgumentSystemType).AssertOnlyViolations(helper); - should.BeTypesThat().HaveAttributeWithArguments(helper.Attribute1SystemType, [helper.UnusedTypeArgumentSystemType]).AssertOnlyViolations(helper); - - helper.AddSnapshotHeader("Violations with value arguments"); - should = Types().That().Are(helper.ClassWithSingleAttributeWithArguments).Should(); - - helper.AddSnapshotSubHeader("Conditions"); - should.HaveAttributeWithArguments(helper.Attribute1, helper.Attribute2StringArgument).AssertOnlyViolations(helper); - should.HaveAttributeWithArguments(helper.Attribute1, [helper.Attribute2StringArgument]).AssertOnlyViolations(helper); - should.HaveAttributeWithArguments(helper.Attribute1SystemType, helper.Attribute2StringArgument).AssertOnlyViolations(helper); - should.HaveAttributeWithArguments(helper.Attribute1SystemType, [helper.Attribute2StringArgument]).AssertOnlyViolations(helper); - - helper.AddSnapshotSubHeader("Predicates"); - should.Be(Types().That().HaveAttributeWithArguments(helper.Attribute1, helper.Attribute2StringArgument)).AssertOnlyViolations(helper); - should.Be(Types().That().HaveAttributeWithArguments(helper.Attribute1, [helper.Attribute2StringArgument])).AssertOnlyViolations(helper); - should.Be(Types().That().HaveAttributeWithArguments(helper.Attribute1SystemType, helper.Attribute2StringArgument)).AssertOnlyViolations(helper); - should.Be(Types().That().HaveAttributeWithArguments(helper.Attribute1SystemType, [helper.Attribute2StringArgument])).AssertOnlyViolations(helper); - - helper.AddSnapshotSubHeader("Predicates as conditions"); - should.BeTypesThat().HaveAttributeWithArguments(helper.Attribute1, helper.Attribute2StringArgument).AssertOnlyViolations(helper); - should.BeTypesThat().HaveAttributeWithArguments(helper.Attribute1, [helper.Attribute2StringArgument]).AssertOnlyViolations(helper); - should.BeTypesThat().HaveAttributeWithArguments(helper.Attribute1SystemType, helper.Attribute2StringArgument).AssertOnlyViolations(helper); - should.BeTypesThat().HaveAttributeWithArguments(helper.Attribute1SystemType, [helper.Attribute2StringArgument]).AssertOnlyViolations(helper); - - helper.AddSnapshotHeader("Type outside of architecture"); - should = Types().That().Are(helper.ClassWithSingleAttributeWithArguments).Should(); - - helper.AddSnapshotSubHeader("Conditions"); - should.HaveAttributeWithArguments(typeof(TypeDependencyNamespace.BaseClass), helper.Attribute1StringArgument).AssertOnlyViolations(helper); - - helper.AddSnapshotSubHeader("Predicates"); - should.Be(Types().That().HaveAttributeWithArguments(typeof(TypeDependencyNamespace.BaseClass), helper.Attribute1StringArgument)).AssertOnlyViolations(helper); - - helper.AddSnapshotSubHeader("Predicates as conditions"); - should.BeTypesThat().HaveAttributeWithArguments(typeof(TypeDependencyNamespace.BaseClass), helper.Attribute1StringArgument).AssertOnlyViolations(helper); - - helper.AddSnapshotHeader("Null argument"); - should = Types().That().Are(helper.ClassWithSingleAttributeWithArguments).Should(); - - helper.AddSnapshotSubHeader("Conditions"); - should.HaveAttributeWithArguments(helper.Attribute1, null).AssertOnlyViolations(helper); - should.HaveAttributeWithArguments(helper.Attribute1SystemType, null).AssertOnlyViolations(helper); - - helper.AddSnapshotSubHeader("Predicates"); - should.Be(Types().That().HaveAttributeWithArguments(helper.Attribute1, null)).AssertOnlyViolations(helper); - should.Be(Types().That().HaveAttributeWithArguments(helper.Attribute1SystemType, null)).AssertOnlyViolations(helper); - - helper.AddSnapshotSubHeader("Predicates as conditions"); - should.BeTypesThat().HaveAttributeWithArguments(helper.Attribute1, null).AssertOnlyViolations(helper); - should.BeTypesThat().HaveAttributeWithArguments(helper.Attribute1SystemType, null).AssertOnlyViolations(helper); - - helper.AddSnapshotHeader("Empty arguments"); - should = Types().That().Are(helper.ClassWithSingleAttributeWithArguments).Should(); - - helper.AddSnapshotSubHeader("Conditions"); - should.HaveAttributeWithArguments(helper.Attribute1, new List()).AssertNoViolations(helper); - should.HaveAttributeWithArguments(helper.Attribute1SystemType, new List()).AssertNoViolations(helper); - - helper.AddSnapshotSubHeader("Predicates"); - should.Be(Types().That().HaveAttributeWithArguments(helper.Attribute1, new List())).AssertNoViolations(helper); - should.Be(Types().That().HaveAttributeWithArguments(helper.Attribute1SystemType, new List())).AssertNoViolations(helper); - - helper.AddSnapshotSubHeader("Predicates as conditions"); - should.BeTypesThat().HaveAttributeWithArguments(helper.Attribute1, new List()).AssertNoViolations(helper); - should.BeTypesThat().HaveAttributeWithArguments(helper.Attribute1SystemType, new List()).AssertNoViolations(helper); - - helper.AddSnapshotHeader("Multiple arguments"); - should = Types().That().Are(helper.ClassWithSingleAttributeWithArguments).Should(); - - helper.AddSnapshotSubHeader("Conditions"); - should.HaveAttributeWithArguments(helper.Attribute1, helper.Attribute1StringArgument, helper.Attribute1IntegerArgument).AssertNoViolations(helper); - should.HaveAttributeWithArguments(helper.Attribute1, [helper.Attribute1StringArgument, helper.Attribute1IntegerArgument]).AssertNoViolations(helper); - should.HaveAttributeWithArguments(helper.Attribute1SystemType, helper.Attribute1StringArgument, helper.Attribute1IntegerArgument).AssertNoViolations(helper); - should.HaveAttributeWithArguments(helper.Attribute1SystemType, [helper.Attribute1StringArgument, helper.Attribute1IntegerArgument]).AssertNoViolations(helper); - - helper.AddSnapshotSubHeader("Predicates"); - should.Be(Types().That().HaveAttributeWithArguments(helper.Attribute1, helper.Attribute1StringArgument, helper.Attribute1IntegerArgument)).AssertNoViolations(helper); - should.Be(Types().That().HaveAttributeWithArguments(helper.Attribute1, [helper.Attribute1StringArgument, helper.Attribute1IntegerArgument])).AssertNoViolations(helper); - should.Be(Types().That().HaveAttributeWithArguments(helper.Attribute1SystemType, helper.Attribute1StringArgument, helper.Attribute1IntegerArgument)).AssertNoViolations(helper); - should.Be(Types().That().HaveAttributeWithArguments(helper.Attribute1SystemType, [helper.Attribute1StringArgument, helper.Attribute1IntegerArgument])).AssertNoViolations(helper); - - helper.AddSnapshotSubHeader("Predicates as conditions"); - should.BeTypesThat().HaveAttributeWithArguments(helper.Attribute1, helper.Attribute1StringArgument, helper.Attribute1IntegerArgument).AssertNoViolations(helper); - should.BeTypesThat().HaveAttributeWithArguments(helper.Attribute1, [helper.Attribute1StringArgument, helper.Attribute1IntegerArgument]).AssertNoViolations(helper); - should.BeTypesThat().HaveAttributeWithArguments(helper.Attribute1SystemType, helper.Attribute1StringArgument, helper.Attribute1IntegerArgument).AssertNoViolations(helper); - should.BeTypesThat().HaveAttributeWithArguments(helper.Attribute1SystemType, [helper.Attribute1StringArgument, helper.Attribute1IntegerArgument]).AssertNoViolations(helper); - - helper.AddSnapshotHeader("Multiple inputs"); - should = Types().That().Are(helper.ClassWithSingleAttributeWithArguments, helper.ClassWithTwoAttributesWithArguments).Should(); - - helper.AddSnapshotSubHeader("Conditions"); - should.HaveAttributeWithArguments(helper.Attribute1, helper.Attribute1StringArgument).AssertNoViolations(helper); - should.HaveAttributeWithArguments(helper.Attribute2, helper.Attribute2IntegerArgument).AssertAnyViolations(helper); - - helper.AddSnapshotSubHeader("Predicates"); - should.Be(Types().That().HaveAttributeWithArguments(helper.Attribute1, helper.Attribute1StringArgument)).AssertNoViolations(helper); - should.Be(Types().That().HaveAttributeWithArguments(helper.Attribute2, helper.Attribute2IntegerArgument)).AssertAnyViolations(helper); - - helper.AddSnapshotSubHeader("Predicates as conditions"); - should.BeTypesThat().HaveAttributeWithArguments(helper.Attribute1, helper.Attribute1StringArgument).AssertNoViolations(helper); - should.BeTypesThat().HaveAttributeWithArguments(helper.Attribute2, helper.Attribute2IntegerArgument).AssertAnyViolations(helper); - - await helper.AssertSnapshotMatches(); - } - - [Fact] - public async Task HaveAttributeWithNamedArguments() - { - var helper = new AttributeAssemblyTestHelpers(); - - helper.AddSnapshotHeader("No violations with type arguments"); - var should = Types().That().Are(helper.ClassWithSingleAttributeWithNamedArguments).Should(); - - helper.AddSnapshotSubHeader("Conditions"); - should.HaveAttributeWithNamedArguments(helper.Attribute1, ("NamedParameter1", helper.Attribute1TypeArgumentSystemType)).AssertNoViolations(helper); - should.HaveAttributeWithNamedArguments(helper.Attribute1, [("NamedParameter1", helper.Attribute1TypeArgumentSystemType)]).AssertNoViolations(helper); - should.HaveAttributeWithNamedArguments(helper.Attribute1SystemType, ("NamedParameter1", helper.Attribute1TypeArgumentSystemType)).AssertNoViolations(helper); - should.HaveAttributeWithNamedArguments(helper.Attribute1SystemType, [("NamedParameter1", helper.Attribute1TypeArgumentSystemType)]).AssertNoViolations(helper); - - helper.AddSnapshotSubHeader("Predicates"); - should.Be(Types().That().HaveAttributeWithNamedArguments(helper.Attribute1, ("NamedParameter1", helper.Attribute1TypeArgumentSystemType))).AssertNoViolations(helper); - should.Be(Types().That().HaveAttributeWithNamedArguments(helper.Attribute1, [("NamedParameter1", helper.Attribute1TypeArgumentSystemType)])).AssertNoViolations(helper); - should.Be(Types().That().HaveAttributeWithNamedArguments(helper.Attribute1SystemType, ("NamedParameter1", helper.Attribute1TypeArgumentSystemType))).AssertNoViolations(helper); - should.Be(Types().That().HaveAttributeWithNamedArguments(helper.Attribute1SystemType, [("NamedParameter1", helper.Attribute1TypeArgumentSystemType)])).AssertNoViolations(helper); - - helper.AddSnapshotSubHeader("Predicates as conditions"); - should.BeTypesThat().HaveAttributeWithNamedArguments(helper.Attribute1, ("NamedParameter1", helper.Attribute1TypeArgumentSystemType)).AssertNoViolations(helper); - should.BeTypesThat().HaveAttributeWithNamedArguments(helper.Attribute1, [("NamedParameter1", helper.Attribute1TypeArgumentSystemType)]).AssertNoViolations(helper); - should.BeTypesThat().HaveAttributeWithNamedArguments(helper.Attribute1SystemType, ("NamedParameter1", helper.Attribute1TypeArgumentSystemType)).AssertNoViolations(helper); - should.BeTypesThat().HaveAttributeWithNamedArguments(helper.Attribute1SystemType, [("NamedParameter1", helper.Attribute1TypeArgumentSystemType)]).AssertNoViolations(helper); - - helper.AddSnapshotHeader("No violations with value arguments"); - should = Types().That().Are(helper.ClassWithSingleAttributeWithNamedArguments).Should(); - - helper.AddSnapshotSubHeader("Conditions"); - should.HaveAttributeWithNamedArguments(helper.Attribute1, ("NamedParameter2", helper.Attribute1StringArgument)).AssertNoViolations(helper); - should.HaveAttributeWithNamedArguments(helper.Attribute1, [("NamedParameter2", helper.Attribute1StringArgument)]).AssertNoViolations(helper); - should.HaveAttributeWithNamedArguments(helper.Attribute1SystemType, ("NamedParameter2", helper.Attribute1StringArgument)).AssertNoViolations(helper); - should.HaveAttributeWithNamedArguments(helper.Attribute1SystemType, [("NamedParameter2", helper.Attribute1StringArgument)]).AssertNoViolations(helper); - - helper.AddSnapshotSubHeader("Predicates"); - should.Be(Types().That().HaveAttributeWithNamedArguments(helper.Attribute1, ("NamedParameter2", helper.Attribute1StringArgument))).AssertNoViolations(helper); - should.Be(Types().That().HaveAttributeWithNamedArguments(helper.Attribute1, [("NamedParameter2", helper.Attribute1StringArgument)])).AssertNoViolations(helper); - should.Be(Types().That().HaveAttributeWithNamedArguments(helper.Attribute1SystemType, ("NamedParameter2", helper.Attribute1StringArgument))).AssertNoViolations(helper); - should.Be(Types().That().HaveAttributeWithNamedArguments(helper.Attribute1SystemType, [("NamedParameter2", helper.Attribute1StringArgument)])).AssertNoViolations(helper); - - helper.AddSnapshotSubHeader("Predicates as conditions"); - should.BeTypesThat().HaveAttributeWithNamedArguments(helper.Attribute1, ("NamedParameter2", helper.Attribute1StringArgument)).AssertNoViolations(helper); - should.BeTypesThat().HaveAttributeWithNamedArguments(helper.Attribute1, [("NamedParameter2", helper.Attribute1StringArgument)]).AssertNoViolations(helper); - should.BeTypesThat().HaveAttributeWithNamedArguments(helper.Attribute1SystemType, ("NamedParameter2", helper.Attribute1StringArgument)).AssertNoViolations(helper); - should.BeTypesThat().HaveAttributeWithNamedArguments(helper.Attribute1SystemType, [("NamedParameter2", helper.Attribute1StringArgument)]).AssertNoViolations(helper); - - helper.AddSnapshotHeader("Violations for attribute without named arguments"); - should = Types().That().Are(helper.ClassWithSingleAttribute).Should(); - - helper.AddSnapshotSubHeader("Conditions"); - should.HaveAttributeWithNamedArguments(helper.Attribute1, ("NamedParameter1", helper.Attribute1TypeArgumentSystemType)).AssertOnlyViolations(helper); - should.HaveAttributeWithNamedArguments(helper.Attribute1, [("NamedParameter1", helper.Attribute1TypeArgumentSystemType)]).AssertOnlyViolations(helper); - should.HaveAttributeWithNamedArguments(helper.Attribute1SystemType, ("NamedParameter1", helper.Attribute1TypeArgumentSystemType)).AssertOnlyViolations(helper); - should.HaveAttributeWithNamedArguments(helper.Attribute1SystemType, [("NamedParameter1", helper.Attribute1TypeArgumentSystemType)]).AssertOnlyViolations(helper); - - helper.AddSnapshotSubHeader("Predicates"); - should.Be(Types().That().HaveAttributeWithNamedArguments(helper.Attribute1, ("NamedParameter1", helper.Attribute1TypeArgumentSystemType))).AssertOnlyViolations(helper); - should.Be(Types().That().HaveAttributeWithNamedArguments(helper.Attribute1, [("NamedParameter1", helper.Attribute1TypeArgumentSystemType)])).AssertOnlyViolations(helper); - should.Be(Types().That().HaveAttributeWithNamedArguments(helper.Attribute1SystemType, ("NamedParameter1", helper.Attribute1TypeArgumentSystemType))).AssertOnlyViolations(helper); - should.Be(Types().That().HaveAttributeWithNamedArguments(helper.Attribute1SystemType, [("NamedParameter1", helper.Attribute1TypeArgumentSystemType)])).AssertOnlyViolations(helper); - - helper.AddSnapshotSubHeader("Predicates as conditions"); - should.BeTypesThat().HaveAttributeWithNamedArguments(helper.Attribute1, ("NamedParameter1", helper.Attribute1TypeArgumentSystemType)).AssertOnlyViolations(helper); - should.BeTypesThat().HaveAttributeWithNamedArguments(helper.Attribute1, [("NamedParameter1", helper.Attribute1TypeArgumentSystemType)]).AssertOnlyViolations(helper); - should.BeTypesThat().HaveAttributeWithNamedArguments(helper.Attribute1SystemType, ("NamedParameter1", helper.Attribute1TypeArgumentSystemType)).AssertOnlyViolations(helper); - should.BeTypesThat().HaveAttributeWithNamedArguments(helper.Attribute1SystemType, [("NamedParameter1", helper.Attribute1TypeArgumentSystemType)]).AssertOnlyViolations(helper); - - helper.AddSnapshotHeader("Violations with type arguments"); - should = Types().That().Are(helper.ClassWithSingleAttributeWithNamedArguments).Should(); - - helper.AddSnapshotSubHeader("Conditions"); - should.HaveAttributeWithNamedArguments(helper.Attribute1, ("InvalidName", helper.Attribute1TypeArgumentSystemType)).AssertOnlyViolations(helper); - should.HaveAttributeWithNamedArguments(helper.Attribute1, [("InvalidName", helper.Attribute1TypeArgumentSystemType)]).AssertOnlyViolations(helper); - should.HaveAttributeWithNamedArguments(helper.Attribute1, ("NamedParameter1", helper.UnusedTypeArgumentSystemType)).AssertOnlyViolations(helper); - should.HaveAttributeWithNamedArguments(helper.Attribute1, [("NamedParameter1", helper.UnusedTypeArgumentSystemType)]).AssertOnlyViolations(helper); - should.HaveAttributeWithNamedArguments(helper.Attribute1SystemType, ("NamedParameter1", helper.UnusedTypeArgumentSystemType)).AssertOnlyViolations(helper); - should.HaveAttributeWithNamedArguments(helper.Attribute1SystemType, [("NamedParameter1", helper.UnusedTypeArgumentSystemType)]).AssertOnlyViolations(helper); - - helper.AddSnapshotSubHeader("Predicates"); - should.Be(Types().That().HaveAttributeWithNamedArguments(helper.Attribute1, ("InvalidName", helper.Attribute1TypeArgumentSystemType))).AssertOnlyViolations(helper); - should.Be(Types().That().HaveAttributeWithNamedArguments(helper.Attribute1, [("InvalidName", helper.Attribute1TypeArgumentSystemType)])).AssertOnlyViolations(helper); - should.Be(Types().That().HaveAttributeWithNamedArguments(helper.Attribute1, ("NamedParameter1", helper.UnusedTypeArgumentSystemType))).AssertOnlyViolations(helper); - should.Be(Types().That().HaveAttributeWithNamedArguments(helper.Attribute1, [("NamedParameter1", helper.UnusedTypeArgumentSystemType)])).AssertOnlyViolations(helper); - should.Be(Types().That().HaveAttributeWithNamedArguments(helper.Attribute1SystemType, ("NamedParameter1", helper.UnusedTypeArgumentSystemType))).AssertOnlyViolations(helper); - should.Be(Types().That().HaveAttributeWithNamedArguments(helper.Attribute1SystemType, [("NamedParameter1", helper.UnusedTypeArgumentSystemType)])).AssertOnlyViolations(helper); - - helper.AddSnapshotSubHeader("Predicates as conditions"); - should.BeTypesThat().HaveAttributeWithNamedArguments(helper.Attribute1, ("InvalidName", helper.Attribute1TypeArgumentSystemType)).AssertOnlyViolations(helper); - should.BeTypesThat().HaveAttributeWithNamedArguments(helper.Attribute1, [("InvalidName", helper.Attribute1TypeArgumentSystemType)]).AssertOnlyViolations(helper); - should.BeTypesThat().HaveAttributeWithNamedArguments(helper.Attribute1, ("NamedParameter1", helper.UnusedTypeArgumentSystemType)).AssertOnlyViolations(helper); - should.BeTypesThat().HaveAttributeWithNamedArguments(helper.Attribute1, [("NamedParameter1", helper.UnusedTypeArgumentSystemType)]).AssertOnlyViolations(helper); - should.BeTypesThat().HaveAttributeWithNamedArguments(helper.Attribute1SystemType, ("NamedParameter1", helper.UnusedTypeArgumentSystemType)).AssertOnlyViolations(helper); - should.BeTypesThat().HaveAttributeWithNamedArguments(helper.Attribute1SystemType, [("NamedParameter1", helper.UnusedTypeArgumentSystemType)]).AssertOnlyViolations(helper); - - helper.AddSnapshotHeader("Violations with value arguments"); - should = Types().That().Are(helper.ClassWithSingleAttributeWithNamedArguments).Should(); - - helper.AddSnapshotSubHeader("Conditions"); - should.HaveAttributeWithNamedArguments(helper.Attribute1, ("InvalidName", helper.Attribute1StringArgument)).AssertOnlyViolations(helper); - should.HaveAttributeWithNamedArguments(helper.Attribute1, [("InvalidName", helper.Attribute1StringArgument)]).AssertOnlyViolations(helper); - should.HaveAttributeWithNamedArguments(helper.Attribute1, ("NamedParameter2", helper.UnusedAttributeStringValue)).AssertOnlyViolations(helper); - should.HaveAttributeWithNamedArguments(helper.Attribute1, [("NamedParameter2", helper.UnusedAttributeStringValue)]).AssertOnlyViolations(helper); - - helper.AddSnapshotSubHeader("Predicates"); - should.Be(Types().That().HaveAttributeWithNamedArguments(helper.Attribute1, ("InvalidName", helper.Attribute1StringArgument))).AssertOnlyViolations(helper); - should.Be(Types().That().HaveAttributeWithNamedArguments(helper.Attribute1, [("InvalidName", helper.Attribute1StringArgument)])).AssertOnlyViolations(helper); - should.Be(Types().That().HaveAttributeWithNamedArguments(helper.Attribute1, ("NamedParameter2", helper.UnusedAttributeStringValue))).AssertOnlyViolations(helper); - should.Be(Types().That().HaveAttributeWithNamedArguments(helper.Attribute1, [("NamedParameter2", helper.UnusedAttributeStringValue)])).AssertOnlyViolations(helper); - - helper.AddSnapshotSubHeader("Predicates as conditions"); - should.BeTypesThat().HaveAttributeWithNamedArguments(helper.Attribute1, ("InvalidName", helper.Attribute1StringArgument)).AssertOnlyViolations(helper); - should.BeTypesThat().HaveAttributeWithNamedArguments(helper.Attribute1, [("InvalidName", helper.Attribute1StringArgument)]).AssertOnlyViolations(helper); - should.BeTypesThat().HaveAttributeWithNamedArguments(helper.Attribute1, ("NamedParameter2", helper.UnusedAttributeStringValue)).AssertOnlyViolations(helper); - should.BeTypesThat().HaveAttributeWithNamedArguments(helper.Attribute1, [("NamedParameter2", helper.UnusedAttributeStringValue)]).AssertOnlyViolations(helper); - - helper.AddSnapshotHeader("Unused attribute"); - should = Types().That().Are(helper.ClassWithSingleAttributeWithNamedArguments).Should(); - - helper.AddSnapshotSubHeader("Conditions"); - should.HaveAttributeWithNamedArguments(helper.UnusedAttribute, ("NamedParameter1", helper.Attribute1TypeArgument)).AssertOnlyViolations(helper); - should.HaveAttributeWithNamedArguments(helper.UnusedAttribute, [("NamedParameter1", helper.Attribute1TypeArgument)]).AssertOnlyViolations(helper); - should.HaveAttributeWithNamedArguments(helper.UnusedAttributeSystemType, ("NamedParameter1", helper.Attribute1TypeArgument)).AssertOnlyViolations(helper); - should.HaveAttributeWithNamedArguments(helper.UnusedAttributeSystemType, [("NamedParameter1", helper.Attribute1TypeArgument)]).AssertOnlyViolations(helper); - - helper.AddSnapshotSubHeader("Predicates"); - should.Be(Types().That().HaveAttributeWithNamedArguments(helper.UnusedAttribute, ("NamedParameter1", helper.Attribute1TypeArgument))).AssertOnlyViolations(helper); - should.Be(Types().That().HaveAttributeWithNamedArguments(helper.UnusedAttribute, [("NamedParameter1", helper.Attribute1TypeArgument)])).AssertOnlyViolations(helper); - should.Be(Types().That().HaveAttributeWithNamedArguments(helper.UnusedAttributeSystemType, ("NamedParameter1", helper.Attribute1TypeArgument))).AssertOnlyViolations(helper); - should.Be(Types().That().HaveAttributeWithNamedArguments(helper.UnusedAttributeSystemType, [("NamedParameter1", helper.Attribute1TypeArgument)])).AssertOnlyViolations(helper); - - helper.AddSnapshotSubHeader("Predicates as conditions"); - should.BeTypesThat().HaveAttributeWithNamedArguments(helper.UnusedAttribute, ("NamedParameter1", helper.Attribute1TypeArgument)).AssertOnlyViolations(helper); - should.BeTypesThat().HaveAttributeWithNamedArguments(helper.UnusedAttribute, [("NamedParameter1", helper.Attribute1TypeArgument)]).AssertOnlyViolations(helper); - should.BeTypesThat().HaveAttributeWithNamedArguments(helper.UnusedAttributeSystemType, ("NamedParameter1", helper.Attribute1TypeArgument)).AssertOnlyViolations(helper); - should.BeTypesThat().HaveAttributeWithNamedArguments(helper.UnusedAttributeSystemType, [("NamedParameter1", helper.Attribute1TypeArgument)]).AssertOnlyViolations(helper); - - helper.AddSnapshotHeader("Type outside of architecture"); - should = Types().That().Are(helper.ClassWithSingleAttributeWithNamedArguments).Should(); - - helper.AddSnapshotSubHeader("Conditions"); - should.HaveAttributeWithNamedArguments(typeof(TypeDependencyNamespace.BaseClass), ("NamedParameter1", helper.Attribute1TypeArgument)).AssertOnlyViolations(helper); - - helper.AddSnapshotSubHeader("Predicates"); - should.Be(Types().That().HaveAttributeWithNamedArguments(typeof(TypeDependencyNamespace.BaseClass), ("NamedParameter1", helper.Attribute1TypeArgument))).AssertOnlyViolations(helper); - - helper.AddSnapshotSubHeader("Predicates as conditions"); - should.BeTypesThat().HaveAttributeWithNamedArguments(typeof(TypeDependencyNamespace.BaseClass), ("NamedParameter1", helper.Attribute1TypeArgument)).AssertOnlyViolations(helper); - - helper.AddSnapshotHeader("Empty arguments"); - should = Types().That().Are(helper.ClassWithSingleAttributeWithNamedArguments).Should(); - - helper.AddSnapshotSubHeader("Conditions"); - should.HaveAttributeWithNamedArguments(helper.Attribute1, []).AssertNoViolations(helper); - should.HaveAttributeWithNamedArguments(helper.Attribute1SystemType, []).AssertNoViolations(helper); - - helper.AddSnapshotSubHeader("Predicates"); - should.Be(Types().That().HaveAttributeWithNamedArguments(helper.Attribute1, [])).AssertNoViolations(helper); - should.Be(Types().That().HaveAttributeWithNamedArguments(helper.Attribute1SystemType, [])).AssertNoViolations(helper); - - helper.AddSnapshotSubHeader("Predicates as conditions"); - should.BeTypesThat().HaveAttributeWithNamedArguments(helper.Attribute1, []).AssertNoViolations(helper); - should.BeTypesThat().HaveAttributeWithNamedArguments(helper.Attribute1SystemType, []).AssertNoViolations(helper); - - helper.AddSnapshotHeader("Multiple arguments"); - should = Types().That().Are(helper.ClassWithSingleAttributeWithNamedArguments).Should(); - - helper.AddSnapshotSubHeader("Conditions"); - should.HaveAttributeWithNamedArguments(helper.Attribute1, ("NamedParameter1", helper.Attribute1TypeArgument), ("NamedParameter2", helper.Attribute1StringArgument)).AssertOnlyViolations(helper); - should.HaveAttributeWithNamedArguments(helper.Attribute1, [("NamedParameter1", helper.Attribute1TypeArgument), ("NamedParameter2", helper.Attribute1StringArgument),]).AssertOnlyViolations(helper); - should.HaveAttributeWithNamedArguments(helper.Attribute1SystemType, ("NamedParameter1", helper.Attribute1TypeArgument), ("NamedParameter2", helper.Attribute1StringArgument)).AssertOnlyViolations(helper); - should.HaveAttributeWithNamedArguments(helper.Attribute1SystemType, [("NamedParameter1", helper.Attribute1TypeArgument), ("NamedParameter2", helper.Attribute1StringArgument),]).AssertOnlyViolations(helper); - - helper.AddSnapshotSubHeader("Predicates"); - should.Be(Types().That().HaveAttributeWithNamedArguments(helper.Attribute1, ("NamedParameter1", helper.Attribute1TypeArgument), ("NamedParameter2", helper.Attribute1StringArgument))).AssertOnlyViolations(helper); - should.Be(Types().That().HaveAttributeWithNamedArguments(helper.Attribute1, [("NamedParameter1", helper.Attribute1TypeArgument), ("NamedParameter2", helper.Attribute1StringArgument),])).AssertOnlyViolations(helper); - should.Be(Types().That().HaveAttributeWithNamedArguments(helper.Attribute1SystemType, ("NamedParameter1", helper.Attribute1TypeArgument), ("NamedParameter2", helper.Attribute1StringArgument))).AssertOnlyViolations(helper); - should.Be(Types().That().HaveAttributeWithNamedArguments(helper.Attribute1SystemType, [("NamedParameter1", helper.Attribute1TypeArgument), ("NamedParameter2", helper.Attribute1StringArgument),])).AssertOnlyViolations(helper); - - helper.AddSnapshotSubHeader("Predicates as conditions"); - should.BeTypesThat().HaveAttributeWithNamedArguments(helper.Attribute1, ("NamedParameter1", helper.Attribute1TypeArgument), ("NamedParameter2", helper.Attribute1StringArgument)).AssertOnlyViolations(helper); - should.BeTypesThat().HaveAttributeWithNamedArguments(helper.Attribute1, [("NamedParameter1", helper.Attribute1TypeArgument), ("NamedParameter2", helper.Attribute1StringArgument),]).AssertOnlyViolations(helper); - should.BeTypesThat().HaveAttributeWithNamedArguments(helper.Attribute1SystemType, ("NamedParameter1", helper.Attribute1TypeArgument), ("NamedParameter2", helper.Attribute1StringArgument)).AssertOnlyViolations(helper); - should.BeTypesThat().HaveAttributeWithNamedArguments(helper.Attribute1SystemType, [("NamedParameter1", helper.Attribute1TypeArgument), ("NamedParameter2", helper.Attribute1StringArgument),]).AssertOnlyViolations(helper); - - helper.AddSnapshotHeader("Multiple inputs"); - should = Types().That().Are(helper.ClassWithSingleAttributeWithNamedArguments, helper.ClassWithTwoAttributesWithNamedArguments).Should(); - - helper.AddSnapshotSubHeader("Conditions"); - should.HaveAttributeWithNamedArguments(helper.Attribute2, ("NamedParameter3", helper.Attribute2TypeArgumentSystemType)).AssertAnyViolations(helper); - should.HaveAttributeWithNamedArguments(helper.Attribute2, [("NamedParameter3", helper.Attribute2TypeArgumentSystemType)]).AssertAnyViolations(helper); - should.HaveAttributeWithNamedArguments(helper.Attribute2SystemType, ("NamedParameter3", helper.Attribute2TypeArgumentSystemType)).AssertAnyViolations(helper); - should.HaveAttributeWithNamedArguments(helper.Attribute2SystemType, [("NamedParameter3", helper.Attribute2TypeArgumentSystemType)]).AssertAnyViolations(helper); - - helper.AddSnapshotSubHeader("Predicates"); - should.Be(Types().That().HaveAttributeWithNamedArguments(helper.Attribute2, ("NamedParameter3", helper.Attribute2TypeArgumentSystemType))).AssertAnyViolations(helper); - should.Be(Types().That().HaveAttributeWithNamedArguments(helper.Attribute2, [("NamedParameter3", helper.Attribute2TypeArgumentSystemType)])).AssertAnyViolations(helper); - should.Be(Types().That().HaveAttributeWithNamedArguments(helper.Attribute2SystemType, ("NamedParameter3", helper.Attribute2TypeArgumentSystemType))).AssertAnyViolations(helper); - should.Be(Types().That().HaveAttributeWithNamedArguments(helper.Attribute2SystemType, [("NamedParameter3", helper.Attribute2TypeArgumentSystemType)])).AssertAnyViolations(helper); - - helper.AddSnapshotSubHeader("Predicates as conditions"); - should.BeTypesThat().HaveAttributeWithNamedArguments(helper.Attribute2, ("NamedParameter3", helper.Attribute2TypeArgumentSystemType)).AssertAnyViolations(helper); - should.BeTypesThat().HaveAttributeWithNamedArguments(helper.Attribute2, [("NamedParameter3", helper.Attribute2TypeArgumentSystemType)]).AssertAnyViolations(helper); - should.BeTypesThat().HaveAttributeWithNamedArguments(helper.Attribute2SystemType, ("NamedParameter3", helper.Attribute2TypeArgumentSystemType)).AssertAnyViolations(helper); - should.BeTypesThat().HaveAttributeWithNamedArguments(helper.Attribute2SystemType, [("NamedParameter3", helper.Attribute2TypeArgumentSystemType)]).AssertAnyViolations(helper); - - await helper.AssertSnapshotMatches(); - } - - [Fact] - public async Task HaveNameTest() - { - var helper = new DependencyAssemblyTestHelper(); - helper.AddSnapshotHeader("No violations"); - var should = Types().That().Are(helper.BaseClass).Should(); - - helper.AddSnapshotSubHeader("Conditions"); - should.HaveName(helper.BaseClass.Name).AssertNoViolations(helper); - should.HaveNameMatching("^Base.*$").AssertNoViolations(helper); - should.HaveFullName(helper.BaseClass.FullName).AssertNoViolations(helper); - should.HaveFullNameMatching("^.*\\.Base.*$").AssertNoViolations(helper); - should.HaveNameContaining("Base").AssertNoViolations(helper); - should.HaveFullNameContaining(helper.BaseClass.Namespace.Name).AssertNoViolations(helper); - should.HaveNameStartingWith("Base").AssertNoViolations(helper); - should.HaveNameEndingWith("Class").AssertNoViolations(helper); - - helper.AddSnapshotSubHeader("Predicates"); - should.Be(Types().That().HaveName(helper.BaseClass.Name)).AssertNoViolations(helper); - should.Be(Types().That().HaveNameMatching("^Base.*$")).AssertNoViolations(helper); - should.Be(Types().That().HaveFullName(helper.BaseClass.FullName)).AssertNoViolations(helper); - should.Be(Types().That().HaveFullNameMatching("^.*\\.Base.*$")).AssertNoViolations(helper); - should.Be(Types().That().HaveNameContaining("Base")).AssertNoViolations(helper); - should.Be(Types().That().HaveFullNameContaining(helper.BaseClass.Namespace.Name)).AssertNoViolations(helper); - should.Be(Types().That().HaveNameStartingWith("Base")).AssertNoViolations(helper); - should.Be(Types().That().HaveNameEndingWith("Class")).AssertNoViolations(helper); - - helper.AddSnapshotSubHeader("Predicates as conditions"); - should.BeTypesThat().HaveName(helper.BaseClass.Name).AssertNoViolations(helper); - should.BeTypesThat().HaveNameMatching("^Base.*$").AssertNoViolations(helper); - should.BeTypesThat().HaveFullName(helper.BaseClass.FullName).AssertNoViolations(helper); - should.BeTypesThat().HaveFullNameMatching("^.*\\.Base.*$").AssertNoViolations(helper); - should.BeTypesThat().HaveNameContaining("Base").AssertNoViolations(helper); - should.BeTypesThat().HaveFullNameContaining(helper.BaseClass.Namespace.Name).AssertNoViolations(helper); - should.BeTypesThat().HaveNameStartingWith("Base").AssertNoViolations(helper); - should.BeTypesThat().HaveNameEndingWith("Class").AssertNoViolations(helper); - - helper.AddSnapshotHeader("Violations"); - should = Types().That().Are(helper.BaseClass).Should(); - - helper.AddSnapshotSubHeader("Conditions"); - should.HaveName(helper.BaseClass.FullName).AssertOnlyViolations(helper); - should.HaveName("^.*\\.Base.*$").AssertOnlyViolations(helper); - should.HaveFullName(helper.BaseClass.Name).AssertOnlyViolations(helper); - should.HaveFullName("^Base.*$").AssertOnlyViolations(helper); - should.HaveNameContaining(helper.BaseClass.Namespace.Name).AssertOnlyViolations(helper); - should.HaveFullNameContaining(helper.NonExistentObjectName).AssertOnlyViolations(helper); - should.HaveNameStartingWith(helper.BaseClass.Namespace.Name).AssertOnlyViolations(helper); - should.HaveNameEndingWith("Base").AssertOnlyViolations(helper); - - helper.AddSnapshotSubHeader("Predicates"); - should.Be(Types().That().HaveName(helper.BaseClass.Name)).AssertNoViolations(helper); - should.Be(Types().That().HaveNameMatching("^Base.*$")).AssertNoViolations(helper); - should.Be(Types().That().HaveFullName(helper.BaseClass.FullName)).AssertNoViolations(helper); - should.Be(Types().That().HaveFullNameMatching("^.*\\.Base.*$")).AssertNoViolations(helper); - should.Be(Types().That().HaveNameContaining("Base")).AssertNoViolations(helper); - should.Be(Types().That().HaveFullNameContaining(helper.BaseClass.Namespace.Name)).AssertNoViolations(helper); - should.Be(Types().That().HaveNameStartingWith("Base")).AssertNoViolations(helper); - should.Be(Types().That().HaveNameEndingWith("Class")).AssertNoViolations(helper); - - helper.AddSnapshotSubHeader("Predicates as conditions"); - should.BeTypesThat().HaveName(helper.BaseClass.Name).AssertNoViolations(helper); - should.BeTypesThat().HaveNameMatching("^Base.*$").AssertNoViolations(helper); - should.BeTypesThat().HaveFullName(helper.BaseClass.FullName).AssertNoViolations(helper); - should.BeTypesThat().HaveFullNameMatching("^.*\\.Base.*$").AssertNoViolations(helper); - should.BeTypesThat().HaveNameContaining("Base").AssertNoViolations(helper); - should.BeTypesThat().HaveFullNameContaining(helper.BaseClass.Namespace.Name).AssertNoViolations(helper); - should.BeTypesThat().HaveNameStartingWith("Base").AssertNoViolations(helper); - should.BeTypesThat().HaveNameEndingWith("Class").AssertNoViolations(helper); - - await helper.AssertSnapshotMatches(); - } - - [Fact] - public async Task NotBeTest() - { - var helper = new DependencyAssemblyTestHelper(); - - helper.AddSnapshotHeader("No violations"); - var should = Types().That().DependOnAny(helper.BaseClass).Should(); - - helper.AddSnapshotSubHeader("Conditions"); - should.NotBe(helper.ClassWithoutDependencies).AssertNoViolations(helper); - should.NotBe(helper.ClassWithoutDependenciesSystemType).AssertNoViolations(helper); - should.NotBe(Classes().That().Are(helper.ClassWithoutDependencies)).AssertNoViolations(helper); - should.NotBe([helper.ClassWithoutDependencies]).AssertNoViolations(helper); - should.NotBe([helper.ClassWithoutDependenciesSystemType]).AssertNoViolations(helper); - - helper.AddSnapshotSubHeader("Predicates"); - should.Be(Types().That().AreNot(helper.ClassWithoutDependencies)).AssertNoViolations(helper); - should.Be(Types().That().AreNot(helper.ClassWithoutDependenciesSystemType)).AssertNoViolations(helper); - should.Be(Types().That().AreNot(helper.ClassWithoutDependencies)).AssertNoViolations(helper); - should.Be(Types().That().AreNot([helper.ClassWithoutDependencies])).AssertNoViolations(helper); - should.Be(Types().That().AreNot([helper.ClassWithoutDependenciesSystemType])).AssertNoViolations(helper); - - helper.AddSnapshotSubHeader("Predicates as conditions"); - should.BeTypesThat().AreNot(helper.ClassWithoutDependencies).AssertNoViolations(helper); - should.BeTypesThat().AreNot(helper.ClassWithoutDependenciesSystemType).AssertNoViolations(helper); - should.BeTypesThat().AreNot(Classes().That().Are(helper.ClassWithoutDependencies)).AssertNoViolations(helper); - should.BeTypesThat().AreNot([helper.ClassWithoutDependencies]).AssertNoViolations(helper); - should.BeTypesThat().AreNot([helper.ClassWithoutDependenciesSystemType]).AssertNoViolations(helper); - - helper.AddSnapshotHeader("Violations"); - should = Types().That().DependOnAny(helper.BaseClass).Should(); - - helper.AddSnapshotSubHeader("Conditions"); - should.NotBe(helper.ChildClass).AssertAnyViolations(helper); - should.NotBe(helper.ChildClassSystemType).AssertAnyViolations(helper); - should.NotBe(Classes().That().Are(helper.ChildClass)).AssertAnyViolations(helper); - should.NotBe([helper.ChildClass]).AssertAnyViolations(helper); - should.NotBe([helper.ChildClassSystemType]).AssertAnyViolations(helper); - - helper.AddSnapshotSubHeader("Predicates"); - should.Be(Types().That().AreNot(helper.ChildClass)).AssertAnyViolations(helper); - should.Be(Types().That().AreNot(helper.ChildClassSystemType)).AssertAnyViolations(helper); - should.Be(Types().That().AreNot(Classes().That().Are(helper.ChildClass))).AssertAnyViolations(helper); - should.Be(Types().That().AreNot([helper.ChildClass])).AssertAnyViolations(helper); - should.Be(Types().That().AreNot([helper.ChildClassSystemType])).AssertAnyViolations(helper); - - helper.AddSnapshotSubHeader("Predicates as conditions"); - should.BeTypesThat().AreNot(helper.ChildClass).AssertAnyViolations(helper); - should.BeTypesThat().AreNot(helper.ChildClassSystemType).AssertAnyViolations(helper); - should.BeTypesThat().AreNot(Classes().That().Are(helper.ChildClass)).AssertAnyViolations(helper); - should.BeTypesThat().AreNot([helper.ChildClass]).AssertAnyViolations(helper); - should.BeTypesThat().AreNot([helper.ChildClassSystemType]).AssertAnyViolations(helper); - - helper.AddSnapshotHeader("Empty arguments"); - should = Types().That().DependOnAny(helper.BaseClass).Should(); - - helper.AddSnapshotSubHeader("Conditions"); - should.NotBe(new List()).AssertNoViolations(helper); - should.NotBe(new List()).AssertNoViolations(helper); - should.NotBe(Classes().That().HaveFullName(helper.NonExistentObjectName)).AssertNoViolations(helper); - - helper.AddSnapshotSubHeader("Predicates"); - should.Be(Types().That().AreNot(new List())).AssertNoViolations(helper); - should.Be(Types().That().AreNot(new List())).AssertNoViolations(helper); - should.Be(Types().That().AreNot(Classes().That().HaveFullName(helper.NonExistentObjectName))).AssertNoViolations(helper); - - helper.AddSnapshotSubHeader("Predicates as conditions"); - should.BeTypesThat().AreNot(new List()).AssertNoViolations(helper); - should.BeTypesThat().AreNot(new List()).AssertNoViolations(helper); - should.BeTypesThat().AreNot(Classes().That().HaveFullName(helper.NonExistentObjectName)).AssertNoViolations(helper); - - helper.AddSnapshotHeader("Multiple arguments"); - should = Types().That().DependOnAny(helper.BaseClass).Should(); - - helper.AddSnapshotSubHeader("Conditions"); - should.NotBe(helper.ClassWithoutDependencies, helper.BaseClass).AssertNoViolations(helper); - should.NotBe([helper.ClassWithoutDependencies, helper.BaseClass]).AssertNoViolations(helper); - should.NotBe(helper.ClassWithoutDependenciesSystemType, helper.BaseClassSystemType).AssertNoViolations(helper); - should.NotBe([helper.ClassWithoutDependenciesSystemType, helper.BaseClassSystemType]).AssertNoViolations(helper); - - helper.AddSnapshotSubHeader("Predicates"); - should.Be(Types().That().AreNot(helper.ClassWithoutDependencies, helper.BaseClass)).AssertNoViolations(helper); - should.Be(Types().That().AreNot([helper.ClassWithoutDependencies, helper.BaseClass])).AssertNoViolations(helper); - should.Be(Types().That().AreNot(helper.ClassWithoutDependenciesSystemType, helper.BaseClassSystemType)).AssertNoViolations(helper); - should.Be(Types().That().AreNot([helper.ClassWithoutDependenciesSystemType, helper.BaseClassSystemType])).AssertNoViolations(helper); - - helper.AddSnapshotSubHeader("Predicates as conditions"); - should.BeTypesThat().AreNot(helper.ClassWithoutDependencies, helper.BaseClass).AssertNoViolations(helper); - should.BeTypesThat().AreNot([helper.ClassWithoutDependencies, helper.BaseClass]).AssertNoViolations(helper); - should.BeTypesThat().AreNot(helper.ClassWithoutDependenciesSystemType, helper.BaseClassSystemType).AssertNoViolations(helper); - should.BeTypesThat().AreNot([helper.ClassWithoutDependenciesSystemType, helper.BaseClassSystemType]).AssertNoViolations(helper); - - await helper.AssertSnapshotMatches(); - } - - [Fact] - public async Task NotCallAnyTest() - { - var helper = new DependencyAssemblyTestHelper(); - - helper.AddSnapshotHeader("No violations"); - var should = MethodMembers().That().Are(helper.MethodWithSingleDependency).Should(); - - helper.AddSnapshotSubHeader("Conditions"); - should.NotCallAny(helper.MethodWithoutDependencies).AssertNoViolations(helper); - should.NotCallAny([helper.MethodWithoutDependencies]).AssertNoViolations(helper); - should.NotCallAny(MethodMembers().That().Are(helper.MethodWithoutDependencies)).AssertNoViolations(helper); - - helper.AddSnapshotSubHeader("Predicates"); - should.Be(MethodMembers().That().DoNotCallAny(helper.MethodWithoutDependencies)).AssertNoViolations(helper); - should.Be(MethodMembers().That().DoNotCallAny([helper.MethodWithoutDependencies])).AssertNoViolations(helper); - should.Be(MethodMembers().That().DoNotCallAny(MethodMembers().That().Are(helper.MethodWithoutDependencies))).AssertNoViolations(helper); - - helper.AddSnapshotSubHeader("Predicates as conditions"); - should.BeMethodMembersThat().DoNotCallAny(helper.MethodWithoutDependencies).AssertNoViolations(helper); - should.BeMethodMembersThat().DoNotCallAny([helper.MethodWithoutDependencies]).AssertNoViolations(helper); - should.BeMethodMembersThat().DoNotCallAny(MethodMembers().That().Are(helper.MethodWithoutDependencies)).AssertNoViolations(helper); - - helper.AddSnapshotHeader("Violations"); - should = MethodMembers().That().Are(helper.MethodWithSingleDependency).Should(); - - helper.AddSnapshotSubHeader("Conditions"); - should.NotCallAny(helper.CalledMethod).AssertOnlyViolations(helper); - should.NotCallAny([helper.CalledMethod]).AssertOnlyViolations(helper); - should.NotCallAny(MethodMembers().That().Are(helper.CalledMethod)).AssertOnlyViolations(helper); - - helper.AddSnapshotSubHeader("Predicates"); - should.Be(MethodMembers().That().DoNotCallAny(helper.CalledMethod)).AssertOnlyViolations(helper); - should.Be(MethodMembers().That().DoNotCallAny([helper.CalledMethod])).AssertOnlyViolations(helper); - should.Be(MethodMembers().That().DoNotCallAny(MethodMembers().That().Are(helper.CalledMethod))).AssertOnlyViolations(helper); - - helper.AddSnapshotSubHeader("Predicates as conditions"); - should.BeMethodMembersThat().DoNotCallAny(helper.CalledMethod).AssertOnlyViolations(helper); - should.BeMethodMembersThat().DoNotCallAny([helper.CalledMethod]).AssertOnlyViolations(helper); - should.BeMethodMembersThat().DoNotCallAny(MethodMembers().That().Are(helper.CalledMethod)).AssertOnlyViolations(helper); - - helper.AddSnapshotHeader("Empty arguments"); - should = MethodMembers().That().Are(helper.MethodWithSingleDependency).Should(); - - helper.AddSnapshotSubHeader("Conditions"); - should.NotCallAny(new List()).AssertNoViolations(helper); - - helper.AddSnapshotSubHeader("Predicates"); - should.Be(MethodMembers().That().DoNotCallAny(new List())).AssertNoViolations(helper); - - helper.AddSnapshotSubHeader("Predicates as conditions"); - should.BeMethodMembersThat().DoNotCallAny(new List()).AssertNoViolations(helper); - - helper.AddSnapshotHeader("Multiple arguments"); - should = MethodMembers().That().Are(helper.MethodWithMultipleDependencies).Should(); - - helper.AddSnapshotSubHeader("Conditions"); - should.NotCallAny(helper.MethodWithoutDependencies, helper.CalledMethod1, helper.CalledMethod2).AssertOnlyViolations(helper); - should.NotCallAny([helper.MethodWithoutDependencies, helper.CalledMethod1, helper.CalledMethod2]).AssertOnlyViolations(helper); - should.NotCallAny(MethodMembers().That().Are(helper.MethodWithoutDependencies, helper.CalledMethod1, helper.CalledMethod2)).AssertOnlyViolations(helper); - - helper.AddSnapshotSubHeader("Predicates"); - should.Be(MethodMembers().That().DoNotCallAny(helper.MethodWithoutDependencies, helper.CalledMethod1, helper.CalledMethod2)).AssertOnlyViolations(helper); - should.Be(MethodMembers().That().DoNotCallAny([helper.MethodWithoutDependencies, helper.CalledMethod1, helper.CalledMethod2])).AssertOnlyViolations(helper); - should.Be(MethodMembers().That().DoNotCallAny(MethodMembers().That().Are(helper.MethodWithoutDependencies, helper.CalledMethod1, helper.CalledMethod2))).AssertOnlyViolations(helper); - - helper.AddSnapshotSubHeader("Predicates as conditions"); - should.BeMethodMembersThat().DoNotCallAny(helper.MethodWithoutDependencies, helper.CalledMethod1, helper.CalledMethod2).AssertOnlyViolations(helper); - should.BeMethodMembersThat().DoNotCallAny([helper.MethodWithoutDependencies, helper.CalledMethod1, helper.CalledMethod2]).AssertOnlyViolations(helper); - should.BeMethodMembersThat().DoNotCallAny(MethodMembers().That().Are(helper.MethodWithoutDependencies, helper.CalledMethod1, helper.CalledMethod2)).AssertOnlyViolations(helper); - - helper.AddSnapshotHeader("Multiple inputs"); - should = MethodMembers().That().Are(helper.MethodWithSingleDependency, helper.MethodWithMultipleDependencies).Should(); - - helper.AddSnapshotSubHeader("Conditions"); - should.NotCallAny(helper.MethodWithoutDependencies).AssertNoViolations(helper); - should.NotCallAny(helper.CalledMethod, helper.CalledMethod1, helper.CalledMethod2).AssertOnlyViolations(helper); - - helper.AddSnapshotSubHeader("Predicates"); - should.Be(MethodMembers().That().DoNotCallAny(helper.MethodWithoutDependencies)).AssertNoViolations(helper); - should.Be(MethodMembers().That().DoNotCallAny(helper.CalledMethod, helper.CalledMethod1, helper.CalledMethod2)).AssertOnlyViolations(helper); - - helper.AddSnapshotSubHeader("Predicates as conditions"); - should.BeMethodMembersThat().DoNotCallAny(helper.MethodWithoutDependencies).AssertNoViolations(helper); - should.BeMethodMembersThat().DoNotCallAny(helper.CalledMethod, helper.CalledMethod1, helper.CalledMethod2).AssertOnlyViolations(helper); - - await helper.AssertSnapshotMatches(); - } - - [Fact] - public async Task NotDependOnAnyTypesThatTest() - { - var helper = new DependencyAssemblyTestHelper(); - helper.AddSnapshotHeader("No violations"); - Types().That().Are(helper.BaseClass).Should().NotDependOnAnyTypesThat().Are(helper.ChildClass).AssertNoViolations(helper); - - helper.AddSnapshotHeader("Violations"); - Types().That().Are(helper.ChildClass).Should().NotDependOnAnyTypesThat().Are(helper.BaseClass).AssertOnlyViolations(helper); - await helper.AssertSnapshotMatches(); - } - - [Fact] - public async Task NotDependOnAnyTest() - { - var helper = new DependencyAssemblyTestHelper(); - - helper.AddSnapshotHeader("No violations"); - var should = Types().That().Are(helper.ChildClass).Should(); - - helper.AddSnapshotSubHeader("Conditions"); - should.NotDependOnAny(helper.ClassWithoutDependencies).AssertNoViolations(helper); - should.NotDependOnAny(helper.ClassWithoutDependenciesSystemType).AssertNoViolations(helper); - should.NotDependOnAny(Classes().That().Are(helper.ClassWithoutDependencies)).AssertNoViolations(helper); - should.NotDependOnAny([helper.ClassWithoutDependencies]).AssertNoViolations(helper); - should.NotDependOnAny([helper.ClassWithoutDependenciesSystemType]).AssertNoViolations(helper); - - helper.AddSnapshotSubHeader("Predicates"); - should.Be(Types().That().DoNotDependOnAny(helper.ClassWithoutDependencies)).AssertNoViolations(helper); - should.Be(Types().That().DoNotDependOnAny(helper.ClassWithoutDependenciesSystemType)).AssertNoViolations(helper); - should.Be(Types().That().DoNotDependOnAny(helper.ClassWithoutDependencies)).AssertNoViolations(helper); - should.Be(Types().That().DoNotDependOnAny([helper.ClassWithoutDependencies])).AssertNoViolations(helper); - should.Be(Types().That().DoNotDependOnAny([helper.ClassWithoutDependenciesSystemType])).AssertNoViolations(helper); - - helper.AddSnapshotSubHeader("Predicates as conditions"); - should.BeTypesThat().DoNotDependOnAny(helper.ClassWithoutDependencies).AssertNoViolations(helper); - should.BeTypesThat().DoNotDependOnAny(helper.ClassWithoutDependenciesSystemType).AssertNoViolations(helper); - should.BeTypesThat().DoNotDependOnAny(Classes().That().Are(helper.ClassWithoutDependencies)).AssertNoViolations(helper); - should.BeTypesThat().DoNotDependOnAny([helper.ClassWithoutDependencies]).AssertNoViolations(helper); - should.BeTypesThat().DoNotDependOnAny([helper.ClassWithoutDependenciesSystemType]).AssertNoViolations(helper); - - helper.AddSnapshotHeader("Violations"); - should = Types().That().Are(helper.ChildClass).Should(); - - helper.AddSnapshotSubHeader("Conditions"); - should.NotDependOnAny(helper.BaseClass).AssertOnlyViolations(helper); - should.NotDependOnAny(helper.BaseClassSystemType).AssertOnlyViolations(helper); - should.NotDependOnAny(Classes().That().Are(helper.BaseClass)).AssertOnlyViolations(helper); - should.NotDependOnAny([helper.BaseClass]).AssertOnlyViolations(helper); - should.NotDependOnAny([helper.BaseClassSystemType]).AssertOnlyViolations(helper); - - helper.AddSnapshotSubHeader("Predicates"); - should.Be(Types().That().DoNotDependOnAny(helper.BaseClass)).AssertOnlyViolations(helper); - should.Be(Types().That().DoNotDependOnAny(helper.BaseClassSystemType)).AssertOnlyViolations(helper); - should.Be(Types().That().DoNotDependOnAny(Classes().That().Are(helper.BaseClass))).AssertOnlyViolations(helper); - - helper.AddSnapshotSubHeader("Predicates as conditions"); - should.BeTypesThat().DoNotDependOnAny(helper.BaseClass).AssertOnlyViolations(helper); - should.BeTypesThat().DoNotDependOnAny(helper.BaseClassSystemType).AssertOnlyViolations(helper); - should.BeTypesThat().DoNotDependOnAny(Classes().That().Are(helper.BaseClass)).AssertOnlyViolations(helper); - should.BeTypesThat().DoNotDependOnAny([helper.BaseClass]).AssertOnlyViolations(helper); - should.BeTypesThat().DoNotDependOnAny([helper.BaseClassSystemType]).AssertOnlyViolations(helper); - - helper.AddSnapshotHeader("Type outside of architecture"); - should = Types().That().Are(helper.ChildClass).Should(); - - helper.AddSnapshotSubHeader("Conditions"); - should.NotDependOnAny(typeof(AttributeNamespace.ClassWithoutAttributes)).AssertException(helper); - - helper.AddSnapshotSubHeader("Predicates"); - should.Be(Types().That().DoNotDependOnAny(typeof(AttributeNamespace.ClassWithoutAttributes))).AssertNoViolations(helper); - - helper.AddSnapshotSubHeader("Predicates as conditions"); - should.BeTypesThat().DoNotDependOnAny(typeof(AttributeNamespace.ClassWithoutAttributes)).AssertNoViolations(helper); - - helper.AddSnapshotHeader("Empty arguments"); - should = Types().That().Are(helper.ChildClass).Should(); - - helper.AddSnapshotSubHeader("Conditions"); - should.NotDependOnAny(new List()).AssertNoViolations(helper); - should.NotDependOnAny(new List()).AssertNoViolations(helper); - - helper.AddSnapshotSubHeader("Predicates"); - should.Be(Types().That().DoNotDependOnAny(new List())).AssertNoViolations(helper); - should.Be(Types().That().DoNotDependOnAny(new List())).AssertNoViolations(helper); - - helper.AddSnapshotSubHeader("Predicates as conditions"); - should.BeTypesThat().DoNotDependOnAny(new List()).AssertNoViolations(helper); - should.BeTypesThat().DoNotDependOnAny(new List()).AssertNoViolations(helper); - - helper.AddSnapshotHeader("Multiple arguments"); - should = Types().That().Are(helper.ChildClass).Should(); - - helper.AddSnapshotSubHeader("Conditions"); - should.NotDependOnAny(helper.ClassWithoutDependencies, helper.BaseClass).AssertOnlyViolations(helper); - should.NotDependOnAny([helper.ClassWithoutDependencies, helper.BaseClass]).AssertOnlyViolations(helper); - should.NotDependOnAny(helper.ClassWithoutDependenciesSystemType, helper.BaseClassSystemType).AssertOnlyViolations(helper); - should.NotDependOnAny([helper.ClassWithoutDependenciesSystemType, helper.BaseClassSystemType]).AssertOnlyViolations(helper); - - helper.AddSnapshotSubHeader("Predicates"); - should.Be(Types().That().DoNotDependOnAny(helper.ClassWithoutDependencies, helper.BaseClass)).AssertOnlyViolations(helper); - should.Be(Types().That().DoNotDependOnAny([helper.ClassWithoutDependencies, helper.BaseClass])).AssertOnlyViolations(helper); - should.Be(Types().That().DoNotDependOnAny(helper.ClassWithoutDependenciesSystemType, helper.BaseClassSystemType)).AssertOnlyViolations(helper); - should.Be(Types().That().DoNotDependOnAny([helper.ClassWithoutDependenciesSystemType, helper.BaseClassSystemType])).AssertOnlyViolations(helper); - - helper.AddSnapshotSubHeader("Predicates as conditions"); - should.BeTypesThat().DoNotDependOnAny(helper.ClassWithoutDependencies, helper.BaseClass).AssertOnlyViolations(helper); - should.BeTypesThat().DoNotDependOnAny([helper.ClassWithoutDependencies, helper.BaseClass]).AssertOnlyViolations(helper); - should.BeTypesThat().DoNotDependOnAny(helper.ClassWithoutDependenciesSystemType, helper.BaseClassSystemType).AssertOnlyViolations(helper); - should.BeTypesThat().DoNotDependOnAny([helper.ClassWithoutDependenciesSystemType, helper.BaseClassSystemType]).AssertOnlyViolations(helper); - - helper.AddSnapshotHeader("Input with multiple dependencies"); - should = Types().That().Are(helper.ClassWithMultipleDependencies).Should(); - - helper.AddSnapshotSubHeader("Conditions"); - should.NotDependOnAny(helper.BaseClassWithMember, helper.OtherBaseClass).AssertOnlyViolations(helper); - should.NotDependOnAny([helper.BaseClassWithMember, helper.OtherBaseClass]).AssertOnlyViolations(helper); - should.NotDependOnAny(helper.BaseClassWithMemberSystemType, helper.OtherBaseClassSystemType).AssertOnlyViolations(helper); - should.NotDependOnAny([helper.BaseClassWithMemberSystemType, helper.OtherBaseClassSystemType]).AssertOnlyViolations(helper); - should.NotDependOnAny(Classes().That().Are(helper.BaseClassWithMember, helper.OtherBaseClass)).AssertOnlyViolations(helper); - - helper.AddSnapshotSubHeader("Predicates"); - should.Be(Types().That().DoNotDependOnAny(helper.BaseClassWithMember, helper.OtherBaseClass)).AssertOnlyViolations(helper); - should.Be(Types().That().DoNotDependOnAny([helper.BaseClassWithMember, helper.OtherBaseClass])).AssertOnlyViolations(helper); - should.Be(Types().That().DoNotDependOnAny(helper.BaseClassWithMemberSystemType, helper.OtherBaseClassSystemType)).AssertOnlyViolations(helper); - should.Be(Types().That().DoNotDependOnAny([helper.BaseClassWithMemberSystemType, helper.OtherBaseClassSystemType])).AssertOnlyViolations(helper); - should.Be(Classes().That().DoNotDependOnAny(helper.BaseClassWithMember, helper.OtherBaseClass)).AssertOnlyViolations(helper); - - helper.AddSnapshotSubHeader("Predicates as conditions"); - should.BeTypesThat().DoNotDependOnAny(helper.BaseClassWithMember, helper.OtherBaseClass).AssertOnlyViolations(helper); - should.BeTypesThat().DoNotDependOnAny([helper.BaseClassWithMember, helper.OtherBaseClass]).AssertOnlyViolations(helper); - should.BeTypesThat().DoNotDependOnAny(helper.BaseClassWithMemberSystemType, helper.OtherBaseClassSystemType).AssertOnlyViolations(helper); - should.BeTypesThat().DoNotDependOnAny([helper.BaseClassWithMemberSystemType, helper.OtherBaseClassSystemType]).AssertOnlyViolations(helper); - should.BeTypesThat().DoNotDependOnAny(Classes().That().Are(helper.BaseClassWithMember, helper.OtherBaseClass)).AssertOnlyViolations(helper); - - await helper.AssertSnapshotMatches(); - } - - [Fact] - public async Task NotExistTest() - { - var helper = new DependencyAssemblyTestHelper(); - helper.AddSnapshotHeader("No violations"); - var should = Types().That().DependOnAny(helper.ChildClass).Should(); - should.NotExist().AssertNoViolations(helper); - - helper.AddSnapshotHeader("Violations"); - should = Types().That().DependOnAny(helper.BaseClass).Should(); - should.NotExist().AssertOnlyViolations(helper); - await helper.AssertSnapshotMatches(); - } - - [Fact] - public async Task NotHaveAnyAttributesTest() - { - var helper = new AttributeAssemblyTestHelpers(); - - helper.AddSnapshotHeader("No violations"); - var should = Types().That().Are(helper.ClassWithSingleAttribute).Should(); - - helper.AddSnapshotSubHeader("Conditions"); - should.NotHaveAnyAttributes(helper.UnusedAttribute).AssertNoViolations(helper); - should.NotHaveAnyAttributes([helper.UnusedAttribute]).AssertNoViolations(helper); - should.NotHaveAnyAttributes(helper.UnusedAttributeSystemType).AssertNoViolations(helper); - should.NotHaveAnyAttributes([helper.UnusedAttributeSystemType]).AssertNoViolations(helper); - should.NotHaveAnyAttributes(Attributes().That().Are(helper.UnusedAttribute)).AssertNoViolations(helper); - - helper.AddSnapshotSubHeader("Predicates"); - should.Be(Types().That().DoNotHaveAnyAttributes(helper.UnusedAttribute)).AssertNoViolations(helper); - should.Be(Types().That().DoNotHaveAnyAttributes([helper.UnusedAttribute])).AssertNoViolations(helper); - should.Be(Types().That().DoNotHaveAnyAttributes(helper.UnusedAttributeSystemType)).AssertNoViolations(helper); - should.Be(Types().That().DoNotHaveAnyAttributes([helper.UnusedAttributeSystemType])).AssertNoViolations(helper); - should.Be(Types().That().DoNotHaveAnyAttributes(Attributes().That().Are(helper.UnusedAttribute))).AssertNoViolations(helper); - - helper.AddSnapshotSubHeader("Predicates as conditions"); - should.BeTypesThat().DoNotHaveAnyAttributes(helper.UnusedAttribute).AssertNoViolations(helper); - should.BeTypesThat().DoNotHaveAnyAttributes([helper.UnusedAttribute]).AssertNoViolations(helper); - should.BeTypesThat().DoNotHaveAnyAttributes(helper.UnusedAttributeSystemType).AssertNoViolations(helper); - should.BeTypesThat().DoNotHaveAnyAttributes([helper.UnusedAttributeSystemType]).AssertNoViolations(helper); - should.BeTypesThat().DoNotHaveAnyAttributes(Attributes().That().Are(helper.UnusedAttribute)).AssertNoViolations(helper); - - helper.AddSnapshotHeader("Violations"); - should = Types().That().Are(helper.ClassWithSingleAttribute).Should(); - - helper.AddSnapshotSubHeader("Conditions"); - should.NotHaveAnyAttributes(helper.Attribute1).AssertOnlyViolations(helper); - should.NotHaveAnyAttributes([helper.Attribute1]).AssertOnlyViolations(helper); - should.NotHaveAnyAttributes(helper.Attribute1SystemType).AssertOnlyViolations(helper); - should.NotHaveAnyAttributes([helper.Attribute1SystemType]).AssertOnlyViolations(helper); - should.NotHaveAnyAttributes(Attributes().That().Are(helper.Attribute1)).AssertOnlyViolations(helper); - - helper.AddSnapshotSubHeader("Predicates"); - should.Be(Types().That().DoNotHaveAnyAttributes(helper.Attribute1)).AssertOnlyViolations(helper); - should.Be(Types().That().DoNotHaveAnyAttributes([helper.Attribute1])).AssertOnlyViolations(helper); - should.Be(Types().That().DoNotHaveAnyAttributes(helper.Attribute1SystemType)).AssertOnlyViolations(helper); - should.Be(Types().That().DoNotHaveAnyAttributes([helper.Attribute1SystemType])).AssertOnlyViolations(helper); - should.Be(Types().That().DoNotHaveAnyAttributes(Attributes().That().Are(helper.Attribute1))).AssertOnlyViolations(helper); - - helper.AddSnapshotSubHeader("Predicates as conditions"); - should.BeTypesThat().DoNotHaveAnyAttributes(helper.Attribute1).AssertOnlyViolations(helper); - should.BeTypesThat().DoNotHaveAnyAttributes([helper.Attribute1]).AssertOnlyViolations(helper); - should.BeTypesThat().DoNotHaveAnyAttributes(helper.Attribute1SystemType).AssertOnlyViolations(helper); - should.BeTypesThat().DoNotHaveAnyAttributes([helper.Attribute1SystemType]).AssertOnlyViolations(helper); - should.BeTypesThat().DoNotHaveAnyAttributes(Attributes().That().Are(helper.Attribute1)).AssertOnlyViolations(helper); - - helper.AddSnapshotHeader("Type outside of architecture"); - should = Types().That().Are(helper.ClassWithTwoAttributes).Should(); - - helper.AddSnapshotSubHeader("Conditions"); - should.NotHaveAnyAttributes(typeof(TypeDependencyNamespace.BaseClass)).AssertException(helper); - - helper.AddSnapshotSubHeader("Predicates"); - should.Be(Types().That().DoNotHaveAnyAttributes(typeof(TypeDependencyNamespace.BaseClass))).AssertNoViolations(helper); - - helper.AddSnapshotSubHeader("Predicates as conditions"); - should.BeTypesThat().DoNotHaveAnyAttributes(typeof(TypeDependencyNamespace.BaseClass)).AssertNoViolations(helper); - - helper.AddSnapshotHeader("Empty arguments"); - should = Types().That().Are(helper.ClassWithoutAttributes).Should(); - - helper.AddSnapshotSubHeader("Conditions"); - should.NotHaveAnyAttributes(new List()).AssertNoViolations(helper); - should.NotHaveAnyAttributes(new List()).AssertNoViolations(helper); - should.NotHaveAnyAttributes(Attributes().That().HaveFullName(helper.NonExistentObjectName)).AssertNoViolations(helper); - - helper.AddSnapshotSubHeader("Predicates"); - should.Be(Types().That().DoNotHaveAnyAttributes(new List())).AssertNoViolations(helper); - should.Be(Types().That().DoNotHaveAnyAttributes(new List())).AssertNoViolations(helper); - should.Be(Types().That().DoNotHaveAnyAttributes(Attributes().That().HaveFullName(helper.NonExistentObjectName))).AssertNoViolations(helper); - - helper.AddSnapshotSubHeader("Predicates as conditions"); - should.BeTypesThat().DoNotHaveAnyAttributes(new List()).AssertNoViolations(helper); - should.BeTypesThat().DoNotHaveAnyAttributes(new List()).AssertNoViolations(helper); - should.BeTypesThat().DoNotHaveAnyAttributes(Attributes().That().HaveFullName(helper.NonExistentObjectName)).AssertNoViolations(helper); - - helper.AddSnapshotHeader("Multiple arguments"); - should = Types().That().Are(helper.ClassWithTwoAttributes).Should(); - - helper.AddSnapshotSubHeader("Conditions"); - should.NotHaveAnyAttributes(helper.Attribute1, helper.Attribute2).AssertOnlyViolations(helper); - should.NotHaveAnyAttributes([helper.Attribute1, helper.Attribute2]).AssertOnlyViolations(helper); - should.NotHaveAnyAttributes(helper.Attribute1SystemType, helper.Attribute2SystemType).AssertOnlyViolations(helper); - should.NotHaveAnyAttributes([helper.Attribute1SystemType, helper.Attribute2SystemType]).AssertOnlyViolations(helper); - should.NotHaveAnyAttributes(Attributes().That().Are(helper.Attribute1, helper.Attribute2)).AssertOnlyViolations(helper); - - helper.AddSnapshotSubHeader("Predicates"); - should.Be(Types().That().DoNotHaveAnyAttributes(helper.Attribute1, helper.Attribute2)).AssertOnlyViolations(helper); - should.Be(Types().That().DoNotHaveAnyAttributes([helper.Attribute1, helper.Attribute2])).AssertOnlyViolations(helper); - should.Be(Types().That().DoNotHaveAnyAttributes(helper.Attribute1SystemType, helper.Attribute2SystemType)).AssertOnlyViolations(helper); - should.Be(Types().That().DoNotHaveAnyAttributes([helper.Attribute1SystemType, helper.Attribute2SystemType])).AssertOnlyViolations(helper); - should.Be(Types().That().DoNotHaveAnyAttributes(Attributes().That().Are(helper.Attribute1, helper.Attribute2))).AssertOnlyViolations(helper); - - helper.AddSnapshotSubHeader("Predicates as conditions"); - should.BeTypesThat().DoNotHaveAnyAttributes(helper.Attribute1, helper.Attribute2).AssertOnlyViolations(helper); - should.BeTypesThat().DoNotHaveAnyAttributes([helper.Attribute1, helper.Attribute2]).AssertOnlyViolations(helper); - should.BeTypesThat().DoNotHaveAnyAttributes(helper.Attribute1SystemType, helper.Attribute2SystemType).AssertOnlyViolations(helper); - should.BeTypesThat().DoNotHaveAnyAttributes([helper.Attribute1SystemType, helper.Attribute2SystemType]).AssertOnlyViolations(helper); - should.BeTypesThat().DoNotHaveAnyAttributes(Attributes().That().Are(helper.Attribute1, helper.Attribute2)).AssertOnlyViolations(helper); - - helper.AddSnapshotHeader("Multiple inputs"); - should = Types().That().Are(helper.ClassWithoutAttributes, helper.ClassWithSingleAttribute).Should(); - - helper.AddSnapshotSubHeader("Conditions"); - should.NotHaveAnyAttributes(helper.Attribute2).AssertNoViolations(helper); - should.NotHaveAnyAttributes(helper.Attribute1).AssertAnyViolations(helper); - - helper.AddSnapshotSubHeader("Predicates"); - should.Be(Types().That().DoNotHaveAnyAttributes(helper.Attribute2)).AssertNoViolations(helper); - should.Be(Types().That().DoNotHaveAnyAttributes(helper.Attribute1)).AssertAnyViolations(helper); - - helper.AddSnapshotSubHeader("Predicates as conditions"); - should.BeTypesThat().DoNotHaveAnyAttributes(helper.Attribute2).AssertNoViolations(helper); - should.BeTypesThat().DoNotHaveAnyAttributes(helper.Attribute1).AssertAnyViolations(helper); - - await helper.AssertSnapshotMatches(); - } - - [Fact] - public async Task NotHaveAnyAttributesThatTest() - { - var helper = new AttributeAssemblyTestHelpers(); - helper.AddSnapshotHeader("No violations"); - var should = Types().That().Are(helper.ClassWithSingleAttribute).Should(); - should.NotHaveAnyAttributesThat().Are(helper.UnusedAttribute).AssertNoViolations(helper); - - helper.AddSnapshotHeader("Violations"); - should = Types().That().Are(helper.ClassWithSingleAttribute).Should(); - should.NotHaveAnyAttributesThat().Are(helper.Attribute1).AssertOnlyViolations(helper); - await helper.AssertSnapshotMatches(); - } - - [Fact] - public async Task NotHaveAnyAttributesWithArgumentsTest() - { - var helper = new AttributeAssemblyTestHelpers(); - - helper.AddSnapshotHeader("No violations with type arguments"); - var should = Types().That().Are(helper.ClassWithSingleAttributeWithArguments).Should(); - - helper.AddSnapshotSubHeader("Conditions"); - should.NotHaveAnyAttributesWithArguments(helper.UnusedTypeArgumentSystemType).AssertNoViolations(helper); - should.NotHaveAnyAttributesWithArguments([helper.UnusedTypeArgumentSystemType]).AssertNoViolations(helper); - - helper.AddSnapshotSubHeader("Predicates"); - should.Be(Types().That().DoNotHaveAnyAttributesWithArguments(helper.UnusedTypeArgumentSystemType)).AssertNoViolations(helper); - should.Be(Types().That().DoNotHaveAnyAttributesWithArguments([helper.UnusedTypeArgumentSystemType])).AssertNoViolations(helper); - - helper.AddSnapshotSubHeader("Predicates as conditions"); - should.BeTypesThat().DoNotHaveAnyAttributesWithArguments(helper.UnusedTypeArgumentSystemType).AssertNoViolations(helper); - should.BeTypesThat().DoNotHaveAnyAttributesWithArguments([helper.UnusedTypeArgumentSystemType]).AssertNoViolations(helper); - - helper.AddSnapshotHeader("No violations with value arguments"); - should = Types().That().Are(helper.ClassWithSingleAttributeWithArguments).Should(); - - helper.AddSnapshotSubHeader("Conditions"); - should.NotHaveAnyAttributesWithArguments(helper.UnusedAttributeStringValue).AssertNoViolations(helper); - should.NotHaveAnyAttributesWithArguments([helper.UnusedAttributeStringValue]).AssertNoViolations(helper); - - helper.AddSnapshotSubHeader("Predicates"); - should.Be(Types().That().DoNotHaveAnyAttributesWithArguments(helper.UnusedAttributeStringValue)).AssertNoViolations(helper); - should.Be(Types().That().DoNotHaveAnyAttributesWithArguments([helper.UnusedAttributeStringValue])).AssertNoViolations(helper); - - helper.AddSnapshotSubHeader("Predicates as conditions"); - should.BeTypesThat().DoNotHaveAnyAttributesWithArguments(helper.UnusedAttributeStringValue).AssertNoViolations(helper); - should.BeTypesThat().DoNotHaveAnyAttributesWithArguments([helper.UnusedAttributeStringValue]).AssertNoViolations(helper); - - helper.AddSnapshotHeader("Violations with type arguments"); - should = Types().That().Are(helper.ClassWithSingleAttributeWithArguments).Should(); - - helper.AddSnapshotSubHeader("Conditions"); - should.NotHaveAnyAttributesWithArguments(helper.Attribute1TypeArgumentSystemType).AssertOnlyViolations(helper); - should.NotHaveAnyAttributesWithArguments([helper.Attribute1TypeArgumentSystemType]).AssertOnlyViolations(helper); - - helper.AddSnapshotSubHeader("Predicates"); - should.Be(Types().That().DoNotHaveAnyAttributesWithArguments(helper.Attribute1TypeArgumentSystemType)).AssertOnlyViolations(helper); - should.Be(Types().That().DoNotHaveAnyAttributesWithArguments([helper.Attribute1TypeArgumentSystemType])).AssertOnlyViolations(helper); - - helper.AddSnapshotSubHeader("Predicates as conditions"); - should.BeTypesThat().DoNotHaveAnyAttributesWithArguments(helper.Attribute1TypeArgumentSystemType).AssertOnlyViolations(helper); - should.BeTypesThat().DoNotHaveAnyAttributesWithArguments([helper.Attribute1TypeArgumentSystemType]).AssertOnlyViolations(helper); - - helper.AddSnapshotHeader("Violations with value arguments"); - should = Types().That().Are(helper.ClassWithSingleAttributeWithArguments).Should(); - - helper.AddSnapshotSubHeader("Conditions"); - should.NotHaveAnyAttributesWithArguments(helper.Attribute1IntegerArgument).AssertOnlyViolations(helper); - should.NotHaveAnyAttributesWithArguments([helper.Attribute1IntegerArgument]).AssertOnlyViolations(helper); - - helper.AddSnapshotSubHeader("Predicates"); - should.Be(Types().That().DoNotHaveAnyAttributesWithArguments(helper.Attribute1IntegerArgument)).AssertOnlyViolations(helper); - should.Be(Types().That().DoNotHaveAnyAttributesWithArguments([helper.Attribute1IntegerArgument])).AssertOnlyViolations(helper); - - helper.AddSnapshotSubHeader("Predicates as conditions"); - should.BeTypesThat().DoNotHaveAnyAttributesWithArguments(helper.Attribute1IntegerArgument).AssertOnlyViolations(helper); - should.BeTypesThat().DoNotHaveAnyAttributesWithArguments([helper.Attribute1IntegerArgument]).AssertOnlyViolations(helper); - - helper.AddSnapshotHeader("Type without attributes"); - should = Types().That().Are(helper.ClassWithoutAttributes).Should(); - - helper.AddSnapshotSubHeader("Conditions"); - should.NotHaveAnyAttributesWithArguments(helper.Attribute1StringArgument).AssertNoViolations(helper); - - helper.AddSnapshotSubHeader("Predicates"); - should.Be(Types().That().DoNotHaveAnyAttributesWithArguments(helper.Attribute1StringArgument)).AssertNoViolations(helper); - - helper.AddSnapshotSubHeader("Predicates as conditions"); - should.BeTypesThat().DoNotHaveAnyAttributesWithArguments(helper.Attribute1StringArgument).AssertNoViolations(helper); - - helper.AddSnapshotHeader("Null argument"); - should = Types().That().Are(helper.ClassWithSingleAttributeWithArguments).Should(); - - helper.AddSnapshotSubHeader("Conditions"); - should.NotHaveAnyAttributesWithArguments(null).AssertNoViolations(helper); - - helper.AddSnapshotSubHeader("Predicates"); - should.Be(Types().That().DoNotHaveAnyAttributesWithArguments(null)).AssertNoViolations(helper); - - helper.AddSnapshotSubHeader("Predicates as conditions"); - should.BeTypesThat().DoNotHaveAnyAttributesWithArguments(null).AssertNoViolations(helper); - - helper.AddSnapshotHeader("Empty arguments"); - should = Types().That().Are(helper.ClassWithSingleAttributeWithArguments).Should(); - - helper.AddSnapshotSubHeader("Conditions"); - should.NotHaveAnyAttributesWithArguments([]).AssertNoViolations(helper); - - helper.AddSnapshotSubHeader("Predicates"); - should.Be(Types().That().DoNotHaveAnyAttributesWithArguments([])).AssertNoViolations(helper); - - helper.AddSnapshotSubHeader("Predicates as conditions"); - should.BeTypesThat().DoNotHaveAnyAttributesWithArguments([]).AssertNoViolations(helper); - - helper.AddSnapshotHeader("Multiple arguments"); - should = Types().That().Are(helper.ClassWithSingleAttributeWithArguments).Should(); - - helper.AddSnapshotSubHeader("Conditions"); - should.NotHaveAnyAttributesWithArguments([helper.UnusedTypeArgument, helper.Attribute1StringArgument]).AssertOnlyViolations(helper); - should.NotHaveAnyAttributesWithArguments(helper.UnusedTypeArgument, helper.Attribute1StringArgument).AssertOnlyViolations(helper); - - helper.AddSnapshotSubHeader("Predicates"); - should.Be(Types().That().DoNotHaveAnyAttributesWithArguments([helper.UnusedTypeArgument, helper.Attribute1StringArgument])).AssertOnlyViolations(helper); - should.Be(Types().That().DoNotHaveAnyAttributesWithArguments(helper.UnusedTypeArgument, helper.Attribute1StringArgument)).AssertOnlyViolations(helper); - - helper.AddSnapshotSubHeader("Predicates as conditions"); - should.BeTypesThat().DoNotHaveAnyAttributesWithArguments([helper.UnusedTypeArgument, helper.Attribute1StringArgument]).AssertOnlyViolations(helper); - should.BeTypesThat().DoNotHaveAnyAttributesWithArguments(helper.UnusedTypeArgument, helper.Attribute1StringArgument).AssertOnlyViolations(helper); - - helper.AddSnapshotHeader("Multiple inputs"); - should = Types().That().Are(helper.ClassWithSingleAttributeWithArguments, helper.ClassWithTwoAttributesWithArguments).Should(); - - helper.AddSnapshotSubHeader("Conditions"); - should.NotHaveAnyAttributesWithArguments(helper.Attribute1StringArgument).AssertOnlyViolations(helper); - should.NotHaveAnyAttributesWithArguments([helper.Attribute1StringArgument]).AssertOnlyViolations(helper); - - helper.AddSnapshotSubHeader("Predicates"); - should.Be(Types().That().DoNotHaveAnyAttributesWithArguments(helper.Attribute1StringArgument)).AssertOnlyViolations(helper); - should.Be(Types().That().DoNotHaveAnyAttributesWithArguments([helper.Attribute1StringArgument])).AssertOnlyViolations(helper); - - helper.AddSnapshotSubHeader("Predicates as conditions"); - should.BeTypesThat().DoNotHaveAnyAttributesWithArguments(helper.Attribute1StringArgument).AssertOnlyViolations(helper); - should.BeTypesThat().DoNotHaveAnyAttributesWithArguments([helper.Attribute1StringArgument]).AssertOnlyViolations(helper); - - await helper.AssertSnapshotMatches(); - } - - [Fact] - public async Task NotHaveAnyAttributesWithNamedArgumentsTest() - { - var helper = new AttributeAssemblyTestHelpers(); - - helper.AddSnapshotHeader("No violations with type arguments"); - var should = Types().That().Are(helper.ClassWithSingleAttributeWithNamedArguments).Should(); - - helper.AddSnapshotSubHeader("Conditions"); - should.NotHaveAnyAttributesWithNamedArguments(("InvalidName", helper.Attribute1TypeArgumentSystemType)).AssertNoViolations(helper); - should.NotHaveAnyAttributesWithNamedArguments([("InvalidName", helper.Attribute1TypeArgumentSystemType)]).AssertNoViolations(helper); - should.NotHaveAnyAttributesWithNamedArguments(("NamedParameter1", helper.UnusedTypeArgumentSystemType)).AssertNoViolations(helper); - should.NotHaveAnyAttributesWithNamedArguments([("NamedParameter1", helper.UnusedTypeArgumentSystemType)]).AssertNoViolations(helper); - - helper.AddSnapshotSubHeader("Predicates"); - should.Be(Types().That().DoNotHaveAnyAttributesWithNamedArguments(("InvalidName", helper.Attribute1TypeArgumentSystemType))).AssertNoViolations(helper); - should.Be(Types().That().DoNotHaveAnyAttributesWithNamedArguments([("InvalidName", helper.Attribute1TypeArgumentSystemType)])).AssertNoViolations(helper); - should.Be(Types().That().DoNotHaveAnyAttributesWithNamedArguments(("NamedParameter1", helper.UnusedTypeArgumentSystemType))).AssertNoViolations(helper); - should.Be(Types().That().DoNotHaveAnyAttributesWithNamedArguments([("NamedParameter1", helper.UnusedTypeArgumentSystemType)])).AssertNoViolations(helper); - - helper.AddSnapshotSubHeader("Predicates as conditions"); - should.BeTypesThat().DoNotHaveAnyAttributesWithNamedArguments(("InvalidName", helper.Attribute1TypeArgumentSystemType)).AssertNoViolations(helper); - should.BeTypesThat().DoNotHaveAnyAttributesWithNamedArguments([("InvalidName", helper.Attribute1TypeArgumentSystemType)]).AssertNoViolations(helper); - should.BeTypesThat().DoNotHaveAnyAttributesWithNamedArguments(("NamedParameter1", helper.UnusedTypeArgumentSystemType)).AssertNoViolations(helper); - should.BeTypesThat().DoNotHaveAnyAttributesWithNamedArguments([("NamedParameter1", helper.UnusedTypeArgumentSystemType)]).AssertNoViolations(helper); - - helper.AddSnapshotHeader("No violations with value arguments"); - should = Types().That().Are(helper.ClassWithSingleAttributeWithNamedArguments).Should(); - - helper.AddSnapshotSubHeader("Conditions"); - should.NotHaveAnyAttributesWithNamedArguments(("InvalidName", helper.Attribute1StringArgument)).AssertNoViolations(helper); - should.NotHaveAnyAttributesWithNamedArguments([("InvalidName", helper.Attribute1StringArgument)]).AssertNoViolations(helper); - should.NotHaveAnyAttributesWithNamedArguments(("NamedParameter2", helper.UnusedAttributeStringValue)).AssertNoViolations(helper); - should.NotHaveAnyAttributesWithNamedArguments([("NamedParameter2", helper.UnusedAttributeStringValue)]).AssertNoViolations(helper); - - helper.AddSnapshotSubHeader("Predicates"); - should.Be(Types().That().DoNotHaveAnyAttributesWithNamedArguments(("InvalidName", helper.Attribute1StringArgument))).AssertNoViolations(helper); - should.Be(Types().That().DoNotHaveAnyAttributesWithNamedArguments([("InvalidName", helper.Attribute1StringArgument)])).AssertNoViolations(helper); - should.Be(Types().That().DoNotHaveAnyAttributesWithNamedArguments(("NamedParameter2", helper.UnusedAttributeStringValue))).AssertNoViolations(helper); - should.Be(Types().That().DoNotHaveAnyAttributesWithNamedArguments([("NamedParameter2", helper.UnusedAttributeStringValue)])).AssertNoViolations(helper); - - helper.AddSnapshotSubHeader("Predicates as conditions"); - should.BeTypesThat().DoNotHaveAnyAttributesWithNamedArguments(("InvalidName", helper.Attribute1StringArgument)).AssertNoViolations(helper); - should.BeTypesThat().DoNotHaveAnyAttributesWithNamedArguments([("InvalidName", helper.Attribute1StringArgument)]).AssertNoViolations(helper); - should.BeTypesThat().DoNotHaveAnyAttributesWithNamedArguments(("NamedParameter2", helper.UnusedAttributeStringValue)).AssertNoViolations(helper); - should.BeTypesThat().DoNotHaveAnyAttributesWithNamedArguments([("NamedParameter2", helper.UnusedAttributeStringValue)]).AssertNoViolations(helper); - - helper.AddSnapshotHeader("Violations with type arguments"); - should = Types().That().Are(helper.ClassWithSingleAttributeWithNamedArguments).Should(); - - helper.AddSnapshotSubHeader("Conditions"); - should.NotHaveAnyAttributesWithNamedArguments(("NamedParameter1", helper.Attribute1TypeArgumentSystemType)).AssertOnlyViolations(helper); - should.NotHaveAnyAttributesWithNamedArguments([("NamedParameter1", helper.Attribute1TypeArgumentSystemType)]).AssertOnlyViolations(helper); - - helper.AddSnapshotSubHeader("Predicates"); - should.Be(Types().That().DoNotHaveAnyAttributesWithNamedArguments(("NamedParameter1", helper.Attribute1TypeArgumentSystemType))).AssertOnlyViolations(helper); - should.Be(Types().That().DoNotHaveAnyAttributesWithNamedArguments([("NamedParameter1", helper.Attribute1TypeArgumentSystemType)])).AssertOnlyViolations(helper); - - helper.AddSnapshotSubHeader("Predicates as conditions"); - should.BeTypesThat().DoNotHaveAnyAttributesWithNamedArguments(("NamedParameter1", helper.Attribute1TypeArgumentSystemType)).AssertOnlyViolations(helper); - should.BeTypesThat().DoNotHaveAnyAttributesWithNamedArguments([("NamedParameter1", helper.Attribute1TypeArgumentSystemType)]).AssertOnlyViolations(helper); - - helper.AddSnapshotHeader("Violations with value arguments"); - should = Types().That().Are(helper.ClassWithSingleAttributeWithNamedArguments).Should(); - - helper.AddSnapshotSubHeader("Conditions"); - should.NotHaveAnyAttributesWithNamedArguments(("NamedParameter2", helper.Attribute1StringArgument)).AssertOnlyViolations(helper); - should.NotHaveAnyAttributesWithNamedArguments([("NamedParameter2", helper.Attribute1StringArgument)]).AssertOnlyViolations(helper); - - helper.AddSnapshotSubHeader("Predicates"); - should.Be(Types().That().DoNotHaveAnyAttributesWithNamedArguments(("NamedParameter2", helper.Attribute1StringArgument))).AssertOnlyViolations(helper); - should.Be(Types().That().DoNotHaveAnyAttributesWithNamedArguments([("NamedParameter2", helper.Attribute1StringArgument)])).AssertOnlyViolations(helper); - - helper.AddSnapshotSubHeader("Predicates as conditions"); - should.BeTypesThat().DoNotHaveAnyAttributesWithNamedArguments(("NamedParameter2", helper.Attribute1StringArgument)).AssertOnlyViolations(helper); - should.BeTypesThat().DoNotHaveAnyAttributesWithNamedArguments([("NamedParameter2", helper.Attribute1StringArgument)]).AssertOnlyViolations(helper); - - helper.AddSnapshotHeader("Empty arguments"); - should = Types().That().Are(helper.ClassWithSingleAttributeWithNamedArguments).Should(); - - helper.AddSnapshotSubHeader("Conditions"); - should.NotHaveAnyAttributesWithNamedArguments([]).AssertNoViolations(helper); - - helper.AddSnapshotSubHeader("Predicates"); - should.Be(Types().That().DoNotHaveAnyAttributesWithNamedArguments([])).AssertNoViolations(helper); - - helper.AddSnapshotSubHeader("Predicates as conditions"); - should.BeTypesThat().DoNotHaveAnyAttributesWithNamedArguments([]).AssertNoViolations(helper); - - helper.AddSnapshotHeader("Multiple arguments"); - should = Types().That().Are(helper.ClassWithSingleAttributeWithNamedArguments).Should(); - - helper.AddSnapshotSubHeader("Conditions"); - should.NotHaveAnyAttributesWithNamedArguments(("NamedParameter1", helper.Attribute1TypeArgument), ("NamedParameter2", helper.Attribute1StringArgument)).AssertOnlyViolations(helper); - should.NotHaveAnyAttributesWithNamedArguments([("NamedParameter1", helper.Attribute1TypeArgument), ("NamedParameter2", helper.Attribute1StringArgument),]).AssertOnlyViolations(helper); - - helper.AddSnapshotSubHeader("Predicates"); - should.Be(Types().That().DoNotHaveAnyAttributesWithNamedArguments(("NamedParameter1", helper.Attribute1TypeArgument), ("NamedParameter2", helper.Attribute1StringArgument))).AssertOnlyViolations(helper); - should.Be(Types().That().DoNotHaveAnyAttributesWithNamedArguments([("NamedParameter1", helper.Attribute1TypeArgument), ("NamedParameter2", helper.Attribute1StringArgument)])).AssertOnlyViolations(helper); - - helper.AddSnapshotHeader("Multiple inputs"); - should = Types().That().Are(helper.ClassWithSingleAttributeWithNamedArguments, helper.ClassWithTwoAttributesWithNamedArguments).Should(); - - helper.AddSnapshotSubHeader("Conditions"); - should.NotHaveAnyAttributesWithNamedArguments(("NamedParameter1", helper.Attribute1TypeArgumentSystemType)).AssertOnlyViolations(helper); - should.NotHaveAnyAttributesWithNamedArguments([("NamedParameter1", helper.Attribute1TypeArgumentSystemType)]).AssertOnlyViolations(helper); - - helper.AddSnapshotSubHeader("Predicates"); - should.Be(Types().That().DoNotHaveAnyAttributesWithNamedArguments(("NamedParameter1", helper.Attribute1TypeArgumentSystemType))).AssertOnlyViolations(helper); - should.Be(Types().That().DoNotHaveAnyAttributesWithNamedArguments([("NamedParameter1", helper.Attribute1TypeArgumentSystemType)])).AssertOnlyViolations(helper); - - helper.AddSnapshotSubHeader("Predicates as conditions"); - should.BeTypesThat().DoNotHaveAnyAttributesWithNamedArguments(("NamedParameter1", helper.Attribute1TypeArgumentSystemType)).AssertOnlyViolations(helper); - should.BeTypesThat().DoNotHaveAnyAttributesWithNamedArguments([("NamedParameter1", helper.Attribute1TypeArgumentSystemType)]).AssertOnlyViolations(helper); - - await helper.AssertSnapshotMatches(); - } - - [Fact] - public async Task NotHaveAttributeWithArgumentsTest() - { - var helper = new AttributeAssemblyTestHelpers(); - - helper.AddSnapshotHeader("No violations with type arguments"); - var should = Types().That().Are(helper.ClassWithSingleAttributeWithArguments).Should(); - - helper.AddSnapshotSubHeader("Conditions"); - should.NotHaveAttributeWithArguments(helper.Attribute1, helper.Attribute2TypeArgumentSystemType).AssertNoViolations(helper); - should.NotHaveAttributeWithArguments(helper.Attribute1, [helper.Attribute2TypeArgumentSystemType]).AssertNoViolations(helper); - should.NotHaveAttributeWithArguments(helper.Attribute1SystemType, helper.Attribute2TypeArgumentSystemType).AssertNoViolations(helper); - should.NotHaveAttributeWithArguments(helper.Attribute1SystemType, [helper.Attribute2TypeArgumentSystemType]).AssertNoViolations(helper); - - helper.AddSnapshotSubHeader("Predicates"); - should.Be(Types().That().DoNotHaveAttributeWithArguments(helper.Attribute1, helper.Attribute2TypeArgumentSystemType)).AssertNoViolations(helper); - should.Be(Types().That().DoNotHaveAttributeWithArguments(helper.Attribute1, [helper.Attribute2TypeArgumentSystemType])).AssertNoViolations(helper); - should.Be(Types().That().DoNotHaveAttributeWithArguments(helper.Attribute1SystemType, helper.Attribute2TypeArgumentSystemType)).AssertNoViolations(helper); - should.Be(Types().That().DoNotHaveAttributeWithArguments(helper.Attribute1SystemType, [helper.Attribute2TypeArgumentSystemType])).AssertNoViolations(helper); - - helper.AddSnapshotSubHeader("Predicates as conditions"); - should.BeTypesThat().DoNotHaveAttributeWithArguments(helper.Attribute1, helper.Attribute2TypeArgumentSystemType).AssertNoViolations(helper); - should.BeTypesThat().DoNotHaveAttributeWithArguments(helper.Attribute1, [helper.Attribute2TypeArgumentSystemType]).AssertNoViolations(helper); - should.BeTypesThat().DoNotHaveAttributeWithArguments(helper.Attribute1SystemType, helper.Attribute2TypeArgumentSystemType).AssertNoViolations(helper); - should.BeTypesThat().DoNotHaveAttributeWithArguments(helper.Attribute1SystemType, [helper.Attribute2TypeArgumentSystemType]).AssertNoViolations(helper); - - helper.AddSnapshotHeader("No violations with value arguments"); - should = Types().That().Are(helper.ClassWithSingleAttributeWithArguments).Should(); - - helper.AddSnapshotSubHeader("Conditions"); - should.NotHaveAttributeWithArguments(helper.Attribute1, helper.Attribute2StringArgument).AssertNoViolations(helper); - should.NotHaveAttributeWithArguments(helper.Attribute1, [helper.Attribute2StringArgument]).AssertNoViolations(helper); - should.NotHaveAttributeWithArguments(helper.Attribute1SystemType, helper.Attribute2StringArgument).AssertNoViolations(helper); - should.NotHaveAttributeWithArguments(helper.Attribute1SystemType, [helper.Attribute2StringArgument]).AssertNoViolations(helper); - - helper.AddSnapshotSubHeader("Predicates"); - should.Be(Types().That().DoNotHaveAttributeWithArguments(helper.Attribute1, helper.Attribute2StringArgument)).AssertNoViolations(helper); - should.Be(Types().That().DoNotHaveAttributeWithArguments(helper.Attribute1, [helper.Attribute2StringArgument])).AssertNoViolations(helper); - should.Be(Types().That().DoNotHaveAttributeWithArguments(helper.Attribute1SystemType, helper.Attribute2StringArgument)).AssertNoViolations(helper); - should.Be(Types().That().DoNotHaveAttributeWithArguments(helper.Attribute1SystemType, [helper.Attribute2StringArgument])).AssertNoViolations(helper); - - helper.AddSnapshotSubHeader("Predicates as conditions"); - should.BeTypesThat().DoNotHaveAttributeWithArguments(helper.Attribute1, helper.Attribute2StringArgument).AssertNoViolations(helper); - should.BeTypesThat().DoNotHaveAttributeWithArguments(helper.Attribute1, [helper.Attribute2StringArgument]).AssertNoViolations(helper); - should.BeTypesThat().DoNotHaveAttributeWithArguments(helper.Attribute1SystemType, helper.Attribute2StringArgument).AssertNoViolations(helper); - should.BeTypesThat().DoNotHaveAttributeWithArguments(helper.Attribute1SystemType, [helper.Attribute2StringArgument]).AssertNoViolations(helper); - - helper.AddSnapshotHeader("Violations with type arguments"); - should = Types().That().Are(helper.ClassWithSingleAttributeWithArguments).Should(); - - helper.AddSnapshotSubHeader("Conditions"); - should.NotHaveAttributeWithArguments(helper.Attribute1, helper.Attribute1TypeArgumentSystemType).AssertOnlyViolations(helper); - should.NotHaveAttributeWithArguments(helper.Attribute1, [helper.Attribute1TypeArgumentSystemType]).AssertOnlyViolations(helper); - should.NotHaveAttributeWithArguments(helper.Attribute1SystemType, helper.Attribute1TypeArgumentSystemType).AssertOnlyViolations(helper); - should.NotHaveAttributeWithArguments(helper.Attribute1SystemType, [helper.Attribute1TypeArgumentSystemType]).AssertOnlyViolations(helper); - - helper.AddSnapshotSubHeader("Predicates"); - should.Be(Types().That().DoNotHaveAttributeWithArguments(helper.Attribute1, helper.Attribute1TypeArgumentSystemType)).AssertOnlyViolations(helper); - should.Be(Types().That().DoNotHaveAttributeWithArguments(helper.Attribute1, [helper.Attribute1TypeArgumentSystemType])).AssertOnlyViolations(helper); - should.Be(Types().That().DoNotHaveAttributeWithArguments(helper.Attribute1SystemType, helper.Attribute1TypeArgumentSystemType)).AssertOnlyViolations(helper); - should.Be(Types().That().DoNotHaveAttributeWithArguments(helper.Attribute1SystemType, [helper.Attribute1TypeArgumentSystemType])).AssertOnlyViolations(helper); - - helper.AddSnapshotSubHeader("Predicates as conditions"); - should.BeTypesThat().DoNotHaveAttributeWithArguments(helper.Attribute1, helper.Attribute1TypeArgumentSystemType).AssertOnlyViolations(helper); - should.BeTypesThat().DoNotHaveAttributeWithArguments(helper.Attribute1, [helper.Attribute1TypeArgumentSystemType]).AssertOnlyViolations(helper); - should.BeTypesThat().DoNotHaveAttributeWithArguments(helper.Attribute1SystemType, helper.Attribute1TypeArgumentSystemType).AssertOnlyViolations(helper); - should.BeTypesThat().DoNotHaveAttributeWithArguments(helper.Attribute1SystemType, [helper.Attribute1TypeArgumentSystemType]).AssertOnlyViolations(helper); - - helper.AddSnapshotHeader("Violations with value arguments"); - should = Types().That().Are(helper.ClassWithSingleAttributeWithArguments).Should(); - - helper.AddSnapshotSubHeader("Conditions"); - should.NotHaveAttributeWithArguments(helper.Attribute1, helper.Attribute1IntegerArgument).AssertOnlyViolations(helper); - should.NotHaveAttributeWithArguments(helper.Attribute1, [helper.Attribute1IntegerArgument]).AssertOnlyViolations(helper); - should.NotHaveAttributeWithArguments(helper.Attribute1SystemType, helper.Attribute1IntegerArgument).AssertOnlyViolations(helper); - should.NotHaveAttributeWithArguments(helper.Attribute1SystemType, [helper.Attribute1IntegerArgument]).AssertOnlyViolations(helper); - - helper.AddSnapshotSubHeader("Predicates"); - should.Be(Types().That().DoNotHaveAttributeWithArguments(helper.Attribute1, helper.Attribute1IntegerArgument)).AssertOnlyViolations(helper); - should.Be(Types().That().DoNotHaveAttributeWithArguments(helper.Attribute1, [helper.Attribute1IntegerArgument])).AssertOnlyViolations(helper); - should.Be(Types().That().DoNotHaveAttributeWithArguments(helper.Attribute1SystemType, helper.Attribute1IntegerArgument)).AssertOnlyViolations(helper); - should.Be(Types().That().DoNotHaveAttributeWithArguments(helper.Attribute1SystemType, [helper.Attribute1IntegerArgument])).AssertOnlyViolations(helper); - - helper.AddSnapshotSubHeader("Predicates as conditions"); - should.BeTypesThat().DoNotHaveAttributeWithArguments(helper.Attribute1, helper.Attribute1IntegerArgument).AssertOnlyViolations(helper); - should.BeTypesThat().DoNotHaveAttributeWithArguments(helper.Attribute1, [helper.Attribute1IntegerArgument]).AssertOnlyViolations(helper); - should.BeTypesThat().DoNotHaveAttributeWithArguments(helper.Attribute1SystemType, helper.Attribute1IntegerArgument).AssertOnlyViolations(helper); - should.BeTypesThat().DoNotHaveAttributeWithArguments(helper.Attribute1SystemType, [helper.Attribute1IntegerArgument]).AssertOnlyViolations(helper); - - helper.AddSnapshotHeader("Unused attribute"); - should = Types().That().Are(helper.ClassWithSingleAttributeWithArguments).Should(); - - helper.AddSnapshotSubHeader("Conditions"); - should.NotHaveAttributeWithArguments(helper.UnusedAttribute, helper.Attribute1StringArgument).AssertNoViolations(helper); - should.NotHaveAttributeWithArguments(helper.UnusedAttribute, [helper.Attribute1StringArgument]).AssertNoViolations(helper); - should.NotHaveAttributeWithArguments(helper.UnusedAttributeSystemType, helper.Attribute1StringArgument).AssertNoViolations(helper); - should.NotHaveAttributeWithArguments(helper.UnusedAttributeSystemType, [helper.Attribute1StringArgument]).AssertNoViolations(helper); - - helper.AddSnapshotSubHeader("Predicates"); - should.Be(Types().That().DoNotHaveAttributeWithArguments(helper.UnusedAttribute, helper.Attribute1StringArgument)).AssertNoViolations(helper); - should.Be(Types().That().DoNotHaveAttributeWithArguments(helper.UnusedAttribute, [helper.Attribute1StringArgument])).AssertNoViolations(helper); - should.Be(Types().That().DoNotHaveAttributeWithArguments(helper.UnusedAttributeSystemType, helper.Attribute1StringArgument)).AssertNoViolations(helper); - should.Be(Types().That().DoNotHaveAttributeWithArguments(helper.UnusedAttributeSystemType, [helper.Attribute1StringArgument])).AssertNoViolations(helper); - - helper.AddSnapshotSubHeader("Predicates as conditions"); - should.BeTypesThat().DoNotHaveAttributeWithArguments(helper.UnusedAttribute, helper.Attribute1StringArgument).AssertNoViolations(helper); - should.BeTypesThat().DoNotHaveAttributeWithArguments(helper.UnusedAttribute, [helper.Attribute1StringArgument]).AssertNoViolations(helper); - should.BeTypesThat().DoNotHaveAttributeWithArguments(helper.UnusedAttributeSystemType, helper.Attribute1StringArgument).AssertNoViolations(helper); - should.BeTypesThat().DoNotHaveAttributeWithArguments(helper.UnusedAttributeSystemType, [helper.Attribute1StringArgument]).AssertNoViolations(helper); - - helper.AddSnapshotHeader("Type outside of architecture"); - should = Types().That().Are(helper.ClassWithSingleAttributeWithArguments).Should(); - - helper.AddSnapshotSubHeader("Conditions"); - should.NotHaveAttributeWithArguments(typeof(TypeDependencyNamespace.BaseClass),1).AssertNoViolations(helper); - - helper.AddSnapshotSubHeader("Predicates"); - should.Be(Types().That().DoNotHaveAttributeWithArguments(typeof(TypeDependencyNamespace.BaseClass),1)).AssertNoViolations(helper); - - helper.AddSnapshotSubHeader("Predicates as conditions"); - should.BeTypesThat().DoNotHaveAttributeWithArguments(typeof(TypeDependencyNamespace.BaseClass),1).AssertNoViolations(helper); - - helper.AddSnapshotHeader("Null argument"); - should = Types().That().Are(helper.ClassWithSingleAttributeWithArguments).Should(); - - helper.AddSnapshotSubHeader("Conditions"); - should.NotHaveAttributeWithArguments(helper.UnusedAttribute, null).AssertNoViolations(helper); - should.NotHaveAttributeWithArguments(helper.UnusedAttributeSystemType, null).AssertNoViolations(helper); - - helper.AddSnapshotSubHeader("Predicates"); - should.Be(Types().That().DoNotHaveAttributeWithArguments(helper.UnusedAttribute, null)).AssertNoViolations(helper); - should.Be(Types().That().DoNotHaveAttributeWithArguments(helper.UnusedAttributeSystemType, null)).AssertNoViolations(helper); - - helper.AddSnapshotSubHeader("Predicates as conditions"); - should.BeTypesThat().DoNotHaveAttributeWithArguments(helper.UnusedAttribute, null).AssertNoViolations(helper); - should.BeTypesThat().DoNotHaveAttributeWithArguments(helper.UnusedAttributeSystemType, null).AssertNoViolations(helper); - - helper.AddSnapshotHeader("Empty arguments"); - should = Types().That().Are(helper.ClassWithSingleAttributeWithArguments).Should(); - should.NotHaveAttributeWithArguments(helper.Attribute1, []).AssertOnlyViolations(helper); - should.NotHaveAttributeWithArguments(helper.Attribute1SystemType, []).AssertOnlyViolations(helper); - - helper.AddSnapshotHeader("Multiple arguments"); - should = Types().That().Are(helper.ClassWithSingleAttributeWithArguments).Should(); - - helper.AddSnapshotSubHeader("Conditions"); - should.NotHaveAttributeWithArguments(helper.Attribute1, helper.Attribute1TypeArgumentSystemType, helper.Attribute1IntegerArgument).AssertOnlyViolations(helper); - should.NotHaveAttributeWithArguments(helper.Attribute1, [helper.Attribute1TypeArgumentSystemType, helper.Attribute1IntegerArgument]).AssertOnlyViolations(helper); - should.NotHaveAttributeWithArguments(helper.Attribute1SystemType, helper.Attribute1TypeArgumentSystemType, helper.Attribute1IntegerArgument).AssertOnlyViolations(helper); - should.NotHaveAttributeWithArguments(helper.Attribute1SystemType, [helper.Attribute1TypeArgumentSystemType, helper.Attribute1IntegerArgument]).AssertOnlyViolations(helper); - - helper.AddSnapshotSubHeader("Predicates"); - should.Be(Types().That().DoNotHaveAttributeWithArguments(helper.Attribute1, helper.Attribute1TypeArgumentSystemType, helper.Attribute1IntegerArgument)).AssertOnlyViolations(helper); - should.Be(Types().That().DoNotHaveAttributeWithArguments(helper.Attribute1, [helper.Attribute1TypeArgumentSystemType, helper.Attribute1IntegerArgument])).AssertOnlyViolations(helper); - should.Be(Types().That().DoNotHaveAttributeWithArguments(helper.Attribute1SystemType, helper.Attribute1TypeArgumentSystemType, helper.Attribute1IntegerArgument)).AssertOnlyViolations(helper); - should.Be(Types().That().DoNotHaveAttributeWithArguments(helper.Attribute1SystemType, [helper.Attribute1TypeArgumentSystemType, helper.Attribute1IntegerArgument])).AssertOnlyViolations(helper); - - helper.AddSnapshotSubHeader("Predicates as conditions"); - should.BeTypesThat().DoNotHaveAttributeWithArguments(helper.Attribute1, helper.Attribute1TypeArgumentSystemType, helper.Attribute1IntegerArgument).AssertOnlyViolations(helper); - should.BeTypesThat().DoNotHaveAttributeWithArguments(helper.Attribute1, [helper.Attribute1TypeArgumentSystemType, helper.Attribute1IntegerArgument]).AssertOnlyViolations(helper); - should.BeTypesThat().DoNotHaveAttributeWithArguments(helper.Attribute1SystemType, helper.Attribute1TypeArgumentSystemType, helper.Attribute1IntegerArgument).AssertOnlyViolations(helper); - should.BeTypesThat().DoNotHaveAttributeWithArguments(helper.Attribute1SystemType, [helper.Attribute1TypeArgumentSystemType, helper.Attribute1IntegerArgument]).AssertOnlyViolations(helper); - - helper.AddSnapshotHeader("Multiple inputs"); - should = Types().That().Are(helper.ClassWithSingleAttributeWithArguments, helper.ClassWithTwoAttributesWithNamedArguments).Should(); - - helper.AddSnapshotSubHeader("Conditions"); - should.NotHaveAttributeWithArguments(helper.Attribute1, helper.Attribute1StringArgument).AssertOnlyViolations(helper); - should.NotHaveAttributeWithArguments(helper.Attribute1, [helper.Attribute1StringArgument]).AssertOnlyViolations(helper); - should.NotHaveAttributeWithArguments(helper.Attribute1SystemType, helper.Attribute1StringArgument).AssertOnlyViolations(helper); - should.NotHaveAttributeWithArguments(helper.Attribute1SystemType, [helper.Attribute1StringArgument]).AssertOnlyViolations(helper); - - helper.AddSnapshotSubHeader("Predicates"); - should.Be(Types().That().DoNotHaveAttributeWithArguments(helper.Attribute1, helper.Attribute1StringArgument)).AssertOnlyViolations(helper); - should.Be(Types().That().DoNotHaveAttributeWithArguments(helper.Attribute1, [helper.Attribute1StringArgument])).AssertOnlyViolations(helper); - should.Be(Types().That().DoNotHaveAttributeWithArguments(helper.Attribute1SystemType, helper.Attribute1StringArgument)).AssertOnlyViolations(helper); - should.Be(Types().That().DoNotHaveAttributeWithArguments(helper.Attribute1SystemType, [helper.Attribute1StringArgument])).AssertOnlyViolations(helper); - - helper.AddSnapshotSubHeader("Predicates as conditions"); - should.BeTypesThat().DoNotHaveAttributeWithArguments(helper.Attribute1, helper.Attribute1StringArgument).AssertOnlyViolations(helper); - should.BeTypesThat().DoNotHaveAttributeWithArguments(helper.Attribute1, [helper.Attribute1StringArgument]).AssertOnlyViolations(helper); - should.BeTypesThat().DoNotHaveAttributeWithArguments(helper.Attribute1SystemType, helper.Attribute1StringArgument).AssertOnlyViolations(helper); - should.BeTypesThat().DoNotHaveAttributeWithArguments(helper.Attribute1SystemType, [helper.Attribute1StringArgument]).AssertOnlyViolations(helper); - - await helper.AssertSnapshotMatches(); - } - - [Fact] - public async Task NotHaveAttributeWithNamedArgumentsTest() - { - var helper = new AttributeAssemblyTestHelpers(); - - helper.AddSnapshotHeader("No violations with type arguments"); - var should = Types().That().Are(helper.ClassWithSingleAttributeWithNamedArguments).Should(); - - helper.AddSnapshotSubHeader("Conditions"); - should.NotHaveAttributeWithNamedArguments(helper.Attribute1, ("NamedParameter1", helper.Attribute2TypeArgumentSystemType)).AssertNoViolations(helper); - should.NotHaveAttributeWithNamedArguments(helper.Attribute1, [("NamedParameter1", helper.Attribute2TypeArgumentSystemType)]).AssertNoViolations(helper); - should.NotHaveAttributeWithNamedArguments(helper.Attribute1SystemType, ("NamedParameter1", helper.Attribute2TypeArgumentSystemType)).AssertNoViolations(helper); - should.NotHaveAttributeWithNamedArguments(helper.Attribute1SystemType, [("NamedParameter1", helper.Attribute2TypeArgumentSystemType)]).AssertNoViolations(helper); - - helper.AddSnapshotSubHeader("Predicates"); - should.Be(Types().That().DoNotHaveAttributeWithNamedArguments(helper.Attribute1, ("NamedParameter1", helper.Attribute2TypeArgumentSystemType))).AssertNoViolations(helper); - should.Be(Types().That().DoNotHaveAttributeWithNamedArguments(helper.Attribute1, [("NamedParameter1", helper.Attribute2TypeArgumentSystemType)])).AssertNoViolations(helper); - should.Be(Types().That().DoNotHaveAttributeWithNamedArguments(helper.Attribute1SystemType, ("NamedParameter1", helper.Attribute2TypeArgumentSystemType))).AssertNoViolations(helper); - should.Be(Types().That().DoNotHaveAttributeWithNamedArguments(helper.Attribute1SystemType, [("NamedParameter1", helper.Attribute2TypeArgumentSystemType)])).AssertNoViolations(helper); - - helper.AddSnapshotSubHeader("Predicates as conditions"); - should.BeTypesThat().DoNotHaveAttributeWithNamedArguments(helper.Attribute1, ("NamedParameter1", helper.Attribute2TypeArgumentSystemType)).AssertNoViolations(helper); - should.BeTypesThat().DoNotHaveAttributeWithNamedArguments(helper.Attribute1, [("NamedParameter1", helper.Attribute2TypeArgumentSystemType)]).AssertNoViolations(helper); - should.BeTypesThat().DoNotHaveAttributeWithNamedArguments(helper.Attribute1SystemType, ("NamedParameter1", helper.Attribute2TypeArgumentSystemType)).AssertNoViolations(helper); - should.BeTypesThat().DoNotHaveAttributeWithNamedArguments(helper.Attribute1SystemType, [("NamedParameter1", helper.Attribute2TypeArgumentSystemType)]).AssertNoViolations(helper); - - helper.AddSnapshotHeader("No violations with value arguments"); - should = Types().That().Are(helper.ClassWithSingleAttributeWithNamedArguments).Should(); - - helper.AddSnapshotSubHeader("Conditions"); - should.NotHaveAttributeWithNamedArguments(helper.Attribute1, ("NamedParameter2", helper.Attribute2StringArgument)).AssertNoViolations(helper); - should.NotHaveAttributeWithNamedArguments(helper.Attribute1, [("NamedParameter2", helper.Attribute2StringArgument)]).AssertNoViolations(helper); - should.NotHaveAttributeWithNamedArguments(helper.Attribute1SystemType, ("NamedParameter2", helper.Attribute2StringArgument)).AssertNoViolations(helper); - should.NotHaveAttributeWithNamedArguments(helper.Attribute1SystemType, [("NamedParameter2", helper.Attribute2StringArgument)]).AssertNoViolations(helper); - - helper.AddSnapshotSubHeader("Predicates"); - should.Be(Types().That().DoNotHaveAttributeWithNamedArguments(helper.Attribute1, ("NamedParameter2", helper.Attribute2StringArgument))).AssertNoViolations(helper); - should.Be(Types().That().DoNotHaveAttributeWithNamedArguments(helper.Attribute1, [("NamedParameter2", helper.Attribute2StringArgument)])).AssertNoViolations(helper); - should.Be(Types().That().DoNotHaveAttributeWithNamedArguments(helper.Attribute1SystemType, ("NamedParameter2", helper.Attribute2StringArgument))).AssertNoViolations(helper); - should.Be(Types().That().DoNotHaveAttributeWithNamedArguments(helper.Attribute1SystemType, [("NamedParameter2", helper.Attribute2StringArgument)])).AssertNoViolations(helper); - - helper.AddSnapshotSubHeader("Predicates as conditions"); - should.BeTypesThat().DoNotHaveAttributeWithNamedArguments(helper.Attribute1, ("NamedParameter2", helper.Attribute2StringArgument)).AssertNoViolations(helper); - should.BeTypesThat().DoNotHaveAttributeWithNamedArguments(helper.Attribute1, [("NamedParameter2", helper.Attribute2StringArgument)]).AssertNoViolations(helper); - should.BeTypesThat().DoNotHaveAttributeWithNamedArguments(helper.Attribute1SystemType, ("NamedParameter2", helper.Attribute2StringArgument)).AssertNoViolations(helper); - should.BeTypesThat().DoNotHaveAttributeWithNamedArguments(helper.Attribute1SystemType, [("NamedParameter2", helper.Attribute2StringArgument)]).AssertNoViolations(helper); - - helper.AddSnapshotHeader("Violations with type arguments"); - should = Types().That().Are(helper.ClassWithSingleAttributeWithNamedArguments).Should(); - - helper.AddSnapshotSubHeader("Conditions"); - should.NotHaveAttributeWithNamedArguments(helper.Attribute1, ("NamedParameter1", helper.Attribute1TypeArgumentSystemType)).AssertOnlyViolations(helper); - should.NotHaveAttributeWithNamedArguments(helper.Attribute1, [("NamedParameter1", helper.Attribute1TypeArgumentSystemType)]).AssertOnlyViolations(helper); - should.NotHaveAttributeWithNamedArguments(helper.Attribute1SystemType, ("NamedParameter1", helper.Attribute1TypeArgumentSystemType)).AssertOnlyViolations(helper); - should.NotHaveAttributeWithNamedArguments(helper.Attribute1SystemType, [("NamedParameter1", helper.Attribute1TypeArgumentSystemType)]).AssertOnlyViolations(helper); - - helper.AddSnapshotSubHeader("Predicates"); - should.Be(Types().That().DoNotHaveAttributeWithNamedArguments(helper.Attribute1, ("NamedParameter1", helper.Attribute1TypeArgumentSystemType))).AssertOnlyViolations(helper); - should.Be(Types().That().DoNotHaveAttributeWithNamedArguments(helper.Attribute1, [("NamedParameter1", helper.Attribute1TypeArgumentSystemType)])).AssertOnlyViolations(helper); - should.Be(Types().That().DoNotHaveAttributeWithNamedArguments(helper.Attribute1SystemType, ("NamedParameter1", helper.Attribute1TypeArgumentSystemType))).AssertOnlyViolations(helper); - should.Be(Types().That().DoNotHaveAttributeWithNamedArguments(helper.Attribute1SystemType, [("NamedParameter1", helper.Attribute1TypeArgumentSystemType)])).AssertOnlyViolations(helper); - - helper.AddSnapshotSubHeader("Predicates as conditions"); - should.BeTypesThat().DoNotHaveAttributeWithNamedArguments(helper.Attribute1, ("NamedParameter1", helper.Attribute1TypeArgumentSystemType)).AssertOnlyViolations(helper); - should.BeTypesThat().DoNotHaveAttributeWithNamedArguments(helper.Attribute1, [("NamedParameter1", helper.Attribute1TypeArgumentSystemType)]).AssertOnlyViolations(helper); - should.BeTypesThat().DoNotHaveAttributeWithNamedArguments(helper.Attribute1SystemType, ("NamedParameter1", helper.Attribute1TypeArgumentSystemType)).AssertOnlyViolations(helper); - should.BeTypesThat().DoNotHaveAttributeWithNamedArguments(helper.Attribute1SystemType, [("NamedParameter1", helper.Attribute1TypeArgumentSystemType)]).AssertOnlyViolations(helper); - - helper.AddSnapshotHeader("Violations with value arguments"); - should = Types().That().Are(helper.ClassWithSingleAttributeWithNamedArguments).Should(); - - helper.AddSnapshotSubHeader("Conditions"); - should.NotHaveAttributeWithNamedArguments(helper.Attribute1, ("NamedParameter2", helper.Attribute1StringArgument)).AssertOnlyViolations(helper); - should.NotHaveAttributeWithNamedArguments(helper.Attribute1, [("NamedParameter2", helper.Attribute1StringArgument)]).AssertOnlyViolations(helper); - should.NotHaveAttributeWithNamedArguments(helper.Attribute1SystemType, ("NamedParameter2", helper.Attribute1StringArgument)).AssertOnlyViolations(helper); - should.NotHaveAttributeWithNamedArguments(helper.Attribute1SystemType, [("NamedParameter2", helper.Attribute1StringArgument)]).AssertOnlyViolations(helper); - - helper.AddSnapshotSubHeader("Predicates"); - should.Be(Types().That().DoNotHaveAttributeWithNamedArguments(helper.Attribute1, ("NamedParameter2", helper.Attribute1StringArgument))).AssertOnlyViolations(helper); - should.Be(Types().That().DoNotHaveAttributeWithNamedArguments(helper.Attribute1, [("NamedParameter2", helper.Attribute1StringArgument)])).AssertOnlyViolations(helper); - should.Be(Types().That().DoNotHaveAttributeWithNamedArguments(helper.Attribute1SystemType, ("NamedParameter2", helper.Attribute1StringArgument))).AssertOnlyViolations(helper); - should.Be(Types().That().DoNotHaveAttributeWithNamedArguments(helper.Attribute1SystemType, [("NamedParameter2", helper.Attribute1StringArgument)])).AssertOnlyViolations(helper); - - helper.AddSnapshotSubHeader("Predicates as conditions"); - should.BeTypesThat().DoNotHaveAttributeWithNamedArguments(helper.Attribute1, ("NamedParameter2", helper.Attribute1StringArgument)).AssertOnlyViolations(helper); - should.BeTypesThat().DoNotHaveAttributeWithNamedArguments(helper.Attribute1, [("NamedParameter2", helper.Attribute1StringArgument)]).AssertOnlyViolations(helper); - should.BeTypesThat().DoNotHaveAttributeWithNamedArguments(helper.Attribute1SystemType, ("NamedParameter2", helper.Attribute1StringArgument)).AssertOnlyViolations(helper); - should.BeTypesThat().DoNotHaveAttributeWithNamedArguments(helper.Attribute1SystemType, [("NamedParameter2", helper.Attribute1StringArgument)]).AssertOnlyViolations(helper); - - helper.AddSnapshotHeader("Unused attribute"); - should = Types().That().Are(helper.ClassWithSingleAttributeWithNamedArguments).Should(); - - helper.AddSnapshotSubHeader("Conditions"); - should.NotHaveAttributeWithNamedArguments(helper.UnusedAttribute, ("NamedParameter1", helper.Attribute1TypeArgument)).AssertNoViolations(helper); - should.NotHaveAttributeWithNamedArguments(helper.UnusedAttribute, [("NamedParameter1", helper.Attribute1TypeArgument)]).AssertNoViolations(helper); - should.NotHaveAttributeWithNamedArguments(helper.UnusedAttributeSystemType, ("NamedParameter1", helper.Attribute1TypeArgument)).AssertNoViolations(helper); - should.NotHaveAttributeWithNamedArguments(helper.UnusedAttributeSystemType, [("NamedParameter1", helper.Attribute1TypeArgument)]).AssertNoViolations(helper); - - helper.AddSnapshotSubHeader("Predicates"); - should.Be(Types().That().DoNotHaveAttributeWithNamedArguments(helper.UnusedAttribute, ("NamedParameter1", helper.Attribute1TypeArgument))).AssertNoViolations(helper); - should.Be(Types().That().DoNotHaveAttributeWithNamedArguments(helper.UnusedAttribute, [("NamedParameter1", helper.Attribute1TypeArgument)])).AssertNoViolations(helper); - should.Be(Types().That().DoNotHaveAttributeWithNamedArguments(helper.UnusedAttributeSystemType, ("NamedParameter1", helper.Attribute1TypeArgument))).AssertNoViolations(helper); - should.Be(Types().That().DoNotHaveAttributeWithNamedArguments(helper.UnusedAttributeSystemType, [("NamedParameter1", helper.Attribute1TypeArgument)])).AssertNoViolations(helper); - - helper.AddSnapshotSubHeader("Predicates as conditions"); - should.BeTypesThat().DoNotHaveAttributeWithNamedArguments(helper.UnusedAttribute, ("NamedParameter1", helper.Attribute1TypeArgument)).AssertNoViolations(helper); - should.BeTypesThat().DoNotHaveAttributeWithNamedArguments(helper.UnusedAttribute, [("NamedParameter1", helper.Attribute1TypeArgument)]).AssertNoViolations(helper); - should.BeTypesThat().DoNotHaveAttributeWithNamedArguments(helper.UnusedAttributeSystemType, ("NamedParameter1", helper.Attribute1TypeArgument)).AssertNoViolations(helper); - should.BeTypesThat().DoNotHaveAttributeWithNamedArguments(helper.UnusedAttributeSystemType, [("NamedParameter1", helper.Attribute1TypeArgument)]).AssertNoViolations(helper); - - helper.AddSnapshotHeader("Type outside of architecture"); - should = Types().That().Are(helper.ClassWithSingleAttributeWithNamedArguments).Should(); - - helper.AddSnapshotSubHeader("Conditions"); - should.NotHaveAttributeWithNamedArguments(typeof(TypeDependencyNamespace.BaseClass), ("NamedParameter1", helper.Attribute1TypeArgument)).AssertNoViolations(helper); - - helper.AddSnapshotSubHeader("Predicates"); - should.Be(Types().That().DoNotHaveAttributeWithNamedArguments(typeof(TypeDependencyNamespace.BaseClass), ("NamedParameter1", helper.Attribute1TypeArgument))).AssertNoViolations(helper); - - helper.AddSnapshotSubHeader("Predicates as conditions"); - should.BeTypesThat().DoNotHaveAttributeWithNamedArguments(typeof(TypeDependencyNamespace.BaseClass), ("NamedParameter1", helper.Attribute1TypeArgument)).AssertNoViolations(helper); - - helper.AddSnapshotHeader("Empty arguments"); - should = Types().That().Are(helper.ClassWithSingleAttributeWithNamedArguments).Should(); - - helper.AddSnapshotSubHeader("Conditions"); - should.NotHaveAttributeWithNamedArguments(helper.Attribute1, []).AssertOnlyViolations(helper); - should.NotHaveAttributeWithNamedArguments(helper.Attribute1SystemType, []).AssertOnlyViolations(helper); - - helper.AddSnapshotSubHeader("Predicates"); - should.Be(Types().That().DoNotHaveAttributeWithNamedArguments(helper.Attribute1, [])).AssertOnlyViolations(helper); - should.Be(Types().That().DoNotHaveAttributeWithNamedArguments(helper.Attribute1SystemType, [])).AssertOnlyViolations(helper); - - helper.AddSnapshotSubHeader("Predicates as conditions"); - should.BeTypesThat().DoNotHaveAttributeWithNamedArguments(helper.Attribute1, []).AssertOnlyViolations(helper); - should.BeTypesThat().DoNotHaveAttributeWithNamedArguments(helper.Attribute1SystemType, []).AssertOnlyViolations(helper); - - helper.AddSnapshotHeader("Multiple arguments"); - should = Types().That().Are(helper.ClassWithSingleAttributeWithNamedArguments).Should(); - - helper.AddSnapshotSubHeader("Conditions"); - should.NotHaveAttributeWithNamedArguments(helper.Attribute1, ("NamedParameter1", helper.Attribute1TypeArgumentSystemType), ("NamedParameter2", helper.Attribute1StringArgument)).AssertOnlyViolations(helper); - should.NotHaveAttributeWithNamedArguments(helper.Attribute1, [("NamedParameter1", helper.Attribute1TypeArgumentSystemType), ("NamedParameter2", helper.Attribute1StringArgument),]).AssertOnlyViolations(helper); - should.NotHaveAttributeWithNamedArguments(helper.Attribute1SystemType, ("NamedParameter1", helper.Attribute1TypeArgumentSystemType), ("NamedParameter2", helper.Attribute1StringArgument)).AssertOnlyViolations(helper); - should.NotHaveAttributeWithNamedArguments(helper.Attribute1SystemType, [("NamedParameter1", helper.Attribute1TypeArgumentSystemType), ("NamedParameter2", helper.Attribute1StringArgument),]).AssertOnlyViolations(helper); - - helper.AddSnapshotSubHeader("Predicates"); - should.Be(Types().That().DoNotHaveAttributeWithNamedArguments(helper.Attribute1, ("NamedParameter1", helper.Attribute1TypeArgumentSystemType), ("NamedParameter2", helper.Attribute1StringArgument))).AssertOnlyViolations(helper); - should.Be(Types().That().DoNotHaveAttributeWithNamedArguments(helper.Attribute1, [("NamedParameter1", helper.Attribute1TypeArgumentSystemType), ("NamedParameter2", helper.Attribute1StringArgument)])).AssertOnlyViolations(helper); - should.Be(Types().That().DoNotHaveAttributeWithNamedArguments(helper.Attribute1SystemType, ("NamedParameter1", helper.Attribute1TypeArgumentSystemType), ("NamedParameter2", helper.Attribute1StringArgument))).AssertOnlyViolations(helper); - should.Be(Types().That().DoNotHaveAttributeWithNamedArguments(helper.Attribute1SystemType, [("NamedParameter1", helper.Attribute1TypeArgumentSystemType), ("NamedParameter2", helper.Attribute1StringArgument)])).AssertOnlyViolations(helper); - - helper.AddSnapshotSubHeader("Predicates as conditions"); - should.BeTypesThat().DoNotHaveAttributeWithNamedArguments(helper.Attribute1, ("NamedParameter1", helper.Attribute1TypeArgumentSystemType), ("NamedParameter2", helper.Attribute1StringArgument)).AssertOnlyViolations(helper); - should.BeTypesThat().DoNotHaveAttributeWithNamedArguments(helper.Attribute1, [("NamedParameter1", helper.Attribute1TypeArgumentSystemType), ("NamedParameter2", helper.Attribute1StringArgument)]).AssertOnlyViolations(helper); - should.BeTypesThat().DoNotHaveAttributeWithNamedArguments(helper.Attribute1SystemType, ("NamedParameter1", helper.Attribute1TypeArgumentSystemType), ("NamedParameter2", helper.Attribute1StringArgument)).AssertOnlyViolations(helper); - should.BeTypesThat().DoNotHaveAttributeWithNamedArguments(helper.Attribute1SystemType, [("NamedParameter1", helper.Attribute1TypeArgumentSystemType), ("NamedParameter2", helper.Attribute1StringArgument)]).AssertOnlyViolations(helper); - - helper.AddSnapshotHeader("Multiple inputs"); - should = Types().That().Are(helper.ClassWithSingleAttributeWithNamedArguments, helper.ClassWithTwoAttributesWithNamedArguments).Should(); - - helper.AddSnapshotSubHeader("Conditions"); - should.NotHaveAttributeWithNamedArguments(helper.Attribute1, ("NamedParameter1", helper.Attribute1TypeArgumentSystemType)).AssertOnlyViolations(helper); - should.NotHaveAttributeWithNamedArguments(helper.Attribute1, [("NamedParameter1", helper.Attribute1TypeArgumentSystemType)]).AssertOnlyViolations(helper); - should.NotHaveAttributeWithNamedArguments(helper.Attribute1SystemType, ("NamedParameter1", helper.Attribute1TypeArgumentSystemType)).AssertOnlyViolations(helper); - should.NotHaveAttributeWithNamedArguments(helper.Attribute1SystemType, [("NamedParameter1", helper.Attribute1TypeArgumentSystemType)]).AssertOnlyViolations(helper); - - helper.AddSnapshotSubHeader("Predicates"); - should.Be(Types().That().DoNotHaveAttributeWithNamedArguments(helper.Attribute1, ("NamedParameter1", helper.Attribute1TypeArgumentSystemType))).AssertOnlyViolations(helper); - should.Be(Types().That().DoNotHaveAttributeWithNamedArguments(helper.Attribute1, [("NamedParameter1", helper.Attribute1TypeArgumentSystemType)])).AssertOnlyViolations(helper); - should.Be(Types().That().DoNotHaveAttributeWithNamedArguments(helper.Attribute1SystemType, ("NamedParameter1", helper.Attribute1TypeArgumentSystemType))).AssertOnlyViolations(helper); - should.Be(Types().That().DoNotHaveAttributeWithNamedArguments(helper.Attribute1SystemType, [("NamedParameter1", helper.Attribute1TypeArgumentSystemType)])).AssertOnlyViolations(helper); - - helper.AddSnapshotSubHeader("Predicates as conditions"); - should.BeTypesThat().DoNotHaveAttributeWithNamedArguments(helper.Attribute1, ("NamedParameter1", helper.Attribute1TypeArgumentSystemType)).AssertOnlyViolations(helper); - should.BeTypesThat().DoNotHaveAttributeWithNamedArguments(helper.Attribute1, [("NamedParameter1", helper.Attribute1TypeArgumentSystemType)]).AssertOnlyViolations(helper); - should.BeTypesThat().DoNotHaveAttributeWithNamedArguments(helper.Attribute1SystemType, ("NamedParameter1", helper.Attribute1TypeArgumentSystemType)).AssertOnlyViolations(helper); - should.BeTypesThat().DoNotHaveAttributeWithNamedArguments(helper.Attribute1SystemType, [("NamedParameter1", helper.Attribute1TypeArgumentSystemType)]).AssertOnlyViolations(helper); - - await helper.AssertSnapshotMatches(); - } - - [Fact] - public async Task NotHaveNameTest() - { - var helper = new DependencyAssemblyTestHelper(); - - helper.AddSnapshotHeader("No violations"); - var should = Types().That().Are(helper.BaseClass).Should(); - - helper.AddSnapshotSubHeader("Conditions"); - should.NotHaveName(helper.BaseClass.FullName).AssertNoViolations(helper); - should.NotHaveNameMatching("^.*\\.Base.*$").AssertNoViolations(helper); - should.NotHaveFullName(helper.BaseClass.Name).AssertNoViolations(helper); - should.NotHaveFullNameMatching("^Base.*$").AssertNoViolations(helper); - should.NotHaveNameContaining(helper.BaseClass.Namespace.Name).AssertNoViolations(helper); - should.NotHaveFullNameContaining(helper.NonExistentObjectName).AssertNoViolations(helper); - should.NotHaveNameStartingWith(helper.BaseClass.Namespace.Name).AssertNoViolations(helper); - should.NotHaveNameEndingWith("Test").AssertNoViolations(helper); - - helper.AddSnapshotSubHeader("Predicates"); - should.Be(Types().That().DoNotHaveName(helper.BaseClass.FullName)).AssertNoViolations(helper); - should.Be(Types().That().DoNotHaveNameMatching("^.*\\.Base.*$")).AssertNoViolations(helper); - should.Be(Types().That().DoNotHaveFullName(helper.BaseClass.Name)).AssertNoViolations(helper); - should.Be(Types().That().DoNotHaveFullNameMatching("^Base.*$")).AssertNoViolations(helper); - should.Be(Types().That().DoNotHaveNameContaining(helper.BaseClass.Namespace.Name)).AssertNoViolations(helper); - should.Be(Types().That().DoNotHaveFullNameContaining(helper.NonExistentObjectName)).AssertNoViolations(helper); - should.Be(Types().That().DoNotHaveNameStartingWith(helper.BaseClass.Namespace.Name)).AssertNoViolations(helper); - should.Be(Types().That().DoNotHaveNameEndingWith("Test")).AssertNoViolations(helper); - - helper.AddSnapshotSubHeader("Predicates as conditions"); - should.BeTypesThat().DoNotHaveName(helper.BaseClass.FullName).AssertNoViolations(helper); - should.BeTypesThat().DoNotHaveNameMatching("^.*\\.Base.*$").AssertNoViolations(helper); - should.BeTypesThat().DoNotHaveFullName(helper.BaseClass.Name).AssertNoViolations(helper); - should.BeTypesThat().DoNotHaveFullNameMatching("^Base.*$").AssertNoViolations(helper); - should.BeTypesThat().DoNotHaveNameContaining(helper.BaseClass.Namespace.Name).AssertNoViolations(helper); - should.BeTypesThat().DoNotHaveFullNameContaining(helper.NonExistentObjectName).AssertNoViolations(helper); - should.BeTypesThat().DoNotHaveNameStartingWith(helper.BaseClass.Namespace.Name).AssertNoViolations(helper); - should.BeTypesThat().DoNotHaveNameEndingWith("Test").AssertNoViolations(helper); - - helper.AddSnapshotHeader("Violations"); - should = Types().That().Are(helper.BaseClass).Should(); - - helper.AddSnapshotSubHeader("Conditions"); - should.NotHaveName(helper.BaseClass.Name).AssertOnlyViolations(helper); - should.NotHaveNameMatching("^Base.*$").AssertOnlyViolations(helper); - should.NotHaveFullName(helper.BaseClass.FullName).AssertOnlyViolations(helper); - should.NotHaveFullNameMatching("^.*\\.Base.*$").AssertOnlyViolations(helper); - should.NotHaveNameContaining(helper.BaseClass.Name).AssertOnlyViolations(helper); - should.NotHaveFullNameContaining(helper.BaseClass.Namespace.Name).AssertOnlyViolations(helper); - should.NotHaveNameStartingWith(helper.BaseClass.Name).AssertOnlyViolations(helper); - should.NotHaveNameEndingWith(helper.BaseClass.Name).AssertOnlyViolations(helper); - - helper.AddSnapshotSubHeader("Predicates"); - should.Be(Types().That().DoNotHaveName(helper.BaseClass.Name)).AssertOnlyViolations(helper); - should.Be(Types().That().DoNotHaveNameMatching("^Base.*$")).AssertOnlyViolations(helper); - should.Be(Types().That().DoNotHaveFullName(helper.BaseClass.FullName)).AssertOnlyViolations(helper); - should.Be(Types().That().DoNotHaveFullNameMatching("^.*\\.Base.*$")).AssertOnlyViolations(helper); - should.Be(Types().That().DoNotHaveNameContaining(helper.BaseClass.Name)).AssertOnlyViolations(helper); - should.Be(Types().That().DoNotHaveFullNameContaining(helper.BaseClass.Namespace.Name)).AssertOnlyViolations(helper); - should.Be(Types().That().DoNotHaveNameStartingWith(helper.BaseClass.Name)).AssertOnlyViolations(helper); - should.Be(Types().That().DoNotHaveNameEndingWith(helper.BaseClass.Name)).AssertOnlyViolations(helper); - - helper.AddSnapshotSubHeader("Predicates as conditions"); - should.BeTypesThat().DoNotHaveName(helper.BaseClass.Name).AssertOnlyViolations(helper); - should.BeTypesThat().DoNotHaveNameMatching("^Base.*$").AssertOnlyViolations(helper); - should.BeTypesThat().DoNotHaveFullName(helper.BaseClass.FullName).AssertOnlyViolations(helper); - should.BeTypesThat().DoNotHaveFullNameMatching("^.*\\.Base.*$").AssertOnlyViolations(helper); - should.BeTypesThat().DoNotHaveNameContaining(helper.BaseClass.Name).AssertOnlyViolations(helper); - should.BeTypesThat().DoNotHaveFullNameContaining(helper.BaseClass.Namespace.Name).AssertOnlyViolations(helper); - should.BeTypesThat().DoNotHaveNameStartingWith(helper.BaseClass.Name).AssertOnlyViolations(helper); - should.BeTypesThat().DoNotHaveNameEndingWith(helper.BaseClass.Name).AssertOnlyViolations(helper); - - await helper.AssertSnapshotMatches(); - } - - [Fact] - public async Task OnlyDependOnTest() - { - var helper = new DependencyAssemblyTestHelper(); - - helper.AddSnapshotHeader("No violations"); - var should = Types().That().Are(helper.ChildClass).Should(); - - helper.AddSnapshotSubHeader("Conditions"); - should.OnlyDependOn(helper.BaseClass).AssertNoViolations(helper); - should.OnlyDependOn(helper.BaseClassSystemType).AssertNoViolations(helper); - should.OnlyDependOn(Classes().That().Are(helper.BaseClass)).AssertNoViolations(helper); - should.OnlyDependOn([helper.BaseClass]).AssertNoViolations(helper); - should.OnlyDependOn([helper.BaseClassSystemType]).AssertNoViolations(helper); - - helper.AddSnapshotSubHeader("Predicates"); - should.Be(Types().That().OnlyDependOn(helper.BaseClass)).AssertNoViolations(helper); - should.Be(Types().That().OnlyDependOn(helper.BaseClassSystemType)).AssertNoViolations(helper); - should.Be(Types().That().OnlyDependOn(Classes().That().Are(helper.BaseClass))).AssertNoViolations(helper); - should.Be(Types().That().OnlyDependOn([helper.BaseClass])).AssertNoViolations(helper); - should.Be(Types().That().OnlyDependOn([helper.BaseClassSystemType])).AssertNoViolations(helper); - - helper.AddSnapshotSubHeader("Predicates as conditions"); - should.BeTypesThat().OnlyDependOn(helper.BaseClass).AssertNoViolations(helper); - should.BeTypesThat().OnlyDependOn(helper.BaseClassSystemType).AssertNoViolations(helper); - should.BeTypesThat().OnlyDependOn(Classes().That().Are(helper.BaseClass)).AssertNoViolations(helper); - should.BeTypesThat().OnlyDependOn([helper.BaseClass]).AssertNoViolations(helper); - should.BeTypesThat().OnlyDependOn([helper.BaseClassSystemType]).AssertNoViolations(helper); - - helper.AddSnapshotHeader("Violations"); - should = Types().That().Are(helper.ClassWithMultipleDependencies).Should(); - - helper.AddSnapshotSubHeader("Conditions"); - should.OnlyDependOn(helper.BaseClass).AssertOnlyViolations(helper); - should.OnlyDependOn(helper.BaseClassSystemType).AssertOnlyViolations(helper); - should.OnlyDependOn(Classes().That().Are(helper.BaseClass)).AssertOnlyViolations(helper); - should.OnlyDependOn([helper.BaseClass]).AssertOnlyViolations(helper); - should.OnlyDependOn([helper.BaseClassSystemType]).AssertOnlyViolations(helper); - - helper.AddSnapshotSubHeader("Predicates"); - should.Be(Types().That().OnlyDependOn(helper.BaseClass)).AssertOnlyViolations(helper); - should.Be(Types().That().OnlyDependOn(helper.BaseClassSystemType)).AssertOnlyViolations(helper); - should.Be(Types().That().OnlyDependOn(Classes().That().Are(helper.BaseClass))).AssertOnlyViolations(helper); - should.Be(Types().That().OnlyDependOn([helper.BaseClass])).AssertOnlyViolations(helper); - should.Be(Types().That().OnlyDependOn([helper.BaseClassSystemType])).AssertOnlyViolations(helper); - - helper.AddSnapshotHeader("Type outside of architecture"); - should = Types().That().Are(helper.ClassWithMultipleDependencies).Should(); - - helper.AddSnapshotSubHeader("Conditions"); - should.OnlyDependOn(typeof(AttributeNamespace.ClassWithoutAttributes)).AssertException(helper); - - helper.AddSnapshotSubHeader("Predicates"); - should.Be(Types().That().OnlyDependOn(typeof(AttributeNamespace.ClassWithoutAttributes))).AssertOnlyViolations(helper); - - helper.AddSnapshotSubHeader("Predicates as conditions"); - should.BeTypesThat().OnlyDependOn(typeof(AttributeNamespace.ClassWithoutAttributes)).AssertOnlyViolations(helper); - - helper.AddSnapshotHeader("Empty arguments"); - should = Types().That().Are(helper.ClassWithMultipleDependencies).Should(); - - helper.AddSnapshotSubHeader("Conditions"); - should.OnlyDependOn(new List()).AssertOnlyViolations(helper); - should.OnlyDependOn(new List()).AssertOnlyViolations(helper); - should.OnlyDependOn(Classes().That().HaveFullName(helper.NonExistentObjectName)).AssertOnlyViolations(helper); - - helper.AddSnapshotSubHeader("Predicates"); - should.Be(Types().That().OnlyDependOn(new List())).AssertOnlyViolations(helper); - should.Be(Types().That().OnlyDependOn(new List())).AssertOnlyViolations(helper); - should.Be(Types().That().OnlyDependOn(Classes().That().HaveFullName(helper.NonExistentObjectName))).AssertOnlyViolations(helper); - - helper.AddSnapshotSubHeader("Predicates as conditions"); - should.BeTypesThat().OnlyDependOn(new List()).AssertOnlyViolations(helper); - should.BeTypesThat().OnlyDependOn(new List()).AssertOnlyViolations(helper); - should.BeTypesThat().OnlyDependOn(Classes().That().HaveFullName(helper.NonExistentObjectName)).AssertOnlyViolations(helper); - - helper.AddSnapshotHeader("Multiple arguments"); - should = Types().That().Are(helper.ClassWithMultipleDependencies).Should(); - - helper.AddSnapshotSubHeader("Conditions"); - should.OnlyDependOn(helper.BaseClass, helper.OtherBaseClass).AssertOnlyViolations(helper); - should.OnlyDependOn([helper.BaseClass, helper.OtherBaseClass]).AssertOnlyViolations(helper); - should.OnlyDependOn(helper.BaseClassSystemType, helper.OtherBaseClassSystemType).AssertOnlyViolations(helper); - should.OnlyDependOn([helper.BaseClassSystemType, helper.OtherBaseClassSystemType]).AssertOnlyViolations(helper); - should.OnlyDependOn(Classes().That().Are(helper.BaseClass, helper.OtherBaseClass)).AssertOnlyViolations(helper); - - helper.AddSnapshotSubHeader("Predicates"); - should.Be(Types().That().OnlyDependOn(helper.BaseClass, helper.OtherBaseClass)).AssertOnlyViolations(helper); - should.Be(Types().That().OnlyDependOn([helper.BaseClass, helper.OtherBaseClass])).AssertOnlyViolations(helper); - should.Be(Types().That().OnlyDependOn(helper.BaseClassSystemType, helper.OtherBaseClassSystemType)).AssertOnlyViolations(helper); - should.Be(Types().That().OnlyDependOn([helper.BaseClassSystemType, helper.OtherBaseClassSystemType])).AssertOnlyViolations(helper); - should.Be(Types().That().OnlyDependOn(Classes().That().Are(helper.BaseClass, helper.OtherBaseClass))).AssertOnlyViolations(helper); - - helper.AddSnapshotSubHeader("Predicates as conditions"); - should.BeTypesThat().OnlyDependOn(helper.BaseClass, helper.OtherBaseClass).AssertOnlyViolations(helper); - should.BeTypesThat().OnlyDependOn([helper.BaseClass, helper.OtherBaseClass]).AssertOnlyViolations(helper); - should.BeTypesThat().OnlyDependOn(helper.BaseClassSystemType, helper.OtherBaseClassSystemType).AssertOnlyViolations(helper); - should.BeTypesThat().OnlyDependOn([helper.BaseClassSystemType, helper.OtherBaseClassSystemType]).AssertOnlyViolations(helper); - should.BeTypesThat().OnlyDependOn(Classes().That().Are(helper.BaseClass, helper.OtherBaseClass)).AssertOnlyViolations(helper); - - await helper.AssertSnapshotMatches(); - } - - [Fact] - public async Task OnlyDependOnTypesThatTest() - { - var helper = new DependencyAssemblyTestHelper(); - helper.AddSnapshotHeader("No violations"); - var should = Types().That().Are(helper.ChildClass).Should(); - should.OnlyDependOnTypesThat().Are(helper.BaseClass).AssertNoViolations(helper); - - helper.AddSnapshotHeader("Violations"); - should = Types().That().Are(helper.ClassWithMultipleDependencies).Should(); - should.OnlyDependOnTypesThat().Are(helper.BaseClass).AssertOnlyViolations(helper); - await helper.AssertSnapshotMatches(); - } - - [Fact] - public async Task OnlyHaveAttributesTest() - { - var helper = new AttributeAssemblyTestHelpers(); - - helper.AddSnapshotHeader("No violations"); - var should = Types().That().Are(helper.ClassWithSingleAttribute).Should(); - - helper.AddSnapshotSubHeader("Conditions"); - should.OnlyHaveAttributes(helper.Attribute1).AssertNoViolations(helper); - should.OnlyHaveAttributes([helper.Attribute1]).AssertNoViolations(helper); - should.OnlyHaveAttributes(helper.Attribute1SystemType).AssertNoViolations(helper); - should.OnlyHaveAttributes([helper.Attribute1SystemType]).AssertNoViolations(helper); - should.OnlyHaveAttributes(Attributes().That().Are(helper.Attribute1)).AssertNoViolations(helper); - - helper.AddSnapshotSubHeader("Predicates"); - should.Be(Types().That().OnlyHaveAttributes(helper.Attribute1)).AssertNoViolations(helper); - should.Be(Types().That().OnlyHaveAttributes([helper.Attribute1])).AssertNoViolations(helper); - should.Be(Types().That().OnlyHaveAttributes(helper.Attribute1SystemType)).AssertNoViolations(helper); - should.Be(Types().That().OnlyHaveAttributes([helper.Attribute1SystemType])).AssertNoViolations(helper); - should.Be(Types().That().OnlyHaveAttributes(Attributes().That().Are(helper.Attribute1))).AssertNoViolations(helper); - - helper.AddSnapshotSubHeader("Predicates as conditions"); - should.BeTypesThat().OnlyHaveAttributes(helper.Attribute1).AssertNoViolations(helper); - should.BeTypesThat().OnlyHaveAttributes([helper.Attribute1]).AssertNoViolations(helper); - should.BeTypesThat().OnlyHaveAttributes(helper.Attribute1SystemType).AssertNoViolations(helper); - should.BeTypesThat().OnlyHaveAttributes([helper.Attribute1SystemType]).AssertNoViolations(helper); - should.BeTypesThat().OnlyHaveAttributes(Attributes().That().Are(helper.Attribute1)).AssertNoViolations(helper); - - helper.AddSnapshotHeader("Violations"); - should = Types().That().Are(helper.ClassWithSingleAttribute).Should(); - - helper.AddSnapshotSubHeader("Conditions"); - should.OnlyHaveAttributes(helper.UnusedAttribute).AssertOnlyViolations(helper); - should.OnlyHaveAttributes([helper.UnusedAttribute]).AssertOnlyViolations(helper); - should.OnlyHaveAttributes(helper.UnusedAttributeSystemType).AssertOnlyViolations(helper); - should.OnlyHaveAttributes([helper.UnusedAttributeSystemType]).AssertOnlyViolations(helper); - should.OnlyHaveAttributes(Attributes().That().Are(helper.UnusedAttribute)).AssertOnlyViolations(helper); - - helper.AddSnapshotSubHeader("Predicates"); - should.Be(Types().That().OnlyHaveAttributes(helper.UnusedAttribute)).AssertOnlyViolations(helper); - should.Be(Types().That().OnlyHaveAttributes([helper.UnusedAttribute])).AssertOnlyViolations(helper); - should.Be(Types().That().OnlyHaveAttributes(helper.UnusedAttributeSystemType)).AssertOnlyViolations(helper); - should.Be(Types().That().OnlyHaveAttributes([helper.UnusedAttributeSystemType])).AssertOnlyViolations(helper); - should.Be(Types().That().OnlyHaveAttributes(Attributes().That().Are(helper.UnusedAttribute))).AssertOnlyViolations(helper); - - helper.AddSnapshotHeader("Attribute outside of architecture"); - should = Types().That().Are(helper.ClassWithSingleAttribute).Should(); - - helper.AddSnapshotSubHeader("Conditions"); - should.OnlyHaveAttributes(typeof(TypeDependencyNamespace.BaseClass)).AssertException(helper); - - helper.AddSnapshotSubHeader("Predicates"); - should.Be(Types().That().OnlyHaveAttributes(typeof(TypeDependencyNamespace.BaseClass))).AssertOnlyViolations(helper); - - helper.AddSnapshotSubHeader("Predicates as conditions"); - should.BeTypesThat().OnlyHaveAttributes(typeof(TypeDependencyNamespace.BaseClass)).AssertOnlyViolations(helper); - - helper.AddSnapshotHeader("Empty arguments"); - should = Types().That().Are(helper.ClassWithSingleAttribute).Should(); - - helper.AddSnapshotSubHeader("Conditions"); - should.OnlyHaveAttributes(new List()).AssertOnlyViolations(helper); - should.OnlyHaveAttributes(new List()).AssertOnlyViolations(helper); - should.OnlyHaveAttributes(Attributes().That().HaveFullName(helper.NonExistentObjectName)).AssertOnlyViolations(helper); - - helper.AddSnapshotSubHeader("Predicates"); - should.Be(Types().That().OnlyHaveAttributes(new List())).AssertOnlyViolations(helper); - should.Be(Types().That().OnlyHaveAttributes(new List())).AssertOnlyViolations(helper); - should.Be(Types().That().OnlyHaveAttributes(Attributes().That().HaveFullName(helper.NonExistentObjectName))).AssertOnlyViolations(helper); - - helper.AddSnapshotSubHeader("Predicates as conditions"); - should.BeTypesThat().OnlyHaveAttributes(new List()).AssertOnlyViolations(helper); - should.BeTypesThat().OnlyHaveAttributes(new List()).AssertOnlyViolations(helper); - should.BeTypesThat().OnlyHaveAttributes(Attributes().That().HaveFullName(helper.NonExistentObjectName)).AssertOnlyViolations(helper); - - helper.AddSnapshotHeader("Multiple arguments"); - should = Types().That().Are(helper.ClassWithTwoAttributes).Should(); - - helper.AddSnapshotSubHeader("Conditions"); - should.OnlyHaveAttributes(helper.Attribute1, helper.Attribute2).AssertNoViolations(helper); - should.OnlyHaveAttributes([helper.Attribute1, helper.Attribute2]).AssertNoViolations(helper); - should.OnlyHaveAttributes(helper.Attribute1SystemType, helper.Attribute2SystemType).AssertNoViolations(helper); - should.OnlyHaveAttributes([helper.Attribute1SystemType, helper.Attribute2SystemType]).AssertNoViolations(helper); - should.OnlyHaveAttributes(Attributes().That().Are(helper.Attribute1, helper.Attribute2)).AssertNoViolations(helper); - - helper.AddSnapshotSubHeader("Predicates"); - should.Be(Types().That().OnlyHaveAttributes(helper.Attribute1, helper.Attribute2)).AssertNoViolations(helper); - should.Be(Types().That().OnlyHaveAttributes([helper.Attribute1, helper.Attribute2])).AssertNoViolations(helper); - should.Be(Types().That().OnlyHaveAttributes(helper.Attribute1SystemType, helper.Attribute2SystemType)).AssertNoViolations(helper); - should.Be(Types().That().OnlyHaveAttributes([helper.Attribute1SystemType, helper.Attribute2SystemType])).AssertNoViolations(helper); - should.Be(Types().That().OnlyHaveAttributes(Attributes().That().Are(helper.Attribute1, helper.Attribute2))).AssertNoViolations(helper); - - helper.AddSnapshotSubHeader("Predicates as conditions"); - should.BeTypesThat().OnlyHaveAttributes(helper.Attribute1, helper.Attribute2).AssertNoViolations(helper); - should.BeTypesThat().OnlyHaveAttributes([helper.Attribute1, helper.Attribute2]).AssertNoViolations(helper); - should.BeTypesThat().OnlyHaveAttributes(helper.Attribute1SystemType, helper.Attribute2SystemType).AssertNoViolations(helper); - should.BeTypesThat().OnlyHaveAttributes([helper.Attribute1SystemType, helper.Attribute2SystemType]).AssertNoViolations(helper); - should.BeTypesThat().OnlyHaveAttributes(Attributes().That().Are(helper.Attribute1, helper.Attribute2)).AssertNoViolations(helper); - - helper.AddSnapshotHeader("Multiple inputs"); - should = Types().That().Are(helper.ClassWithSingleAttribute, helper.ClassWithTwoAttributes).Should(); - - helper.AddSnapshotSubHeader("Conditions"); - should.OnlyHaveAttributes(helper.Attribute1).AssertAnyViolations(helper); - should.OnlyHaveAttributes(helper.Attribute2).AssertOnlyViolations(helper); - - helper.AddSnapshotSubHeader("Predicates"); - should.Be(Types().That().OnlyHaveAttributes(helper.Attribute1)).AssertAnyViolations(helper); - should.Be(Types().That().OnlyHaveAttributes(helper.Attribute2)).AssertOnlyViolations(helper); - - helper.AddSnapshotSubHeader("Predicates as conditions"); - should.BeTypesThat().OnlyHaveAttributes(helper.Attribute1).AssertAnyViolations(helper); - should.BeTypesThat().OnlyHaveAttributes(helper.Attribute2).AssertOnlyViolations(helper); - - await helper.AssertSnapshotMatches(); - } - - [Fact] - public async Task OnlyHaveAttributesThatTest() - { - var helper = new AttributeAssemblyTestHelpers(); - helper.AddSnapshotHeader("No violations"); - var should = Types().That().Are(helper.ClassWithSingleAttribute).Should(); - should.OnlyHaveAttributesThat().Are(helper.Attribute1).AssertNoViolations(helper); - - helper.AddSnapshotHeader("Violations"); - should = Types().That().Are(helper.ClassWithSingleAttribute).Should(); - should.OnlyHaveAttributesThat().Are(helper.UnusedAttribute).AssertOnlyViolations(helper); - await helper.AssertSnapshotMatches(); - } - - [Fact] - public void VisibilityTest() - { - var visibilityRules = new List - { - Types().That().ArePrivate().Should().BePrivate(), - Types().That().ArePrivate().Should().BeTypesThat().ArePrivate(), - Types().That().ArePublic().Should().BePublic(), - Types().That().ArePublic().Should().BeTypesThat().ArePublic(), - Types().That().AreProtected().Should().BeProtected(), - Types().That().AreProtected().Should().BeTypesThat().AreProtected(), - Types().That().AreInternal().Should().BeInternal(), - Types().That().AreInternal().Should().BeTypesThat().AreInternal(), - Types().That().AreProtectedInternal().Should().BeProtectedInternal(), - Types().That().AreProtectedInternal().Should().BeTypesThat().AreProtectedInternal(), - Types().That().ArePrivateProtected().Should().BePrivateProtected(), - Types().That().ArePrivateProtected().Should().BeTypesThat().ArePrivateProtected(), - Types().That().AreNotPrivate().Should().NotBePrivate(), - Types().That().AreNotPrivate().Should().BeTypesThat().AreNotPrivate(), - Types().That().AreNotPublic().Should().NotBePublic(), - Types().That().AreNotPublic().Should().BeTypesThat().AreNotPublic(), - Types().That().AreNotProtected().Should().NotBeProtected(), - Types().That().AreNotProtected().Should().BeTypesThat().AreNotProtected(), - Types().That().AreNotInternal().Should().NotBeInternal(), - Types().That().AreNotInternal().Should().BeTypesThat().AreNotInternal(), - Types().That().AreNotProtectedInternal().Should().NotBeProtectedInternal(), - Types().That().AreNotProtectedInternal().Should().BeTypesThat().AreNotProtectedInternal(), - Types().That().AreNotPrivateProtected().Should().NotBePrivateProtected(), - Types().That().AreNotPrivateProtected().Should().BeTypesThat().AreNotPrivateProtected(), - Types().That().ArePrivate().Should().NotBePublic().AndShould().NotBeProtected().AndShould().NotBeInternal().AndShould().NotBeProtectedInternal().AndShould().NotBePrivateProtected(), - Types().That().ArePublic().Should().NotBePrivate().AndShould().NotBeProtected().AndShould().NotBeInternal().AndShould().NotBeProtectedInternal().AndShould().NotBePrivateProtected(), - Types().That().AreProtected().Should().NotBePublic().AndShould().NotBePrivate().AndShould().NotBeInternal().AndShould().NotBeProtectedInternal().AndShould().NotBePrivateProtected(), - Types().That().AreInternal().Should().NotBePublic().AndShould().NotBeProtected().AndShould().NotBePrivate().AndShould().NotBeProtectedInternal().AndShould().NotBePrivateProtected(), - Types().That().AreProtectedInternal().Should().NotBePublic().AndShould().NotBeProtected().AndShould().NotBeInternal().AndShould().NotBePrivate().AndShould().NotBePrivateProtected(), - Types().That().ArePrivateProtected().Should().NotBePublic().AndShould().NotBeProtected().AndShould().NotBeInternal().AndShould().NotBeProtectedInternal().AndShould().NotBePrivate(), - Types().That().AreNotPrivate().Should().BePublic().OrShould().BeProtected().OrShould().BeInternal().OrShould().BeProtectedInternal().OrShould().BePrivateProtected(), - Types().That().AreNotPublic().Should().BePrivate().OrShould().BeProtected().OrShould().BeInternal().OrShould().BeProtectedInternal().OrShould().BePrivateProtected(), - Types().That().AreNotProtected().Should().BePublic().OrShould().BePrivate().OrShould().BeInternal().OrShould().BeProtectedInternal().OrShould().BePrivateProtected(), - Types().That().AreNotInternal().Should().BePublic().OrShould().BeProtected().OrShould().BePrivate().OrShould().BeProtectedInternal().OrShould().BePrivateProtected(), - Types().That().AreNotProtectedInternal().Should().BePublic().OrShould().BeProtected().OrShould().BeInternal().OrShould().BePrivate().OrShould().BePrivateProtected(), - Types().That().AreNotPrivateProtected().Should().BePublic().OrShould().BeProtected().OrShould().BeInternal().OrShould().BeProtectedInternal().OrShould().BePrivate(), - }; - - foreach (var visibilityRule in visibilityRules) - { - Assert.True( - visibilityRule.HasNoViolations(StaticTestArchitectures.VisibilityArchitecture) - ); - } - } -} diff --git a/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.AreTest.verified.txt b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectSyntaxElementsTests.AreTest.verified.txt similarity index 100% rename from ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.AreTest.verified.txt rename to ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectSyntaxElementsTests.AreTest.verified.txt diff --git a/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.BeInternalTest.verified.txt b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectSyntaxElementsTests.BeInternalTest.verified.txt similarity index 100% rename from ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.BeInternalTest.verified.txt rename to ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectSyntaxElementsTests.BeInternalTest.verified.txt diff --git a/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.BePrivateProtectedTest.verified.txt b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectSyntaxElementsTests.BePrivateProtectedTest.verified.txt similarity index 100% rename from ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.BePrivateProtectedTest.verified.txt rename to ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectSyntaxElementsTests.BePrivateProtectedTest.verified.txt diff --git a/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.BePrivateTest.verified.txt b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectSyntaxElementsTests.BePrivateTest.verified.txt similarity index 100% rename from ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.BePrivateTest.verified.txt rename to ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectSyntaxElementsTests.BePrivateTest.verified.txt diff --git a/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.BeProtectedInternalTest.verified.txt b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectSyntaxElementsTests.BeProtectedInternalTest.verified.txt similarity index 100% rename from ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.BeProtectedInternalTest.verified.txt rename to ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectSyntaxElementsTests.BeProtectedInternalTest.verified.txt diff --git a/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.BeProtectedTest.verified.txt b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectSyntaxElementsTests.BeProtectedTest.verified.txt similarity index 100% rename from ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.BeProtectedTest.verified.txt rename to ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectSyntaxElementsTests.BeProtectedTest.verified.txt diff --git a/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.BePublicTest.verified.txt b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectSyntaxElementsTests.BePublicTest.verified.txt similarity index 100% rename from ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.BePublicTest.verified.txt rename to ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectSyntaxElementsTests.BePublicTest.verified.txt diff --git a/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.BeTest.verified.txt b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectSyntaxElementsTests.BeTest.verified.txt similarity index 100% rename from ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.BeTest.verified.txt rename to ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectSyntaxElementsTests.BeTest.verified.txt diff --git a/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.BeTypesThatTest.verified.txt b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectSyntaxElementsTests.BeTypesThatTest.verified.txt similarity index 100% rename from ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.BeTypesThatTest.verified.txt rename to ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectSyntaxElementsTests.BeTypesThatTest.verified.txt diff --git a/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.CallAnyTest.verified.txt b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectSyntaxElementsTests.CallAnyTest.verified.txt similarity index 100% rename from ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.CallAnyTest.verified.txt rename to ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectSyntaxElementsTests.CallAnyTest.verified.txt diff --git a/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.DependOnAnyTest.verified.txt b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectSyntaxElementsTests.DependOnAnyTest.verified.txt similarity index 100% rename from ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.DependOnAnyTest.verified.txt rename to ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectSyntaxElementsTests.DependOnAnyTest.verified.txt diff --git a/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.DependOnAnyTypesThatTest.verified.txt b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectSyntaxElementsTests.DependOnAnyTypesThatTest.verified.txt similarity index 100% rename from ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.DependOnAnyTypesThatTest.verified.txt rename to ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectSyntaxElementsTests.DependOnAnyTypesThatTest.verified.txt diff --git a/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.ExistTest.verified.txt b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectSyntaxElementsTests.ExistTest.verified.txt similarity index 100% rename from ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.ExistTest.verified.txt rename to ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectSyntaxElementsTests.ExistTest.verified.txt diff --git a/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.FollowCustomConditionTest.verified.txt b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectSyntaxElementsTests.FollowCustomConditionTest.verified.txt similarity index 100% rename from ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.FollowCustomConditionTest.verified.txt rename to ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectSyntaxElementsTests.FollowCustomConditionTest.verified.txt diff --git a/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.FollowCustomPredicateTest.verified.txt b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectSyntaxElementsTests.FollowCustomPredicateTest.verified.txt similarity index 100% rename from ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.FollowCustomPredicateTest.verified.txt rename to ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectSyntaxElementsTests.FollowCustomPredicateTest.verified.txt diff --git a/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.HaveAnyAttributesTest.verified.txt b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectSyntaxElementsTests.HaveAnyAttributesTest.verified.txt similarity index 100% rename from ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.HaveAnyAttributesTest.verified.txt rename to ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectSyntaxElementsTests.HaveAnyAttributesTest.verified.txt diff --git a/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.HaveAnyAttributesThatTest.verified.txt b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectSyntaxElementsTests.HaveAnyAttributesThatTest.verified.txt similarity index 100% rename from ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.HaveAnyAttributesThatTest.verified.txt rename to ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectSyntaxElementsTests.HaveAnyAttributesThatTest.verified.txt diff --git a/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.HaveAnyAttributesWithArgumentsTest.verified.txt b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectSyntaxElementsTests.HaveAnyAttributesWithArgumentsTest.verified.txt similarity index 100% rename from ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.HaveAnyAttributesWithArgumentsTest.verified.txt rename to ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectSyntaxElementsTests.HaveAnyAttributesWithArgumentsTest.verified.txt diff --git a/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.HaveAnyAttributesWithNamedArguments.verified.txt b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectSyntaxElementsTests.HaveAnyAttributesWithNamedArguments.verified.txt similarity index 100% rename from ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.HaveAnyAttributesWithNamedArguments.verified.txt rename to ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectSyntaxElementsTests.HaveAnyAttributesWithNamedArguments.verified.txt diff --git a/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.HaveAttributeWithArgumentsTest.verified.txt b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectSyntaxElementsTests.HaveAttributeWithArgumentsTest.verified.txt similarity index 100% rename from ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.HaveAttributeWithArgumentsTest.verified.txt rename to ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectSyntaxElementsTests.HaveAttributeWithArgumentsTest.verified.txt diff --git a/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.HaveAttributeWithNamedArguments.verified.txt b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectSyntaxElementsTests.HaveAttributeWithNamedArguments.verified.txt similarity index 100% rename from ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.HaveAttributeWithNamedArguments.verified.txt rename to ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectSyntaxElementsTests.HaveAttributeWithNamedArguments.verified.txt diff --git a/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.HaveNameTest.verified.txt b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectSyntaxElementsTests.HaveNameTest.verified.txt similarity index 100% rename from ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.HaveNameTest.verified.txt rename to ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectSyntaxElementsTests.HaveNameTest.verified.txt diff --git a/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.NotBeTest.verified.txt b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectSyntaxElementsTests.NotBeTest.verified.txt similarity index 100% rename from ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.NotBeTest.verified.txt rename to ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectSyntaxElementsTests.NotBeTest.verified.txt diff --git a/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.NotCallAnyTest.verified.txt b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectSyntaxElementsTests.NotCallAnyTest.verified.txt similarity index 100% rename from ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.NotCallAnyTest.verified.txt rename to ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectSyntaxElementsTests.NotCallAnyTest.verified.txt diff --git a/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.NotDependOnAnyTest.verified.txt b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectSyntaxElementsTests.NotDependOnAnyTest.verified.txt similarity index 100% rename from ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.NotDependOnAnyTest.verified.txt rename to ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectSyntaxElementsTests.NotDependOnAnyTest.verified.txt diff --git a/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.NotDependOnAnyTypesThatTest.verified.txt b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectSyntaxElementsTests.NotDependOnAnyTypesThatTest.verified.txt similarity index 100% rename from ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.NotDependOnAnyTypesThatTest.verified.txt rename to ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectSyntaxElementsTests.NotDependOnAnyTypesThatTest.verified.txt diff --git a/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.NotExistTest.verified.txt b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectSyntaxElementsTests.NotExistTest.verified.txt similarity index 100% rename from ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.NotExistTest.verified.txt rename to ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectSyntaxElementsTests.NotExistTest.verified.txt diff --git a/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.NotHaveAnyAttributesTest.verified.txt b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectSyntaxElementsTests.NotHaveAnyAttributesTest.verified.txt similarity index 100% rename from ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.NotHaveAnyAttributesTest.verified.txt rename to ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectSyntaxElementsTests.NotHaveAnyAttributesTest.verified.txt diff --git a/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.NotHaveAnyAttributesThatTest.verified.txt b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectSyntaxElementsTests.NotHaveAnyAttributesThatTest.verified.txt similarity index 100% rename from ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.NotHaveAnyAttributesThatTest.verified.txt rename to ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectSyntaxElementsTests.NotHaveAnyAttributesThatTest.verified.txt diff --git a/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.NotHaveAnyAttributesWithArgumentsTest.verified.txt b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectSyntaxElementsTests.NotHaveAnyAttributesWithArgumentsTest.verified.txt similarity index 100% rename from ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.NotHaveAnyAttributesWithArgumentsTest.verified.txt rename to ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectSyntaxElementsTests.NotHaveAnyAttributesWithArgumentsTest.verified.txt diff --git a/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.NotHaveAnyAttributesWithNamedArgumentsTest.verified.txt b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectSyntaxElementsTests.NotHaveAnyAttributesWithNamedArgumentsTest.verified.txt similarity index 100% rename from ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.NotHaveAnyAttributesWithNamedArgumentsTest.verified.txt rename to ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectSyntaxElementsTests.NotHaveAnyAttributesWithNamedArgumentsTest.verified.txt diff --git a/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.NotHaveAttributeWithArgumentsTest.verified.txt b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectSyntaxElementsTests.NotHaveAttributeWithArgumentsTest.verified.txt similarity index 100% rename from ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.NotHaveAttributeWithArgumentsTest.verified.txt rename to ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectSyntaxElementsTests.NotHaveAttributeWithArgumentsTest.verified.txt diff --git a/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.NotHaveAttributeWithNamedArgumentsTest.verified.txt b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectSyntaxElementsTests.NotHaveAttributeWithNamedArgumentsTest.verified.txt similarity index 100% rename from ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.NotHaveAttributeWithNamedArgumentsTest.verified.txt rename to ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectSyntaxElementsTests.NotHaveAttributeWithNamedArgumentsTest.verified.txt diff --git a/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.NotHaveNameTest.verified.txt b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectSyntaxElementsTests.NotHaveNameTest.verified.txt similarity index 100% rename from ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.NotHaveNameTest.verified.txt rename to ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectSyntaxElementsTests.NotHaveNameTest.verified.txt diff --git a/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.OnlyDependOnTest.verified.txt b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectSyntaxElementsTests.OnlyDependOnTest.verified.txt similarity index 100% rename from ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.OnlyDependOnTest.verified.txt rename to ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectSyntaxElementsTests.OnlyDependOnTest.verified.txt diff --git a/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.OnlyDependOnTypesThatTest.verified.txt b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectSyntaxElementsTests.OnlyDependOnTypesThatTest.verified.txt similarity index 100% rename from ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.OnlyDependOnTypesThatTest.verified.txt rename to ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectSyntaxElementsTests.OnlyDependOnTypesThatTest.verified.txt diff --git a/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.OnlyHaveAttributesTest.verified.txt b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectSyntaxElementsTests.OnlyHaveAttributesTest.verified.txt similarity index 100% rename from ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.OnlyHaveAttributesTest.verified.txt rename to ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectSyntaxElementsTests.OnlyHaveAttributesTest.verified.txt diff --git a/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.OnlyHaveAttributesThatTest.verified.txt b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectSyntaxElementsTests.OnlyHaveAttributesThatTest.verified.txt similarity index 100% rename from ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectsShouldTests.OnlyHaveAttributesThatTest.verified.txt rename to ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectSyntaxElementsTests.OnlyHaveAttributesThatTest.verified.txt