diff --git a/ArchUnit.sln b/ArchUnit.sln index b511f6d08..65c417234 100644 --- a/ArchUnit.sln +++ b/ArchUnit.sln @@ -1,4 +1,5 @@ -Microsoft Visual Studio Solution File, Format Version 12.00 + +Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 15 VisualStudioVersion = 15.0.26430.16 MinimumVisualStudioVersion = 10.0.40219.1 @@ -22,7 +23,9 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ArchUnitNET.MSTestV2Tests", EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "TestAssemblies", "TestAssemblies", "{B1191F18-91CB-4387-B775-A5EB64D3AC30}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DependencyAssembly", "TestAssemblies\DependencyAssembly\DependencyAssembly.csproj", "{10A70A38-A18D-4FA8-AF25-2B25B3D60BE6}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TypeDependencyAssembly", "TestAssemblies\TypeDependencyAssembly\TypeDependencyAssembly.csproj", "{A1B2C3D4-E5F6-4A5B-8C7D-1E2F3A4B5C6D}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MethodDependencyAssembly", "TestAssemblies\MethodDependencyAssembly\MethodDependencyAssembly.csproj", "{B2C3D4E5-F6A7-4B8C-9D0E-2F3A4B5C6D7E}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AttributeAssembly", "TestAssemblies\AttributeAssembly\AttributeAssembly.csproj", "{FB457140-47B4-4B20-8505-BA9BFC73C705}" EndProject @@ -44,8 +47,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ArchUnitNET.TUnit", "ArchUn EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ArchUnitNET.TUnitTests", "ArchUnitNET.TUnitTests\ArchUnitNET.TUnitTests.csproj", "{C54143CE-3256-4313-B991-0706705EEA1D}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "InterfaceAssembly", "TestAssemblies\InterfaceAssembly\InterfaceAssembly.csproj", "{076E223C-32D3-4672-8B00-925CDBC1383E}" -EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FilteredDirectoryUnavailableTypesAssembly", "TestAssemblies\FilteredDirectoryUnavailableTypesAssembly\FilteredDirectoryUnavailableTypesAssembly.csproj", "{AA695589-8CCC-4474-9A7F-01A6376C375A}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ArchUnitNET.MSTestV3Tests", "ArchUnitNET.MSTestV3Tests\ArchUnitNET.MSTestV3Tests.csproj", "{F9856A37-C0E0-453C-888F-D794856D3404}" @@ -54,124 +55,343 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ArchUnitNET.MSTestV4Tests", EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ArchUnitNET.MSTestV4", "ArchUnitNET.MSTestV4\ArchUnitNET.MSTestV4.csproj", "{50F0F64A-F4A2-47E5-82E9-B66F07CE4198}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TypeAssembly", "TestAssemblies\TypeAssembly\TypeAssembly.csproj", "{ABCA0EC3-E47E-453E-B4CC-3446ED4F7643}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 Release|Any CPU = Release|Any CPU + Release|x64 = Release|x64 + Release|x86 = Release|x86 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {7DEF5F34-AB86-457B-819D-5E7387B3FF87}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {7DEF5F34-AB86-457B-819D-5E7387B3FF87}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7DEF5F34-AB86-457B-819D-5E7387B3FF87}.Debug|x64.ActiveCfg = Debug|Any CPU + {7DEF5F34-AB86-457B-819D-5E7387B3FF87}.Debug|x64.Build.0 = Debug|Any CPU + {7DEF5F34-AB86-457B-819D-5E7387B3FF87}.Debug|x86.ActiveCfg = Debug|Any CPU + {7DEF5F34-AB86-457B-819D-5E7387B3FF87}.Debug|x86.Build.0 = Debug|Any CPU {7DEF5F34-AB86-457B-819D-5E7387B3FF87}.Release|Any CPU.ActiveCfg = Release|Any CPU {7DEF5F34-AB86-457B-819D-5E7387B3FF87}.Release|Any CPU.Build.0 = Release|Any CPU + {7DEF5F34-AB86-457B-819D-5E7387B3FF87}.Release|x64.ActiveCfg = Release|Any CPU + {7DEF5F34-AB86-457B-819D-5E7387B3FF87}.Release|x64.Build.0 = Release|Any CPU + {7DEF5F34-AB86-457B-819D-5E7387B3FF87}.Release|x86.ActiveCfg = Release|Any CPU + {7DEF5F34-AB86-457B-819D-5E7387B3FF87}.Release|x86.Build.0 = Release|Any CPU {2855911F-6AE2-4BE1-BA88-9A0B2A03BFA3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {2855911F-6AE2-4BE1-BA88-9A0B2A03BFA3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2855911F-6AE2-4BE1-BA88-9A0B2A03BFA3}.Debug|x64.ActiveCfg = Debug|Any CPU + {2855911F-6AE2-4BE1-BA88-9A0B2A03BFA3}.Debug|x64.Build.0 = Debug|Any CPU + {2855911F-6AE2-4BE1-BA88-9A0B2A03BFA3}.Debug|x86.ActiveCfg = Debug|Any CPU + {2855911F-6AE2-4BE1-BA88-9A0B2A03BFA3}.Debug|x86.Build.0 = Debug|Any CPU {2855911F-6AE2-4BE1-BA88-9A0B2A03BFA3}.Release|Any CPU.ActiveCfg = Release|Any CPU {2855911F-6AE2-4BE1-BA88-9A0B2A03BFA3}.Release|Any CPU.Build.0 = Release|Any CPU + {2855911F-6AE2-4BE1-BA88-9A0B2A03BFA3}.Release|x64.ActiveCfg = Release|Any CPU + {2855911F-6AE2-4BE1-BA88-9A0B2A03BFA3}.Release|x64.Build.0 = Release|Any CPU + {2855911F-6AE2-4BE1-BA88-9A0B2A03BFA3}.Release|x86.ActiveCfg = Release|Any CPU + {2855911F-6AE2-4BE1-BA88-9A0B2A03BFA3}.Release|x86.Build.0 = Release|Any CPU {F38CBB2C-BDD0-4195-82CB-8B76332B0890}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {F38CBB2C-BDD0-4195-82CB-8B76332B0890}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F38CBB2C-BDD0-4195-82CB-8B76332B0890}.Debug|x64.ActiveCfg = Debug|Any CPU + {F38CBB2C-BDD0-4195-82CB-8B76332B0890}.Debug|x64.Build.0 = Debug|Any CPU + {F38CBB2C-BDD0-4195-82CB-8B76332B0890}.Debug|x86.ActiveCfg = Debug|Any CPU + {F38CBB2C-BDD0-4195-82CB-8B76332B0890}.Debug|x86.Build.0 = Debug|Any CPU {F38CBB2C-BDD0-4195-82CB-8B76332B0890}.Release|Any CPU.ActiveCfg = Release|Any CPU {F38CBB2C-BDD0-4195-82CB-8B76332B0890}.Release|Any CPU.Build.0 = Release|Any CPU + {F38CBB2C-BDD0-4195-82CB-8B76332B0890}.Release|x64.ActiveCfg = Release|Any CPU + {F38CBB2C-BDD0-4195-82CB-8B76332B0890}.Release|x64.Build.0 = Release|Any CPU + {F38CBB2C-BDD0-4195-82CB-8B76332B0890}.Release|x86.ActiveCfg = Release|Any CPU + {F38CBB2C-BDD0-4195-82CB-8B76332B0890}.Release|x86.Build.0 = Release|Any CPU {180688C2-7917-4A23-89A7-F3D5317E54F3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {180688C2-7917-4A23-89A7-F3D5317E54F3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {180688C2-7917-4A23-89A7-F3D5317E54F3}.Debug|x64.ActiveCfg = Debug|Any CPU + {180688C2-7917-4A23-89A7-F3D5317E54F3}.Debug|x64.Build.0 = Debug|Any CPU + {180688C2-7917-4A23-89A7-F3D5317E54F3}.Debug|x86.ActiveCfg = Debug|Any CPU + {180688C2-7917-4A23-89A7-F3D5317E54F3}.Debug|x86.Build.0 = Debug|Any CPU {180688C2-7917-4A23-89A7-F3D5317E54F3}.Release|Any CPU.ActiveCfg = Release|Any CPU {180688C2-7917-4A23-89A7-F3D5317E54F3}.Release|Any CPU.Build.0 = Release|Any CPU + {180688C2-7917-4A23-89A7-F3D5317E54F3}.Release|x64.ActiveCfg = Release|Any CPU + {180688C2-7917-4A23-89A7-F3D5317E54F3}.Release|x64.Build.0 = Release|Any CPU + {180688C2-7917-4A23-89A7-F3D5317E54F3}.Release|x86.ActiveCfg = Release|Any CPU + {180688C2-7917-4A23-89A7-F3D5317E54F3}.Release|x86.Build.0 = Release|Any CPU {53DF58F8-0C82-4259-96A6-31974D0A503A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {53DF58F8-0C82-4259-96A6-31974D0A503A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {53DF58F8-0C82-4259-96A6-31974D0A503A}.Debug|x64.ActiveCfg = Debug|Any CPU + {53DF58F8-0C82-4259-96A6-31974D0A503A}.Debug|x64.Build.0 = Debug|Any CPU + {53DF58F8-0C82-4259-96A6-31974D0A503A}.Debug|x86.ActiveCfg = Debug|Any CPU + {53DF58F8-0C82-4259-96A6-31974D0A503A}.Debug|x86.Build.0 = Debug|Any CPU {53DF58F8-0C82-4259-96A6-31974D0A503A}.Release|Any CPU.ActiveCfg = Release|Any CPU {53DF58F8-0C82-4259-96A6-31974D0A503A}.Release|Any CPU.Build.0 = Release|Any CPU + {53DF58F8-0C82-4259-96A6-31974D0A503A}.Release|x64.ActiveCfg = Release|Any CPU + {53DF58F8-0C82-4259-96A6-31974D0A503A}.Release|x64.Build.0 = Release|Any CPU + {53DF58F8-0C82-4259-96A6-31974D0A503A}.Release|x86.ActiveCfg = Release|Any CPU + {53DF58F8-0C82-4259-96A6-31974D0A503A}.Release|x86.Build.0 = Release|Any CPU {0BD564F3-D34F-4D39-94B3-EA2705EDF594}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {0BD564F3-D34F-4D39-94B3-EA2705EDF594}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0BD564F3-D34F-4D39-94B3-EA2705EDF594}.Debug|x64.ActiveCfg = Debug|Any CPU + {0BD564F3-D34F-4D39-94B3-EA2705EDF594}.Debug|x64.Build.0 = Debug|Any CPU + {0BD564F3-D34F-4D39-94B3-EA2705EDF594}.Debug|x86.ActiveCfg = Debug|Any CPU + {0BD564F3-D34F-4D39-94B3-EA2705EDF594}.Debug|x86.Build.0 = Debug|Any CPU {0BD564F3-D34F-4D39-94B3-EA2705EDF594}.Release|Any CPU.ActiveCfg = Release|Any CPU {0BD564F3-D34F-4D39-94B3-EA2705EDF594}.Release|Any CPU.Build.0 = Release|Any CPU + {0BD564F3-D34F-4D39-94B3-EA2705EDF594}.Release|x64.ActiveCfg = Release|Any CPU + {0BD564F3-D34F-4D39-94B3-EA2705EDF594}.Release|x64.Build.0 = Release|Any CPU + {0BD564F3-D34F-4D39-94B3-EA2705EDF594}.Release|x86.ActiveCfg = Release|Any CPU + {0BD564F3-D34F-4D39-94B3-EA2705EDF594}.Release|x86.Build.0 = Release|Any CPU {D2AB683F-0A64-491E-9C56-EE98588C493C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {D2AB683F-0A64-491E-9C56-EE98588C493C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D2AB683F-0A64-491E-9C56-EE98588C493C}.Debug|x64.ActiveCfg = Debug|Any CPU + {D2AB683F-0A64-491E-9C56-EE98588C493C}.Debug|x64.Build.0 = Debug|Any CPU + {D2AB683F-0A64-491E-9C56-EE98588C493C}.Debug|x86.ActiveCfg = Debug|Any CPU + {D2AB683F-0A64-491E-9C56-EE98588C493C}.Debug|x86.Build.0 = Debug|Any CPU {D2AB683F-0A64-491E-9C56-EE98588C493C}.Release|Any CPU.ActiveCfg = Release|Any CPU {D2AB683F-0A64-491E-9C56-EE98588C493C}.Release|Any CPU.Build.0 = Release|Any CPU + {D2AB683F-0A64-491E-9C56-EE98588C493C}.Release|x64.ActiveCfg = Release|Any CPU + {D2AB683F-0A64-491E-9C56-EE98588C493C}.Release|x64.Build.0 = Release|Any CPU + {D2AB683F-0A64-491E-9C56-EE98588C493C}.Release|x86.ActiveCfg = Release|Any CPU + {D2AB683F-0A64-491E-9C56-EE98588C493C}.Release|x86.Build.0 = Release|Any CPU {3D057987-358A-41C6-AF55-6490FCA5875F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {3D057987-358A-41C6-AF55-6490FCA5875F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3D057987-358A-41C6-AF55-6490FCA5875F}.Debug|x64.ActiveCfg = Debug|Any CPU + {3D057987-358A-41C6-AF55-6490FCA5875F}.Debug|x64.Build.0 = Debug|Any CPU + {3D057987-358A-41C6-AF55-6490FCA5875F}.Debug|x86.ActiveCfg = Debug|Any CPU + {3D057987-358A-41C6-AF55-6490FCA5875F}.Debug|x86.Build.0 = Debug|Any CPU {3D057987-358A-41C6-AF55-6490FCA5875F}.Release|Any CPU.ActiveCfg = Release|Any CPU {3D057987-358A-41C6-AF55-6490FCA5875F}.Release|Any CPU.Build.0 = Release|Any CPU + {3D057987-358A-41C6-AF55-6490FCA5875F}.Release|x64.ActiveCfg = Release|Any CPU + {3D057987-358A-41C6-AF55-6490FCA5875F}.Release|x64.Build.0 = Release|Any CPU + {3D057987-358A-41C6-AF55-6490FCA5875F}.Release|x86.ActiveCfg = Release|Any CPU + {3D057987-358A-41C6-AF55-6490FCA5875F}.Release|x86.Build.0 = Release|Any CPU {6D6B6EFE-DA0B-4C4D-B710-FA658F0C68CF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {6D6B6EFE-DA0B-4C4D-B710-FA658F0C68CF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6D6B6EFE-DA0B-4C4D-B710-FA658F0C68CF}.Debug|x64.ActiveCfg = Debug|Any CPU + {6D6B6EFE-DA0B-4C4D-B710-FA658F0C68CF}.Debug|x64.Build.0 = Debug|Any CPU + {6D6B6EFE-DA0B-4C4D-B710-FA658F0C68CF}.Debug|x86.ActiveCfg = Debug|Any CPU + {6D6B6EFE-DA0B-4C4D-B710-FA658F0C68CF}.Debug|x86.Build.0 = Debug|Any CPU {6D6B6EFE-DA0B-4C4D-B710-FA658F0C68CF}.Release|Any CPU.ActiveCfg = Release|Any CPU {6D6B6EFE-DA0B-4C4D-B710-FA658F0C68CF}.Release|Any CPU.Build.0 = Release|Any CPU - {10A70A38-A18D-4FA8-AF25-2B25B3D60BE6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {10A70A38-A18D-4FA8-AF25-2B25B3D60BE6}.Debug|Any CPU.Build.0 = Debug|Any CPU - {10A70A38-A18D-4FA8-AF25-2B25B3D60BE6}.Release|Any CPU.ActiveCfg = Release|Any CPU - {10A70A38-A18D-4FA8-AF25-2B25B3D60BE6}.Release|Any CPU.Build.0 = Release|Any CPU + {6D6B6EFE-DA0B-4C4D-B710-FA658F0C68CF}.Release|x64.ActiveCfg = Release|Any CPU + {6D6B6EFE-DA0B-4C4D-B710-FA658F0C68CF}.Release|x64.Build.0 = Release|Any CPU + {6D6B6EFE-DA0B-4C4D-B710-FA658F0C68CF}.Release|x86.ActiveCfg = Release|Any CPU + {6D6B6EFE-DA0B-4C4D-B710-FA658F0C68CF}.Release|x86.Build.0 = Release|Any CPU + {A1B2C3D4-E5F6-4A5B-8C7D-1E2F3A4B5C6D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A1B2C3D4-E5F6-4A5B-8C7D-1E2F3A4B5C6D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A1B2C3D4-E5F6-4A5B-8C7D-1E2F3A4B5C6D}.Debug|x64.ActiveCfg = Debug|Any CPU + {A1B2C3D4-E5F6-4A5B-8C7D-1E2F3A4B5C6D}.Debug|x64.Build.0 = Debug|Any CPU + {A1B2C3D4-E5F6-4A5B-8C7D-1E2F3A4B5C6D}.Debug|x86.ActiveCfg = Debug|Any CPU + {A1B2C3D4-E5F6-4A5B-8C7D-1E2F3A4B5C6D}.Debug|x86.Build.0 = Debug|Any CPU + {A1B2C3D4-E5F6-4A5B-8C7D-1E2F3A4B5C6D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A1B2C3D4-E5F6-4A5B-8C7D-1E2F3A4B5C6D}.Release|Any CPU.Build.0 = Release|Any CPU + {A1B2C3D4-E5F6-4A5B-8C7D-1E2F3A4B5C6D}.Release|x64.ActiveCfg = Release|Any CPU + {A1B2C3D4-E5F6-4A5B-8C7D-1E2F3A4B5C6D}.Release|x64.Build.0 = Release|Any CPU + {A1B2C3D4-E5F6-4A5B-8C7D-1E2F3A4B5C6D}.Release|x86.ActiveCfg = Release|Any CPU + {A1B2C3D4-E5F6-4A5B-8C7D-1E2F3A4B5C6D}.Release|x86.Build.0 = Release|Any CPU + {B2C3D4E5-F6A7-4B8C-9D0E-2F3A4B5C6D7E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B2C3D4E5-F6A7-4B8C-9D0E-2F3A4B5C6D7E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B2C3D4E5-F6A7-4B8C-9D0E-2F3A4B5C6D7E}.Debug|x64.ActiveCfg = Debug|Any CPU + {B2C3D4E5-F6A7-4B8C-9D0E-2F3A4B5C6D7E}.Debug|x64.Build.0 = Debug|Any CPU + {B2C3D4E5-F6A7-4B8C-9D0E-2F3A4B5C6D7E}.Debug|x86.ActiveCfg = Debug|Any CPU + {B2C3D4E5-F6A7-4B8C-9D0E-2F3A4B5C6D7E}.Debug|x86.Build.0 = Debug|Any CPU + {B2C3D4E5-F6A7-4B8C-9D0E-2F3A4B5C6D7E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B2C3D4E5-F6A7-4B8C-9D0E-2F3A4B5C6D7E}.Release|Any CPU.Build.0 = Release|Any CPU + {B2C3D4E5-F6A7-4B8C-9D0E-2F3A4B5C6D7E}.Release|x64.ActiveCfg = Release|Any CPU + {B2C3D4E5-F6A7-4B8C-9D0E-2F3A4B5C6D7E}.Release|x64.Build.0 = Release|Any CPU + {B2C3D4E5-F6A7-4B8C-9D0E-2F3A4B5C6D7E}.Release|x86.ActiveCfg = Release|Any CPU + {B2C3D4E5-F6A7-4B8C-9D0E-2F3A4B5C6D7E}.Release|x86.Build.0 = Release|Any CPU {FB457140-47B4-4B20-8505-BA9BFC73C705}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {FB457140-47B4-4B20-8505-BA9BFC73C705}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FB457140-47B4-4B20-8505-BA9BFC73C705}.Debug|x64.ActiveCfg = Debug|Any CPU + {FB457140-47B4-4B20-8505-BA9BFC73C705}.Debug|x64.Build.0 = Debug|Any CPU + {FB457140-47B4-4B20-8505-BA9BFC73C705}.Debug|x86.ActiveCfg = Debug|Any CPU + {FB457140-47B4-4B20-8505-BA9BFC73C705}.Debug|x86.Build.0 = Debug|Any CPU {FB457140-47B4-4B20-8505-BA9BFC73C705}.Release|Any CPU.ActiveCfg = Release|Any CPU {FB457140-47B4-4B20-8505-BA9BFC73C705}.Release|Any CPU.Build.0 = Release|Any CPU + {FB457140-47B4-4B20-8505-BA9BFC73C705}.Release|x64.ActiveCfg = Release|Any CPU + {FB457140-47B4-4B20-8505-BA9BFC73C705}.Release|x64.Build.0 = Release|Any CPU + {FB457140-47B4-4B20-8505-BA9BFC73C705}.Release|x86.ActiveCfg = Release|Any CPU + {FB457140-47B4-4B20-8505-BA9BFC73C705}.Release|x86.Build.0 = Release|Any CPU {FBCD91F2-4DB9-44AC-8214-6F2FFF9178D5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {FBCD91F2-4DB9-44AC-8214-6F2FFF9178D5}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FBCD91F2-4DB9-44AC-8214-6F2FFF9178D5}.Debug|x64.ActiveCfg = Debug|Any CPU + {FBCD91F2-4DB9-44AC-8214-6F2FFF9178D5}.Debug|x64.Build.0 = Debug|Any CPU + {FBCD91F2-4DB9-44AC-8214-6F2FFF9178D5}.Debug|x86.ActiveCfg = Debug|Any CPU + {FBCD91F2-4DB9-44AC-8214-6F2FFF9178D5}.Debug|x86.Build.0 = Debug|Any CPU {FBCD91F2-4DB9-44AC-8214-6F2FFF9178D5}.Release|Any CPU.ActiveCfg = Release|Any CPU {FBCD91F2-4DB9-44AC-8214-6F2FFF9178D5}.Release|Any CPU.Build.0 = Release|Any CPU + {FBCD91F2-4DB9-44AC-8214-6F2FFF9178D5}.Release|x64.ActiveCfg = Release|Any CPU + {FBCD91F2-4DB9-44AC-8214-6F2FFF9178D5}.Release|x64.Build.0 = Release|Any CPU + {FBCD91F2-4DB9-44AC-8214-6F2FFF9178D5}.Release|x86.ActiveCfg = Release|Any CPU + {FBCD91F2-4DB9-44AC-8214-6F2FFF9178D5}.Release|x86.Build.0 = Release|Any CPU {0243F2D4-AC89-4561-A936-D647B6BB821F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {0243F2D4-AC89-4561-A936-D647B6BB821F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0243F2D4-AC89-4561-A936-D647B6BB821F}.Debug|x64.ActiveCfg = Debug|Any CPU + {0243F2D4-AC89-4561-A936-D647B6BB821F}.Debug|x64.Build.0 = Debug|Any CPU + {0243F2D4-AC89-4561-A936-D647B6BB821F}.Debug|x86.ActiveCfg = Debug|Any CPU + {0243F2D4-AC89-4561-A936-D647B6BB821F}.Debug|x86.Build.0 = Debug|Any CPU {0243F2D4-AC89-4561-A936-D647B6BB821F}.Release|Any CPU.ActiveCfg = Release|Any CPU {0243F2D4-AC89-4561-A936-D647B6BB821F}.Release|Any CPU.Build.0 = Release|Any CPU + {0243F2D4-AC89-4561-A936-D647B6BB821F}.Release|x64.ActiveCfg = Release|Any CPU + {0243F2D4-AC89-4561-A936-D647B6BB821F}.Release|x64.Build.0 = Release|Any CPU + {0243F2D4-AC89-4561-A936-D647B6BB821F}.Release|x86.ActiveCfg = Release|Any CPU + {0243F2D4-AC89-4561-A936-D647B6BB821F}.Release|x86.Build.0 = Release|Any CPU {5A24529B-1794-4080-ADCC-77440BA0A0B3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5A24529B-1794-4080-ADCC-77440BA0A0B3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5A24529B-1794-4080-ADCC-77440BA0A0B3}.Debug|x64.ActiveCfg = Debug|Any CPU + {5A24529B-1794-4080-ADCC-77440BA0A0B3}.Debug|x64.Build.0 = Debug|Any CPU + {5A24529B-1794-4080-ADCC-77440BA0A0B3}.Debug|x86.ActiveCfg = Debug|Any CPU + {5A24529B-1794-4080-ADCC-77440BA0A0B3}.Debug|x86.Build.0 = Debug|Any CPU {5A24529B-1794-4080-ADCC-77440BA0A0B3}.Release|Any CPU.ActiveCfg = Release|Any CPU {5A24529B-1794-4080-ADCC-77440BA0A0B3}.Release|Any CPU.Build.0 = Release|Any CPU + {5A24529B-1794-4080-ADCC-77440BA0A0B3}.Release|x64.ActiveCfg = Release|Any CPU + {5A24529B-1794-4080-ADCC-77440BA0A0B3}.Release|x64.Build.0 = Release|Any CPU + {5A24529B-1794-4080-ADCC-77440BA0A0B3}.Release|x86.ActiveCfg = Release|Any CPU + {5A24529B-1794-4080-ADCC-77440BA0A0B3}.Release|x86.Build.0 = Release|Any CPU {E6CB8C69-25F5-4C94-8EA3-D56E444EB46B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {E6CB8C69-25F5-4C94-8EA3-D56E444EB46B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E6CB8C69-25F5-4C94-8EA3-D56E444EB46B}.Debug|x64.ActiveCfg = Debug|Any CPU + {E6CB8C69-25F5-4C94-8EA3-D56E444EB46B}.Debug|x64.Build.0 = Debug|Any CPU + {E6CB8C69-25F5-4C94-8EA3-D56E444EB46B}.Debug|x86.ActiveCfg = Debug|Any CPU + {E6CB8C69-25F5-4C94-8EA3-D56E444EB46B}.Debug|x86.Build.0 = Debug|Any CPU {E6CB8C69-25F5-4C94-8EA3-D56E444EB46B}.Release|Any CPU.ActiveCfg = Release|Any CPU {E6CB8C69-25F5-4C94-8EA3-D56E444EB46B}.Release|Any CPU.Build.0 = Release|Any CPU + {E6CB8C69-25F5-4C94-8EA3-D56E444EB46B}.Release|x64.ActiveCfg = Release|Any CPU + {E6CB8C69-25F5-4C94-8EA3-D56E444EB46B}.Release|x64.Build.0 = Release|Any CPU + {E6CB8C69-25F5-4C94-8EA3-D56E444EB46B}.Release|x86.ActiveCfg = Release|Any CPU + {E6CB8C69-25F5-4C94-8EA3-D56E444EB46B}.Release|x86.Build.0 = Release|Any CPU {5DE11135-0C27-41B4-BC34-9CB17BF335A7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5DE11135-0C27-41B4-BC34-9CB17BF335A7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5DE11135-0C27-41B4-BC34-9CB17BF335A7}.Debug|x64.ActiveCfg = Debug|Any CPU + {5DE11135-0C27-41B4-BC34-9CB17BF335A7}.Debug|x64.Build.0 = Debug|Any CPU + {5DE11135-0C27-41B4-BC34-9CB17BF335A7}.Debug|x86.ActiveCfg = Debug|Any CPU + {5DE11135-0C27-41B4-BC34-9CB17BF335A7}.Debug|x86.Build.0 = Debug|Any CPU {5DE11135-0C27-41B4-BC34-9CB17BF335A7}.Release|Any CPU.ActiveCfg = Release|Any CPU {5DE11135-0C27-41B4-BC34-9CB17BF335A7}.Release|Any CPU.Build.0 = Release|Any CPU + {5DE11135-0C27-41B4-BC34-9CB17BF335A7}.Release|x64.ActiveCfg = Release|Any CPU + {5DE11135-0C27-41B4-BC34-9CB17BF335A7}.Release|x64.Build.0 = Release|Any CPU + {5DE11135-0C27-41B4-BC34-9CB17BF335A7}.Release|x86.ActiveCfg = Release|Any CPU + {5DE11135-0C27-41B4-BC34-9CB17BF335A7}.Release|x86.Build.0 = Release|Any CPU {E226D0D5-E50A-4E9C-A30F-F4747299D614}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {E226D0D5-E50A-4E9C-A30F-F4747299D614}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E226D0D5-E50A-4E9C-A30F-F4747299D614}.Debug|x64.ActiveCfg = Debug|Any CPU + {E226D0D5-E50A-4E9C-A30F-F4747299D614}.Debug|x64.Build.0 = Debug|Any CPU + {E226D0D5-E50A-4E9C-A30F-F4747299D614}.Debug|x86.ActiveCfg = Debug|Any CPU + {E226D0D5-E50A-4E9C-A30F-F4747299D614}.Debug|x86.Build.0 = Debug|Any CPU {E226D0D5-E50A-4E9C-A30F-F4747299D614}.Release|Any CPU.ActiveCfg = Release|Any CPU {E226D0D5-E50A-4E9C-A30F-F4747299D614}.Release|Any CPU.Build.0 = Release|Any CPU + {E226D0D5-E50A-4E9C-A30F-F4747299D614}.Release|x64.ActiveCfg = Release|Any CPU + {E226D0D5-E50A-4E9C-A30F-F4747299D614}.Release|x64.Build.0 = Release|Any CPU + {E226D0D5-E50A-4E9C-A30F-F4747299D614}.Release|x86.ActiveCfg = Release|Any CPU + {E226D0D5-E50A-4E9C-A30F-F4747299D614}.Release|x86.Build.0 = Release|Any CPU {439E00CE-5CB8-4474-9A27-3FFC5770DB7C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {439E00CE-5CB8-4474-9A27-3FFC5770DB7C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {439E00CE-5CB8-4474-9A27-3FFC5770DB7C}.Debug|x64.ActiveCfg = Debug|Any CPU + {439E00CE-5CB8-4474-9A27-3FFC5770DB7C}.Debug|x64.Build.0 = Debug|Any CPU + {439E00CE-5CB8-4474-9A27-3FFC5770DB7C}.Debug|x86.ActiveCfg = Debug|Any CPU + {439E00CE-5CB8-4474-9A27-3FFC5770DB7C}.Debug|x86.Build.0 = Debug|Any CPU {439E00CE-5CB8-4474-9A27-3FFC5770DB7C}.Release|Any CPU.ActiveCfg = Release|Any CPU {439E00CE-5CB8-4474-9A27-3FFC5770DB7C}.Release|Any CPU.Build.0 = Release|Any CPU + {439E00CE-5CB8-4474-9A27-3FFC5770DB7C}.Release|x64.ActiveCfg = Release|Any CPU + {439E00CE-5CB8-4474-9A27-3FFC5770DB7C}.Release|x64.Build.0 = Release|Any CPU + {439E00CE-5CB8-4474-9A27-3FFC5770DB7C}.Release|x86.ActiveCfg = Release|Any CPU + {439E00CE-5CB8-4474-9A27-3FFC5770DB7C}.Release|x86.Build.0 = Release|Any CPU {AD4D9490-F6F1-47DC-9F52-FD15497CDE55}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {AD4D9490-F6F1-47DC-9F52-FD15497CDE55}.Debug|Any CPU.Build.0 = Debug|Any CPU + {AD4D9490-F6F1-47DC-9F52-FD15497CDE55}.Debug|x64.ActiveCfg = Debug|Any CPU + {AD4D9490-F6F1-47DC-9F52-FD15497CDE55}.Debug|x64.Build.0 = Debug|Any CPU + {AD4D9490-F6F1-47DC-9F52-FD15497CDE55}.Debug|x86.ActiveCfg = Debug|Any CPU + {AD4D9490-F6F1-47DC-9F52-FD15497CDE55}.Debug|x86.Build.0 = Debug|Any CPU {AD4D9490-F6F1-47DC-9F52-FD15497CDE55}.Release|Any CPU.ActiveCfg = Release|Any CPU {AD4D9490-F6F1-47DC-9F52-FD15497CDE55}.Release|Any CPU.Build.0 = Release|Any CPU + {AD4D9490-F6F1-47DC-9F52-FD15497CDE55}.Release|x64.ActiveCfg = Release|Any CPU + {AD4D9490-F6F1-47DC-9F52-FD15497CDE55}.Release|x64.Build.0 = Release|Any CPU + {AD4D9490-F6F1-47DC-9F52-FD15497CDE55}.Release|x86.ActiveCfg = Release|Any CPU + {AD4D9490-F6F1-47DC-9F52-FD15497CDE55}.Release|x86.Build.0 = Release|Any CPU {C54143CE-3256-4313-B991-0706705EEA1D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {C54143CE-3256-4313-B991-0706705EEA1D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C54143CE-3256-4313-B991-0706705EEA1D}.Debug|x64.ActiveCfg = Debug|Any CPU + {C54143CE-3256-4313-B991-0706705EEA1D}.Debug|x64.Build.0 = Debug|Any CPU + {C54143CE-3256-4313-B991-0706705EEA1D}.Debug|x86.ActiveCfg = Debug|Any CPU + {C54143CE-3256-4313-B991-0706705EEA1D}.Debug|x86.Build.0 = Debug|Any CPU {C54143CE-3256-4313-B991-0706705EEA1D}.Release|Any CPU.ActiveCfg = Release|Any CPU {C54143CE-3256-4313-B991-0706705EEA1D}.Release|Any CPU.Build.0 = Release|Any CPU - {076E223C-32D3-4672-8B00-925CDBC1383E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {076E223C-32D3-4672-8B00-925CDBC1383E}.Debug|Any CPU.Build.0 = Debug|Any CPU - {076E223C-32D3-4672-8B00-925CDBC1383E}.Release|Any CPU.ActiveCfg = Release|Any CPU - {076E223C-32D3-4672-8B00-925CDBC1383E}.Release|Any CPU.Build.0 = Release|Any CPU + {C54143CE-3256-4313-B991-0706705EEA1D}.Release|x64.ActiveCfg = Release|Any CPU + {C54143CE-3256-4313-B991-0706705EEA1D}.Release|x64.Build.0 = Release|Any CPU + {C54143CE-3256-4313-B991-0706705EEA1D}.Release|x86.ActiveCfg = Release|Any CPU + {C54143CE-3256-4313-B991-0706705EEA1D}.Release|x86.Build.0 = Release|Any CPU {AA695589-8CCC-4474-9A7F-01A6376C375A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {AA695589-8CCC-4474-9A7F-01A6376C375A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {AA695589-8CCC-4474-9A7F-01A6376C375A}.Debug|x64.ActiveCfg = Debug|Any CPU + {AA695589-8CCC-4474-9A7F-01A6376C375A}.Debug|x64.Build.0 = Debug|Any CPU + {AA695589-8CCC-4474-9A7F-01A6376C375A}.Debug|x86.ActiveCfg = Debug|Any CPU + {AA695589-8CCC-4474-9A7F-01A6376C375A}.Debug|x86.Build.0 = Debug|Any CPU {AA695589-8CCC-4474-9A7F-01A6376C375A}.Release|Any CPU.ActiveCfg = Release|Any CPU {AA695589-8CCC-4474-9A7F-01A6376C375A}.Release|Any CPU.Build.0 = Release|Any CPU + {AA695589-8CCC-4474-9A7F-01A6376C375A}.Release|x64.ActiveCfg = Release|Any CPU + {AA695589-8CCC-4474-9A7F-01A6376C375A}.Release|x64.Build.0 = Release|Any CPU + {AA695589-8CCC-4474-9A7F-01A6376C375A}.Release|x86.ActiveCfg = Release|Any CPU + {AA695589-8CCC-4474-9A7F-01A6376C375A}.Release|x86.Build.0 = Release|Any CPU {F9856A37-C0E0-453C-888F-D794856D3404}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {F9856A37-C0E0-453C-888F-D794856D3404}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F9856A37-C0E0-453C-888F-D794856D3404}.Debug|x64.ActiveCfg = Debug|Any CPU + {F9856A37-C0E0-453C-888F-D794856D3404}.Debug|x64.Build.0 = Debug|Any CPU + {F9856A37-C0E0-453C-888F-D794856D3404}.Debug|x86.ActiveCfg = Debug|Any CPU + {F9856A37-C0E0-453C-888F-D794856D3404}.Debug|x86.Build.0 = Debug|Any CPU {F9856A37-C0E0-453C-888F-D794856D3404}.Release|Any CPU.ActiveCfg = Release|Any CPU {F9856A37-C0E0-453C-888F-D794856D3404}.Release|Any CPU.Build.0 = Release|Any CPU + {F9856A37-C0E0-453C-888F-D794856D3404}.Release|x64.ActiveCfg = Release|Any CPU + {F9856A37-C0E0-453C-888F-D794856D3404}.Release|x64.Build.0 = Release|Any CPU + {F9856A37-C0E0-453C-888F-D794856D3404}.Release|x86.ActiveCfg = Release|Any CPU + {F9856A37-C0E0-453C-888F-D794856D3404}.Release|x86.Build.0 = Release|Any CPU {9858F5A1-356B-4CF0-8E50-62F2E881CC36}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {9858F5A1-356B-4CF0-8E50-62F2E881CC36}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9858F5A1-356B-4CF0-8E50-62F2E881CC36}.Debug|x64.ActiveCfg = Debug|Any CPU + {9858F5A1-356B-4CF0-8E50-62F2E881CC36}.Debug|x64.Build.0 = Debug|Any CPU + {9858F5A1-356B-4CF0-8E50-62F2E881CC36}.Debug|x86.ActiveCfg = Debug|Any CPU + {9858F5A1-356B-4CF0-8E50-62F2E881CC36}.Debug|x86.Build.0 = Debug|Any CPU {9858F5A1-356B-4CF0-8E50-62F2E881CC36}.Release|Any CPU.ActiveCfg = Release|Any CPU {9858F5A1-356B-4CF0-8E50-62F2E881CC36}.Release|Any CPU.Build.0 = Release|Any CPU + {9858F5A1-356B-4CF0-8E50-62F2E881CC36}.Release|x64.ActiveCfg = Release|Any CPU + {9858F5A1-356B-4CF0-8E50-62F2E881CC36}.Release|x64.Build.0 = Release|Any CPU + {9858F5A1-356B-4CF0-8E50-62F2E881CC36}.Release|x86.ActiveCfg = Release|Any CPU + {9858F5A1-356B-4CF0-8E50-62F2E881CC36}.Release|x86.Build.0 = Release|Any CPU {50F0F64A-F4A2-47E5-82E9-B66F07CE4198}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {50F0F64A-F4A2-47E5-82E9-B66F07CE4198}.Debug|Any CPU.Build.0 = Debug|Any CPU + {50F0F64A-F4A2-47E5-82E9-B66F07CE4198}.Debug|x64.ActiveCfg = Debug|Any CPU + {50F0F64A-F4A2-47E5-82E9-B66F07CE4198}.Debug|x64.Build.0 = Debug|Any CPU + {50F0F64A-F4A2-47E5-82E9-B66F07CE4198}.Debug|x86.ActiveCfg = Debug|Any CPU + {50F0F64A-F4A2-47E5-82E9-B66F07CE4198}.Debug|x86.Build.0 = Debug|Any CPU {50F0F64A-F4A2-47E5-82E9-B66F07CE4198}.Release|Any CPU.ActiveCfg = Release|Any CPU {50F0F64A-F4A2-47E5-82E9-B66F07CE4198}.Release|Any CPU.Build.0 = Release|Any CPU + {50F0F64A-F4A2-47E5-82E9-B66F07CE4198}.Release|x64.ActiveCfg = Release|Any CPU + {50F0F64A-F4A2-47E5-82E9-B66F07CE4198}.Release|x64.Build.0 = Release|Any CPU + {50F0F64A-F4A2-47E5-82E9-B66F07CE4198}.Release|x86.ActiveCfg = Release|Any CPU + {50F0F64A-F4A2-47E5-82E9-B66F07CE4198}.Release|x86.Build.0 = Release|Any CPU + {ABCA0EC3-E47E-453E-B4CC-3446ED4F7643}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {ABCA0EC3-E47E-453E-B4CC-3446ED4F7643}.Debug|Any CPU.Build.0 = Debug|Any CPU + {ABCA0EC3-E47E-453E-B4CC-3446ED4F7643}.Debug|x64.ActiveCfg = Debug|Any CPU + {ABCA0EC3-E47E-453E-B4CC-3446ED4F7643}.Debug|x64.Build.0 = Debug|Any CPU + {ABCA0EC3-E47E-453E-B4CC-3446ED4F7643}.Debug|x86.ActiveCfg = Debug|Any CPU + {ABCA0EC3-E47E-453E-B4CC-3446ED4F7643}.Debug|x86.Build.0 = Debug|Any CPU + {ABCA0EC3-E47E-453E-B4CC-3446ED4F7643}.Release|Any CPU.ActiveCfg = Release|Any CPU + {ABCA0EC3-E47E-453E-B4CC-3446ED4F7643}.Release|Any CPU.Build.0 = Release|Any CPU + {ABCA0EC3-E47E-453E-B4CC-3446ED4F7643}.Release|x64.ActiveCfg = Release|Any CPU + {ABCA0EC3-E47E-453E-B4CC-3446ED4F7643}.Release|x64.Build.0 = Release|Any CPU + {ABCA0EC3-E47E-453E-B4CC-3446ED4F7643}.Release|x86.ActiveCfg = Release|Any CPU + {ABCA0EC3-E47E-453E-B4CC-3446ED4F7643}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution - {10A70A38-A18D-4FA8-AF25-2B25B3D60BE6} = {B1191F18-91CB-4387-B775-A5EB64D3AC30} + {A1B2C3D4-E5F6-4A5B-8C7D-1E2F3A4B5C6D} = {B1191F18-91CB-4387-B775-A5EB64D3AC30} + {B2C3D4E5-F6A7-4B8C-9D0E-2F3A4B5C6D7E} = {B1191F18-91CB-4387-B775-A5EB64D3AC30} {FB457140-47B4-4B20-8505-BA9BFC73C705} = {B1191F18-91CB-4387-B775-A5EB64D3AC30} {FBCD91F2-4DB9-44AC-8214-6F2FFF9178D5} = {B1191F18-91CB-4387-B775-A5EB64D3AC30} {0243F2D4-AC89-4561-A936-D647B6BB821F} = {B1191F18-91CB-4387-B775-A5EB64D3AC30} {5A24529B-1794-4080-ADCC-77440BA0A0B3} = {B1191F18-91CB-4387-B775-A5EB64D3AC30} {E6CB8C69-25F5-4C94-8EA3-D56E444EB46B} = {B1191F18-91CB-4387-B775-A5EB64D3AC30} - {076E223C-32D3-4672-8B00-925CDBC1383E} = {B1191F18-91CB-4387-B775-A5EB64D3AC30} {AA695589-8CCC-4474-9A7F-01A6376C375A} = {B1191F18-91CB-4387-B775-A5EB64D3AC30} + {ABCA0EC3-E47E-453E-B4CC-3446ED4F7643} = {B1191F18-91CB-4387-B775-A5EB64D3AC30} EndGlobalSection EndGlobal diff --git a/ArchUnitNET/Fluent/Syntax/Elements/Types/AddTypeCondition.cs b/ArchUnitNET/Fluent/Syntax/Elements/Types/AddTypeCondition.cs index e6ce18a70..950a6ea62 100644 --- a/ArchUnitNET/Fluent/Syntax/Elements/Types/AddTypeCondition.cs +++ b/ArchUnitNET/Fluent/Syntax/Elements/Types/AddTypeCondition.cs @@ -16,20 +16,23 @@ internal AddTypeCondition(IArchRuleCreator ruleCreator) : base(ruleCreator) { } // csharpier-ignore-start - public TNextElement Be(Type firstType, params Type[] moreTypes) => CreateNextElement(TypeConditionsDefinition.Be(firstType, moreTypes)); - public TNextElement Be(IEnumerable types) => CreateNextElement(TypeConditionsDefinition.Be(types)); + public TNextElement Be(params Type[] types) => Be(new SystemTypeObjectProvider(types)); + public TNextElement Be(IEnumerable types) => Be(new SystemTypeObjectProvider(types)); + public TNextElement Be(IObjectProvider types) => CreateNextElement(TypeConditionsDefinition.Be(types)); - public TNextElement BeAssignableTo(IType firstType, params IType[] moreTypes) => CreateNextElement(TypeConditionsDefinition.BeAssignableTo(firstType, moreTypes)); - public TNextElement BeAssignableTo(Type firstType, params Type[] moreTypes) => CreateNextElement(TypeConditionsDefinition.BeAssignableTo(firstType, moreTypes)); + public TNextElement BeAssignableTo() => BeAssignableTo(new ObjectProvider()); + public TNextElement BeAssignableTo(params IType[] types) => BeAssignableTo(new ObjectProvider(types)); + public TNextElement BeAssignableTo(params Type[] types) => BeAssignableTo(new SystemTypeObjectProvider(types)); public TNextElement BeAssignableTo(IObjectProvider types) => CreateNextElement(TypeConditionsDefinition.BeAssignableTo(types)); - public TNextElement BeAssignableTo(IEnumerable types) => CreateNextElement(TypeConditionsDefinition.BeAssignableTo(types)); - public TNextElement BeAssignableTo(IEnumerable types) => CreateNextElement(TypeConditionsDefinition.BeAssignableTo(types)); + public TNextElement BeAssignableTo(IEnumerable types) => BeAssignableTo(new ObjectProvider(types)); + public TNextElement BeAssignableTo(IEnumerable types) => BeAssignableTo(new SystemTypeObjectProvider(types)); - public TNextElement BeNestedIn(IType firstType, params IType[] moreTypes) => CreateNextElement(TypeConditionsDefinition.BeNestedIn(firstType, moreTypes)); - public TNextElement BeNestedIn(Type firstType, params Type[] moreTypes) => CreateNextElement(TypeConditionsDefinition.BeNestedIn(firstType, moreTypes)); + public TNextElement BeNestedIn() => BeNestedIn(new ObjectProvider()); + public TNextElement BeNestedIn(params IType[] types) => BeNestedIn(new ObjectProvider(types)); + public TNextElement BeNestedIn(params Type[] types) => BeNestedIn(new SystemTypeObjectProvider(types)); public TNextElement BeNestedIn(IObjectProvider types) => CreateNextElement(TypeConditionsDefinition.BeNestedIn(types)); - public TNextElement BeNestedIn(IEnumerable types) => CreateNextElement(TypeConditionsDefinition.BeNestedIn(types)); - public TNextElement BeNestedIn(IEnumerable types) => CreateNextElement(TypeConditionsDefinition.BeNestedIn(types)); + public TNextElement BeNestedIn(IEnumerable types) => BeNestedIn(new ObjectProvider(types)); + public TNextElement BeNestedIn(IEnumerable types) => BeNestedIn(new SystemTypeObjectProvider(types)); public TNextElement BeValueTypes() => CreateNextElement(TypeConditionsDefinition.BeValueTypes()); public TNextElement BeEnums() => CreateNextElement(TypeConditionsDefinition.BeEnums()); @@ -68,14 +71,16 @@ internal AddTypeCondition(IArchRuleCreator ruleCreator) //Negations - public TNextElement NotBe(Type firstType, params Type[] moreTypes) => CreateNextElement(TypeConditionsDefinition.NotBe(firstType, moreTypes)); - public TNextElement NotBe(IEnumerable types) => CreateNextElement(TypeConditionsDefinition.NotBe(types)); + public TNextElement NotBe(params Type[] types) => NotBe(new SystemTypeObjectProvider(types)); + public TNextElement NotBe(IEnumerable types) => NotBe(new SystemTypeObjectProvider(types)); + public TNextElement NotBe(IObjectProvider types) => CreateNextElement(TypeConditionsDefinition.NotBe(types)); - public TNextElement NotBeAssignableTo(IType firstType, params IType[] moreTypes) => CreateNextElement(TypeConditionsDefinition.NotBeAssignableTo(firstType, moreTypes)); - public TNextElement NotBeAssignableTo(Type firstType, params Type[] moreTypes) => CreateNextElement(TypeConditionsDefinition.NotBeAssignableTo(firstType, moreTypes)); + public TNextElement NotBeAssignableTo() => NotBeAssignableTo(new ObjectProvider()); + public TNextElement NotBeAssignableTo(params IType[] types) => NotBeAssignableTo(new ObjectProvider(types)); + public TNextElement NotBeAssignableTo(params Type[] types) => NotBeAssignableTo(new SystemTypeObjectProvider(types)); public TNextElement NotBeAssignableTo(IObjectProvider types) => CreateNextElement(TypeConditionsDefinition.NotBeAssignableTo(types)); - public TNextElement NotBeAssignableTo(IEnumerable types) => CreateNextElement(TypeConditionsDefinition.NotBeAssignableTo(types)); - public TNextElement NotBeAssignableTo(IEnumerable types) => CreateNextElement(TypeConditionsDefinition.NotBeAssignableTo(types)); + public TNextElement NotBeAssignableTo(IEnumerable types) => NotBeAssignableTo(new ObjectProvider(types)); + public TNextElement NotBeAssignableTo(IEnumerable types) => NotBeAssignableTo(new SystemTypeObjectProvider(types)); public TNextElement NotBeValueTypes() => CreateNextElement(TypeConditionsDefinition.NotBeValueTypes()); public TNextElement NotBeEnums() => CreateNextElement(TypeConditionsDefinition.NotBeEnums()); diff --git a/ArchUnitNET/Fluent/Syntax/Elements/Types/AddTypePredicate.cs b/ArchUnitNET/Fluent/Syntax/Elements/Types/AddTypePredicate.cs index f6b98fb23..ab381f062 100644 --- a/ArchUnitNET/Fluent/Syntax/Elements/Types/AddTypePredicate.cs +++ b/ArchUnitNET/Fluent/Syntax/Elements/Types/AddTypePredicate.cs @@ -14,20 +14,23 @@ internal AddTypePredicate(IArchRuleCreator archRuleCreator) : base(archRuleCreator) { } // csharpier-ignore-start - public TNextElement Are(Type firstType, params Type[] moreTypes) => CreateNextElement(TypePredicatesDefinition.Are(firstType, moreTypes)); - public TNextElement Are(IEnumerable types) => CreateNextElement(TypePredicatesDefinition.Are(types)); + public TNextElement Are(params Type[] types) => Are(new SystemTypeObjectProvider(types)); + public TNextElement Are(IEnumerable types) => Are(new SystemTypeObjectProvider(types)); + public TNextElement Are(IObjectProvider types) => CreateNextElement(TypePredicatesDefinition.Are(types)); - public TNextElement AreAssignableTo(IType firstType, params IType[] moreTypes) => CreateNextElement(TypePredicatesDefinition.AreAssignableTo(firstType, moreTypes)); - public TNextElement AreAssignableTo(Type firstType, params Type[] moreTypes) => CreateNextElement(TypePredicatesDefinition.AreAssignableTo(firstType, moreTypes)); + public TNextElement AreAssignableTo() => AreAssignableTo(new ObjectProvider()); + public TNextElement AreAssignableTo(params IType[] types) => AreAssignableTo(new ObjectProvider(types)); + public TNextElement AreAssignableTo(params Type[] types) => AreAssignableTo(new SystemTypeObjectProvider(types)); public TNextElement AreAssignableTo(IObjectProvider types) => CreateNextElement(TypePredicatesDefinition.AreAssignableTo(types)); - public TNextElement AreAssignableTo(IEnumerable types) => CreateNextElement(TypePredicatesDefinition.AreAssignableTo(types)); - public TNextElement AreAssignableTo(IEnumerable types) => CreateNextElement(TypePredicatesDefinition.AreAssignableTo(types)); + public TNextElement AreAssignableTo(IEnumerable types) => AreAssignableTo(new ObjectProvider(types)); + public TNextElement AreAssignableTo(IEnumerable types) => AreAssignableTo(new SystemTypeObjectProvider(types)); - public TNextElement AreNestedIn(IType firstType, params IType[] moreTypes) => CreateNextElement(TypePredicatesDefinition.AreNestedIn(firstType, moreTypes)); - public TNextElement AreNestedIn(Type firstType, params Type[] moreTypes) => CreateNextElement(TypePredicatesDefinition.AreNestedIn(firstType, moreTypes)); + public TNextElement AreNestedIn() => AreNestedIn(new ObjectProvider()); + public TNextElement AreNestedIn(params IType[] types) => AreNestedIn(new ObjectProvider(types)); + public TNextElement AreNestedIn(params Type[] types) => AreNestedIn(new SystemTypeObjectProvider(types)); public TNextElement AreNestedIn(IObjectProvider types) => CreateNextElement(TypePredicatesDefinition.AreNestedIn(types)); - public TNextElement AreNestedIn(IEnumerable types) => CreateNextElement(TypePredicatesDefinition.AreNestedIn(types)); - public TNextElement AreNestedIn(IEnumerable types) => CreateNextElement(TypePredicatesDefinition.AreNestedIn(types)); + public TNextElement AreNestedIn(IEnumerable types) => AreNestedIn(new ObjectProvider(types)); + public TNextElement AreNestedIn(IEnumerable types) => AreNestedIn(new SystemTypeObjectProvider(types)); public TNextElement AreValueTypes() => CreateNextElement(TypePredicatesDefinition.AreValueTypes()); public TNextElement AreEnums() => CreateNextElement(TypePredicatesDefinition.AreEnums()); @@ -60,14 +63,16 @@ internal AddTypePredicate(IArchRuleCreator archRuleCreator) //Negations - public TNextElement AreNot(Type firstType, params Type[] moreTypes) => CreateNextElement(TypePredicatesDefinition.AreNot(firstType, moreTypes)); - public TNextElement AreNot(IEnumerable types) => CreateNextElement(TypePredicatesDefinition.AreNot(types)); + public TNextElement AreNot(params Type[] types) => AreNot(new SystemTypeObjectProvider(types)); + public TNextElement AreNot(IEnumerable types) => AreNot(new SystemTypeObjectProvider(types)); + public TNextElement AreNot(IObjectProvider types) => CreateNextElement(TypePredicatesDefinition.AreNot(types)); - public TNextElement AreNotAssignableTo(IType firstType, params IType[] moreTypes) => CreateNextElement(TypePredicatesDefinition.AreNotAssignableTo(firstType, moreTypes)); - public TNextElement AreNotAssignableTo(Type firstType, params Type[] moreTypes) => CreateNextElement(TypePredicatesDefinition.AreNotAssignableTo(firstType, moreTypes)); + public TNextElement AreNotAssignableTo() => AreNotAssignableTo(new ObjectProvider()); + public TNextElement AreNotAssignableTo(params IType[] types) => AreNotAssignableTo(new ObjectProvider(types)); + public TNextElement AreNotAssignableTo(params Type[] types) => AreNotAssignableTo(new SystemTypeObjectProvider(types)); public TNextElement AreNotAssignableTo(IObjectProvider types) => CreateNextElement(TypePredicatesDefinition.AreNotAssignableTo(types)); - public TNextElement AreNotAssignableTo(IEnumerable types) => CreateNextElement(TypePredicatesDefinition.AreNotAssignableTo(types)); - public TNextElement AreNotAssignableTo(IEnumerable types) => CreateNextElement(TypePredicatesDefinition.AreNotAssignableTo(types)); + public TNextElement AreNotAssignableTo(IEnumerable types) => AreNotAssignableTo(new ObjectProvider(types)); + public TNextElement AreNotAssignableTo(IEnumerable types) => AreNotAssignableTo(new SystemTypeObjectProvider(types)); public TNextElement AreNotValueTypes() => CreateNextElement(TypePredicatesDefinition.AreNotValueTypes()); public TNextElement AreNotEnums() => CreateNextElement(TypePredicatesDefinition.AreNotEnums()); diff --git a/ArchUnitNET/Fluent/Syntax/Elements/Types/IAddTypeCondition.cs b/ArchUnitNET/Fluent/Syntax/Elements/Types/IAddTypeCondition.cs index c4a26a6e5..d11cdce31 100644 --- a/ArchUnitNET/Fluent/Syntax/Elements/Types/IAddTypeCondition.cs +++ b/ArchUnitNET/Fluent/Syntax/Elements/Types/IAddTypeCondition.cs @@ -10,11 +10,12 @@ public interface IAddTypeCondition : IAddObjectCondition where TRuleType : ICanBeAnalyzed { - TNextElement Be(Type firstType, params Type[] moreTypes); + TNextElement Be(params Type[] types); TNextElement Be(IEnumerable types); - TNextElement BeAssignableTo(IType firstType, params IType[] moreTypes); - TNextElement BeAssignableTo(Type type, params Type[] moreTypes); + TNextElement BeAssignableTo(); + TNextElement BeAssignableTo(params IType[] types); + TNextElement BeAssignableTo(params Type[] types); TNextElement BeAssignableTo(IObjectProvider types); TNextElement BeAssignableTo(IEnumerable types); TNextElement BeAssignableTo(IEnumerable types); @@ -55,11 +56,12 @@ params Domain.Assembly[] moreAssemblies //Negations - TNextElement NotBe(Type firstType, params Type[] moreTypes); + TNextElement NotBe(params Type[] types); TNextElement NotBe(IEnumerable types); - TNextElement NotBeAssignableTo(IType type, params IType[] moreTypes); - TNextElement NotBeAssignableTo(Type type, params Type[] moreTypes); + TNextElement NotBeAssignableTo(); + TNextElement NotBeAssignableTo(params IType[] types); + TNextElement NotBeAssignableTo(params Type[] types); TNextElement NotBeAssignableTo(IObjectProvider types); TNextElement NotBeAssignableTo(IEnumerable types); TNextElement NotBeAssignableTo(IEnumerable types); diff --git a/ArchUnitNET/Fluent/Syntax/Elements/Types/IAddTypePredicate.cs b/ArchUnitNET/Fluent/Syntax/Elements/Types/IAddTypePredicate.cs index c7c56703e..d16e8d271 100644 --- a/ArchUnitNET/Fluent/Syntax/Elements/Types/IAddTypePredicate.cs +++ b/ArchUnitNET/Fluent/Syntax/Elements/Types/IAddTypePredicate.cs @@ -9,11 +9,12 @@ public interface IAddTypePredicate : IAddObjectPredicate where TRuleType : ICanBeAnalyzed { - TNextElement Are(Type firstType, params Type[] moreTypes); + TNextElement Are(params Type[] types); TNextElement Are(IEnumerable types); - TNextElement AreAssignableTo(IType firstType, params IType[] moreTypes); - TNextElement AreAssignableTo(Type type, params Type[] moreTypes); + TNextElement AreAssignableTo(); + TNextElement AreAssignableTo(params IType[] types); + TNextElement AreAssignableTo(params Type[] types); TNextElement AreAssignableTo(IObjectProvider types); TNextElement AreAssignableTo(IEnumerable types); TNextElement AreAssignableTo(IEnumerable types); @@ -49,11 +50,12 @@ params Domain.Assembly[] moreAssemblies //Negations - TNextElement AreNot(Type firstType, params Type[] moreTypes); + TNextElement AreNot(params Type[] types); TNextElement AreNot(IEnumerable types); - TNextElement AreNotAssignableTo(IType type, params IType[] moreTypes); - TNextElement AreNotAssignableTo(Type type, params Type[] moreTypes); + TNextElement AreNotAssignableTo(); + TNextElement AreNotAssignableTo(params IType[] types); + TNextElement AreNotAssignableTo(params Type[] types); TNextElement AreNotAssignableTo(IObjectProvider types); TNextElement AreNotAssignableTo(IEnumerable types); TNextElement AreNotAssignableTo(IEnumerable types); diff --git a/ArchUnitNET/Fluent/Syntax/Elements/Types/TypeConditionsDefinition.cs b/ArchUnitNET/Fluent/Syntax/Elements/Types/TypeConditionsDefinition.cs index 2a49913d7..ada65a0a1 100644 --- a/ArchUnitNET/Fluent/Syntax/Elements/Types/TypeConditionsDefinition.cs +++ b/ArchUnitNET/Fluent/Syntax/Elements/Types/TypeConditionsDefinition.cs @@ -7,84 +7,45 @@ using ArchUnitNET.Domain.Extensions; using ArchUnitNET.Domain.PlantUml.Import; using ArchUnitNET.Fluent.Conditions; +using static ArchUnitNET.Domain.Extensions.EnumerableExtensions; using Enum = ArchUnitNET.Domain.Enum; namespace ArchUnitNET.Fluent.Syntax.Elements.Types { - public static class TypeConditionsDefinition + internal static class TypeConditionsDefinition where TRuleType : IType { - public static IOrderedCondition Be(Type firstType, params Type[] moreTypes) + public static IOrderedCondition Be(IObjectProvider objectProvider) { - var types = new List { firstType }; - types.AddRange(moreTypes); - return Be(types); - } - - public static IOrderedCondition Be(IEnumerable types) - { - var typeList = types.ToList(); - + var sizedObjectProvider = objectProvider as ISizedObjectProvider; IEnumerable Condition( IEnumerable ruleTypes, Architecture architecture ) { - var archUnitTypeList = new List(); - foreach (var type in typeList) + var typeList = objectProvider.GetObjects(architecture).ToList(); + var isAllowedType = CreateLookupFn(typeList); + foreach (var ruleType in ruleTypes) { - try + if (isAllowedType(ruleType)) { - var archUnitType = architecture.GetITypeOfType(type); - archUnitTypeList.Add(archUnitType); + yield return new ConditionResult(ruleType, true); } - catch (TypeDoesNotExistInArchitecture) + else { - //ignore, can't be equal anyways + yield return new ConditionResult( + ruleType, + false, + (sizedObjectProvider != null && sizedObjectProvider.Count == 0) + ? "does exist" + : "is not " + objectProvider.Description + ); } } - - var ruleTypeList = ruleTypes.ToList(); - var passedObjects = ruleTypeList - .OfType() - .Intersect(archUnitTypeList) - .ToList(); - foreach (var failedObject in ruleTypeList.Cast().Except(passedObjects)) - { - yield return new ConditionResult( - failedObject, - false, - "is " + failedObject.FullName - ); - } - - foreach (var passedObject in passedObjects) - { - yield return new ConditionResult(passedObject, true); - } } - string description; - if (typeList.IsNullOrEmpty()) - { - description = "not exist"; - } - else - { - var firstType = typeList.First(); - description = typeList - .Where(type => type != firstType) - .Distinct() - .Aggregate( - "be \"" + firstType.FullName + "\"", - (current, type) => current + " or \"" + type.FullName + "\"" - ); - } - - return new ArchitectureCondition( - Condition, - description - ).AsOrderedCondition(); + var description = objectProvider.FormatDescription("not exist", "be", "be"); + return new OrderedArchitectureCondition(Condition, description); } public static RelationCondition BeTypesThat() @@ -96,26 +57,6 @@ public static RelationCondition BeTypesThat() ); } - public static IOrderedCondition BeAssignableTo( - IType firstType, - params IType[] moreTypes - ) - { - var types = new List { firstType }; - types.AddRange(moreTypes); - return BeAssignableTo(types); - } - - public static IOrderedCondition BeAssignableTo( - Type firstType, - params Type[] moreTypes - ) - { - var types = new List { firstType }; - types.AddRange(moreTypes); - return BeAssignableTo(types); - } - public static IOrderedCondition BeAssignableTo( IObjectProvider objectProvider ) @@ -125,182 +66,29 @@ IEnumerable Condition( Architecture architecture ) { - var typeList = objectProvider.GetObjects(architecture).ToList(); - var ruleTypeList = ruleTypes.ToList(); - var passedObjects = ruleTypeList - .Where(type => type.GetAssignableTypes().Intersect(typeList).Any()) - .ToList(); + var isExpectedType = CreateLookupFn( + objectProvider.GetObjects(architecture).ToList() + ); var failDescription = "is not assignable to " + objectProvider.Description; - foreach (var failedObject in ruleTypeList.Except(passedObjects)) - { - yield return new ConditionResult(failedObject, false, failDescription); - } - - foreach (var passedObject in passedObjects) - { - yield return new ConditionResult(passedObject, true); - } - } - - var description = "be assignable to " + objectProvider.Description; - return new ArchitectureCondition( - Condition, - description - ).AsOrderedCondition(); - } - - public static IOrderedCondition BeAssignableTo(IEnumerable types) - { - var typeList = types.ToList(); - var firstType = typeList.First(); - - IEnumerable Condition(IEnumerable ruleTypes) - { - var ruleTypeList = ruleTypes.ToList(); - var passedObjects = ruleTypeList - .Where(type => type.GetAssignableTypes().Intersect(typeList).Any()) - .ToList(); - string failDescription; - if (typeList.IsNullOrEmpty()) - { - failDescription = "is assignable to any type (always true)"; - } - else - { - failDescription = typeList - .Where(type => !type.Equals(firstType)) - .Distinct() - .Aggregate( - "is not assignable to \"" + firstType.FullName + "\"", - (current, type) => current + " or \"" + type.FullName + "\"" - ); - } - - foreach (var failedObject in ruleTypeList.Except(passedObjects)) - { - yield return new ConditionResult(failedObject, false, failDescription); - } - - foreach (var passedObject in passedObjects) - { - yield return new ConditionResult(passedObject, true); - } - } - - string description; - if (typeList.IsNullOrEmpty()) - { - description = "be assignable to no types (always false)"; - } - else - { - description = typeList - .Where(type => !type.Equals(firstType)) - .Distinct() - .Aggregate( - "be assignable to \"" + firstType.FullName + "\"", - (current, type) => current + " or \"" + type.FullName + "\"" - ); - } - - return new EnumerableCondition(Condition, description).AsOrderedCondition(); - } - - public static IOrderedCondition BeAssignableTo(IEnumerable types) - { - var typeList = types.ToList(); - var firstType = typeList.First(); - - IEnumerable Condition( - IEnumerable ruleTypes, - Architecture architecture - ) - { - var archUnitTypeList = new List(); - foreach (var type in typeList) + foreach (var ruleType in ruleTypes) { - try + if (ruleType.GetAssignableTypes().Any(isExpectedType)) { - var archUnitType = architecture.GetITypeOfType(type); - archUnitTypeList.Add(archUnitType); + yield return new ConditionResult(ruleType, true); } - catch (TypeDoesNotExistInArchitecture) + else { - //ignore, can't have a dependency anyways + yield return new ConditionResult(ruleType, false, failDescription); } } - - var ruleTypeList = ruleTypes.ToList(); - var passedObjects = ruleTypeList - .Where(type => type.GetAssignableTypes().Intersect(archUnitTypeList).Any()) - .ToList(); - string failDescription; - if (typeList.IsNullOrEmpty()) - { - failDescription = "is assignable to any type (always true)"; - } - else - { - failDescription = typeList - .Where(type => type != firstType) - .Distinct() - .Aggregate( - "is not assignable to \"" + firstType.FullName + "\"", - (current, type) => current + " or \"" + type.FullName + "\"" - ); - } - - foreach (var failedObject in ruleTypeList.Except(passedObjects)) - { - yield return new ConditionResult(failedObject, false, failDescription); - } - - foreach (var passedObject in passedObjects) - { - yield return new ConditionResult(passedObject, true); - } } - string description; - if (typeList.IsNullOrEmpty()) - { - description = "be assignable to no types (always false)"; - } - else - { - description = typeList - .Where(type => type != firstType) - .Distinct() - .Aggregate( - "be assignable to \"" + firstType.FullName + "\"", - (current, type) => current + " or \"" + type.FullName + "\"" - ); - } - - return new ArchitectureCondition( - Condition, - description - ).AsOrderedCondition(); - } - - public static IOrderedCondition BeNestedIn( - IType firstType, - params IType[] moreTypes - ) - { - var types = new List { firstType }; - types.AddRange(moreTypes); - return BeNestedIn(types); - } - - public static IOrderedCondition BeNestedIn( - Type firstType, - params Type[] moreTypes - ) - { - var types = new List { firstType }; - types.AddRange(moreTypes); - return BeNestedIn(types); + var description = objectProvider.FormatDescription( + "be assignable to no types (always false)", + "be assignable to", + "be assignable to" + ); + return new OrderedArchitectureCondition(Condition, description); } public static IOrderedCondition BeNestedIn(IObjectProvider objectProvider) @@ -311,159 +99,30 @@ Architecture architecture ) { var typeList = objectProvider.GetObjects(architecture).ToList(); - var ruleTypeList = ruleTypes.ToList(); - var passedObjects = ruleTypeList - .Where(type => - typeList.Any(outerType => - type.FullName.StartsWith(outerType.FullName + "+") - ) - ) - .ToList(); var failDescription = "is not nested in " + objectProvider.Description; - foreach (var failedObject in ruleTypeList.Except(passedObjects)) - { - yield return new ConditionResult(failedObject, false, failDescription); - } - - foreach (var passedObject in passedObjects) - { - yield return new ConditionResult(passedObject, true); - } - } - - var description = "be nested in " + objectProvider.Description; - return new ArchitectureCondition( - Condition, - description - ).AsOrderedCondition(); - } - - public static IOrderedCondition BeNestedIn(IEnumerable types) - { - var typeList = types.ToList(); - var firstType = typeList.First(); - - IEnumerable Condition(IEnumerable ruleTypes) - { - var ruleTypeList = ruleTypes.ToList(); - var passedObjects = ruleTypeList - .Where(type => - typeList.Any(outerType => - type.FullName.StartsWith(outerType.FullName + "+") - ) - ) - .ToList(); - string failDescription; - if (typeList.IsNullOrEmpty()) - { - failDescription = "is nested in any type (always true)"; - } - else - { - failDescription = typeList - .Where(type => !type.Equals(firstType)) - .Distinct() - .Aggregate( - "is not nested in \"" + firstType.FullName + "\"", - (current, type) => current + " or \"" + type.FullName + "\"" - ); - } - - foreach (var failedObject in ruleTypeList.Except(passedObjects)) - { - yield return new ConditionResult(failedObject, false, failDescription); - } - - foreach (var passedObject in passedObjects) + foreach (var ruleType in ruleTypes) { - yield return new ConditionResult(passedObject, true); - } - } - - string description; - if (typeList.IsNullOrEmpty()) - { - description = "be nested in no types (always false)"; - } - else - { - description = typeList - .Where(type => !type.Equals(firstType)) - .Distinct() - .Aggregate( - "be nested in \"" + firstType.FullName + "\"", - (current, type) => current + " or \"" + type.FullName + "\"" - ); - } - - return new EnumerableCondition(Condition, description).AsOrderedCondition(); - } - - public static IOrderedCondition BeNestedIn(IEnumerable types) - { - var typeList = types.ToList(); - var firstType = typeList.First(); - - IEnumerable Condition( - IEnumerable ruleTypes, - Architecture architecture - ) - { - var ruleTypeList = ruleTypes.ToList(); - var passedObjects = ruleTypeList - .Where(type => + if ( typeList.Any(outerType => - type.FullName.StartsWith(outerType.FullName + "+") + ruleType.FullName.StartsWith(outerType.FullName + "+") ) ) - .ToList(); - string failDescription; - if (typeList.IsNullOrEmpty()) - { - failDescription = "is nested in any type (always true)"; - } - else - { - failDescription = typeList - .Where(type => type != firstType) - .Distinct() - .Aggregate( - "is not nested in \"" + firstType.FullName + "\"", - (current, type) => current + " or \"" + type.FullName + "\"" - ); - } - - foreach (var failedObject in ruleTypeList.Except(passedObjects)) - { - yield return new ConditionResult(failedObject, false, failDescription); - } - - foreach (var passedObject in passedObjects) - { - yield return new ConditionResult(passedObject, true); + { + yield return new ConditionResult(ruleType, true); + } + else + { + yield return new ConditionResult(ruleType, false, failDescription); + } } } - string description; - if (typeList.IsNullOrEmpty()) - { - description = "be nested in no types (always false)"; - } - else - { - description = typeList - .Where(type => type != firstType) - .Distinct() - .Aggregate( - "be nested in \"" + firstType.FullName + "\"", - (current, type) => current + " or \"" + type.FullName + "\"" - ); - } - - return new ArchitectureCondition( - Condition, - description - ).AsOrderedCondition(); + var description = objectProvider.FormatDescription( + "be nested in no types (always false)", + "be nested in", + "be nested in" + ); + return new OrderedArchitectureCondition(Condition, description); } public static IOrderedCondition BeValueTypes() @@ -505,7 +164,6 @@ IEnumerable Condition( Architecture architecture ) { - var ruleTypeList = ruleTypes.ToList(); Interface archUnitInterface = null; var interfaceNotInArchitecture = false; try @@ -518,9 +176,21 @@ Architecture architecture interfaceNotInArchitecture = true; } - if (interfaceNotInArchitecture) + foreach (var ruleType in ruleTypes) { - foreach (var ruleType in ruleTypeList) + if (interfaceNotInArchitecture) + { + yield return new ConditionResult( + ruleType, + false, + "does not implement interface \"" + intf.FullName + "\"" + ); + } + else if (ruleType.ImplementsInterface(archUnitInterface)) + { + yield return new ConditionResult(ruleType, true); + } + else { yield return new ConditionResult( ruleType, @@ -528,33 +198,13 @@ Architecture architecture "does not implement interface \"" + intf.FullName + "\"" ); } - - yield break; - } - - var passedObjects = ruleTypeList - .Where(type => type.ImplementsInterface(archUnitInterface)) - .ToList(); - - foreach (var failedObject in ruleTypeList.Except(passedObjects)) - { - yield return new ConditionResult( - failedObject, - false, - "does not implement interface \"" + intf.FullName + "\"" - ); - } - - foreach (var passedObject in passedObjects) - { - yield return new ConditionResult(passedObject, true); } } - return new ArchitectureCondition( + return new OrderedArchitectureCondition( Condition, "implement interface \"" + intf.FullName + "\"" - ).AsOrderedCondition(); + ); } public static IOrderedCondition ImplementAny( @@ -595,10 +245,7 @@ Architecture architecture "implement", "implement any" ); - return new ArchitectureCondition( - Condition, - description - ).AsOrderedCondition(); + return new OrderedArchitectureCondition(Condition, description); } public static IOrderedCondition ResideInNamespace(string fullName) @@ -815,296 +462,71 @@ public static RelationCondition ImplementAnyInterfacesThat //Negations - public static IOrderedCondition NotBe(Type firstType, params Type[] moreTypes) - { - var types = new List { firstType }; - types.AddRange(moreTypes); - return NotBe(types); - } - - public static IOrderedCondition NotBe(IEnumerable types) - { - var typeList = types.ToList(); - - IEnumerable Condition( - IEnumerable ruleTypes, - Architecture architecture - ) - { - var archUnitTypeList = new List(); - foreach (var type in typeList) - { - try - { - var archUnitType = architecture.GetITypeOfType(type); - archUnitTypeList.Add(archUnitType); - } - catch (TypeDoesNotExistInArchitecture) - { - //ignore, can't be equal anyways - } - } - - var ruleTypeList = ruleTypes.ToList(); - var failedObjects = ruleTypeList - .OfType() - .Intersect(archUnitTypeList) - .ToList(); - foreach (var failedObject in failedObjects) - { - yield return new ConditionResult( - failedObject, - false, - "is " + failedObject.FullName - ); - } - - foreach (var passedObject in ruleTypeList.Cast().Except(failedObjects)) - { - yield return new ConditionResult(passedObject, true); - } - } - - string description; - if (typeList.IsNullOrEmpty()) - { - description = "not be no type (always true)"; - } - else - { - var firstType = typeList.First(); - description = typeList - .Where(type => type != firstType) - .Distinct() - .Aggregate( - "not be \"" + firstType.FullName + "\"", - (current, type) => current + " or \"" + type.FullName + "\"" - ); - } - - return new ArchitectureCondition( - Condition, - description - ).AsOrderedCondition(); - } - - public static IOrderedCondition NotBeAssignableTo( - IType firstType, - params IType[] moreTypes - ) - { - var types = new List { firstType }; - types.AddRange(moreTypes); - return NotBeAssignableTo(types); - } - - public static IOrderedCondition NotBeAssignableTo( - Type firstType, - params Type[] moreTypes - ) - { - var types = new List { firstType }; - types.AddRange(moreTypes); - return NotBeAssignableTo(types); - } - - public static IOrderedCondition NotBeAssignableTo( - IObjectProvider objectProvider - ) + public static IOrderedCondition NotBe(IObjectProvider objectProvider) { + var sizedObjectProvider = objectProvider as ISizedObjectProvider; IEnumerable Condition( IEnumerable ruleTypes, Architecture architecture ) { var typeList = objectProvider.GetObjects(architecture).ToList(); - var ruleTypeList = ruleTypes.ToList(); - var failedObjects = ruleTypeList - .Where(type => type.GetAssignableTypes().Intersect(typeList).Any()) - .ToList(); - var failDescription = "is assignable to " + objectProvider.Description; - foreach (var failedObject in failedObjects) - { - yield return new ConditionResult(failedObject, false, failDescription); - } - - foreach (var passedObject in ruleTypeList.Except(failedObjects)) - { - yield return new ConditionResult(passedObject, true); - } - } - - var description = "not be assignable to " + objectProvider.Description; - return new ArchitectureCondition( - Condition, - description - ).AsOrderedCondition(); - } - - public static IOrderedCondition NotBeAssignableTo(IEnumerable types) - { - var typeList = types.ToList(); - var firstType = typeList.First(); - - IEnumerable Condition(IEnumerable ruleTypes) - { - var ruleTypeList = ruleTypes.ToList(); - var failedObjects = ruleTypeList - .Where(type => type.GetAssignableTypes().Intersect(typeList).Any()) - .ToList(); - string dynamicFailDescription; - if (typeList.IsNullOrEmpty()) + var isForbiddenType = CreateLookupFn(typeList); + foreach (var ruleType in ruleTypes) { - dynamicFailDescription = "is assignable to any type (always true)"; - foreach (var failedObject in failedObjects) + if (!isForbiddenType(ruleType)) { - yield return new ConditionResult( - failedObject, - false, - dynamicFailDescription - ); + yield return new ConditionResult(ruleType, true); } - } - else - { - foreach (var failedObject in failedObjects) + else { - dynamicFailDescription = "is assignable to"; - var first = true; - foreach (var type in failedObject.GetAssignableTypes().Intersect(typeList)) - { - dynamicFailDescription += first - ? " " + type.FullName - : " and " + type.FullName; - first = false; - } - yield return new ConditionResult( - failedObject, + ruleType, false, - dynamicFailDescription + (sizedObjectProvider != null && sizedObjectProvider.Count == 0) + ? "does exist" + : "is " + objectProvider.Description ); } } - - foreach (var passedObject in ruleTypeList.Except(failedObjects)) - { - yield return new ConditionResult(passedObject, true); - } } - string description; - if (typeList.IsNullOrEmpty()) - { - description = "not be assignable to no types (always true)"; - } - else - { - description = typeList - .Where(type => !type.Equals(firstType)) - .Distinct() - .Aggregate( - "not be assignable to \"" + firstType.FullName + "\"", - (current, type) => current + " or \"" + type.FullName + "\"" - ); - } - - return new EnumerableCondition(Condition, description).AsOrderedCondition(); + var description = objectProvider.FormatDescription("exist", "not be", "not be"); + return new OrderedArchitectureCondition(Condition, description); } - public static IOrderedCondition NotBeAssignableTo(IEnumerable types) + public static IOrderedCondition NotBeAssignableTo( + IObjectProvider objectProvider + ) { - var typeList = types.ToList(); - var firstType = typeList.First(); - IEnumerable Condition( IEnumerable ruleTypes, Architecture architecture ) { - var archUnitTypeList = new List(); - foreach (var type in typeList) - { - try - { - var archUnitType = architecture.GetITypeOfType(type); - archUnitTypeList.Add(archUnitType); - } - catch (TypeDoesNotExistInArchitecture) - { - //ignore, can't have a dependency anyways - } - } - - var ruleTypeList = ruleTypes.ToList(); - var failedObjects = ruleTypeList - .Where(type => type.GetAssignableTypes().Intersect(archUnitTypeList).Any()) - .ToList(); - string dynamicFailDescription; - if (typeList.IsNullOrEmpty()) + var isForbiddenType = CreateLookupFn( + objectProvider.GetObjects(architecture).ToList() + ); + var failDescription = "is assignable to " + objectProvider.Description; + foreach (var ruleType in ruleTypes) { - dynamicFailDescription = "is assignable to any type (always true)"; - foreach (var failedObject in failedObjects) + if (ruleType.GetAssignableTypes().Any(isForbiddenType)) { - yield return new ConditionResult( - failedObject, - false, - dynamicFailDescription - ); + yield return new ConditionResult(ruleType, false, failDescription); } - } - else - { - foreach (var failedObject in failedObjects) + else { - dynamicFailDescription = "is assignable to"; - var first = true; - foreach ( - var type in failedObject - .GetAssignableTypes() - .Intersect(archUnitTypeList) - ) - { - dynamicFailDescription += first - ? " " + type.FullName - : " and " + type.FullName; - first = false; - } - - yield return new ConditionResult( - failedObject, - false, - dynamicFailDescription - ); + yield return new ConditionResult(ruleType, true); } } - - foreach (var passedObject in ruleTypeList.Except(failedObjects)) - { - yield return new ConditionResult(passedObject, true); - } } - string description; - if (typeList.IsNullOrEmpty()) - { - description = "not be assignable to no types (always true)"; - } - else - { - description = typeList - .Where(type => type != firstType) - .Distinct() - .Aggregate( - "not be assignable to \"" + firstType.FullName + "\"", - (current, type) => current + " or \"" + type.FullName + "\"" - ); - } - - return new ArchitectureCondition( - Condition, - description - ).AsOrderedCondition(); + var description = objectProvider.FormatDescription( + "not be assignable to no types (always true)", + "not be assignable to", + "not be assignable to" + ); + return new OrderedArchitectureCondition(Condition, description); } public static IOrderedCondition NotBeValueTypes() @@ -1150,7 +572,6 @@ IEnumerable Condition( Architecture architecture ) { - var ruleTypeList = ruleTypes.ToList(); Interface archUnitInterface = null; var interfaceNotInArchitecture = false; try @@ -1163,39 +584,31 @@ Architecture architecture interfaceNotInArchitecture = true; } - if (interfaceNotInArchitecture) + foreach (var ruleType in ruleTypes) { - foreach (var ruleType in ruleTypeList) + if (interfaceNotInArchitecture) { yield return new ConditionResult(ruleType, true); } - - yield break; - } - - var passedObjects = ruleTypeList - .Where(type => !type.ImplementsInterface(archUnitInterface)) - .ToList(); - - foreach (var failedObject in ruleTypeList.Except(passedObjects)) - { - yield return new ConditionResult( - failedObject, - false, - "does implement interface \"" + intf.FullName + "\"" - ); - } - - foreach (var passedObject in passedObjects) - { - yield return new ConditionResult(passedObject, true); + else if (!ruleType.ImplementsInterface(archUnitInterface)) + { + yield return new ConditionResult(ruleType, true); + } + else + { + yield return new ConditionResult( + ruleType, + false, + "does implement interface \"" + intf.FullName + "\"" + ); + } } } - return new ArchitectureCondition( + return new OrderedArchitectureCondition( Condition, "not implement interface \"" + intf.FullName + "\"" - ).AsOrderedCondition(); + ); } public static IOrderedCondition NotImplementAny( @@ -1208,7 +621,7 @@ Architecture architecture ) { var interfaceList = interfaces.GetObjects(architecture).ToList(); - foreach (var ruleType in ruleTypes.ToList()) + foreach (var ruleType in ruleTypes) { var matchingInterfaces = ruleType.ImplementedInterfaces.Intersect( interfaceList @@ -1234,10 +647,7 @@ Architecture architecture "not implement", "not implement any" ); - return new ArchitectureCondition( - Condition, - description - ).AsOrderedCondition(); + return new OrderedArchitectureCondition(Condition, description); } public static IOrderedCondition NotResideInNamespace(string fullName) diff --git a/ArchUnitNET/Fluent/Syntax/Elements/Types/TypePredicatesDefinition.cs b/ArchUnitNET/Fluent/Syntax/Elements/Types/TypePredicatesDefinition.cs index 2031e1a62..2ad80b2f0 100644 --- a/ArchUnitNET/Fluent/Syntax/Elements/Types/TypePredicatesDefinition.cs +++ b/ArchUnitNET/Fluent/Syntax/Elements/Types/TypePredicatesDefinition.cs @@ -10,91 +10,21 @@ namespace ArchUnitNET.Fluent.Syntax.Elements.Types { - public static class TypePredicatesDefinition + internal static class TypePredicatesDefinition where T : IType { - public static IPredicate Are(Type firstType, params Type[] moreTypes) + public static IPredicate Are(IObjectProvider objectProvider) { - var types = new List { firstType }; - types.AddRange(moreTypes); - return Are(types); - } - - public static IPredicate Are(IEnumerable types) - { - var typeList = types.ToList(); - - IEnumerable Filter(IEnumerable ruleTypes, Architecture architecture) - { - var archUnitTypeList = new List(); - foreach (var type in typeList) - { - try - { - var archUnitType = architecture.GetITypeOfType(type); - archUnitTypeList.Add(archUnitType); - } - catch (TypeDoesNotExistInArchitecture) - { - //ignore, can't be equal anyways - } - } - - return ruleTypes.Intersect(archUnitTypeList.OfType()); - } - - string description; - if (typeList.IsNullOrEmpty()) - { - description = "do not exist"; - } - else + IEnumerable Filter(IEnumerable objects, Architecture architecture) { - var firstType = typeList.First(); - description = typeList - .Where(obj => obj != firstType) - .Distinct() - .Aggregate( - "are \"" + firstType.FullName + "\"", - (current, obj) => current + " or \"" + obj.FullName + "\"" - ); + var typeList = objectProvider.GetObjects(architecture).ToList(); + return objects.OfType().Intersect(typeList).Cast(); } + var description = objectProvider.FormatDescription("do not exist", "are", "are"); return new ArchitecturePredicate(Filter, description); } - public static IPredicate AreAssignableTo(IType firstType, params IType[] moreTypes) - { - IEnumerable Condition(IEnumerable ruleTypes) - { - var types = moreTypes.Concat(new[] { firstType }); - return ruleTypes.Where(type => type.GetAssignableTypes().Intersect(types).Any()); - } - - var description = moreTypes.Aggregate( - "are assignable to \"" + firstType.FullName + "\"", - (current, type) => current + " or \"" + type.FullName + "\"" - ); - return new EnumerablePredicate(Condition, description); - } - - public static IPredicate AreAssignableTo(Type firstType, params Type[] moreTypes) - { - IEnumerable Condition(IEnumerable ruleTypes, Architecture architecture) - { - var types = moreTypes - .Concat(new[] { firstType }) - .Select(architecture.GetITypeOfType); - return ruleTypes.Where(type => type.GetAssignableTypes().Intersect(types).Any()); - } - - var description = moreTypes.Aggregate( - "are assignable to \"" + firstType.FullName + "\"", - (current, type) => current + " or \"" + type.FullName + "\"" - ); - return new ArchitecturePredicate(Condition, description); - } - public static IPredicate AreAssignableTo(IObjectProvider objectProvider) { IEnumerable Condition(IEnumerable ruleTypes, Architecture architecture) @@ -103,114 +33,10 @@ IEnumerable Condition(IEnumerable ruleTypes, Architecture architecture) return ruleTypes.Where(type => type.GetAssignableTypes().Intersect(types).Any()); } - var description = "are assignable to " + objectProvider.Description; - return new ArchitecturePredicate(Condition, description); - } - - public static IPredicate AreAssignableTo(IEnumerable types) - { - var typeList = types.ToList(); - - IEnumerable Condition(IEnumerable ruleTypes) - { - return ruleTypes.Where(type => type.GetAssignableTypes().Intersect(typeList).Any()); - } - - string description; - if (typeList.IsNullOrEmpty()) - { - description = "are assignable to no types (always false)"; - } - else - { - var firstType = typeList.First(); - description = typeList - .Where(type => !type.Equals(firstType)) - .Distinct() - .Aggregate( - "are assignable to \"" + firstType.FullName + "\"", - (current, type) => current + " or \"" + type.FullName + "\"" - ); - } - - return new EnumerablePredicate(Condition, description); - } - - public static IPredicate AreAssignableTo(IEnumerable types) - { - var typeList = types.ToList(); - - IEnumerable Condition(IEnumerable ruleTypes, Architecture architecture) - { - var archUnitTypeList = new List(); - foreach (var type in typeList) - { - try - { - var archUnitType = architecture.GetITypeOfType(type); - archUnitTypeList.Add(archUnitType); - } - catch (TypeDoesNotExistInArchitecture) - { - //ignore, can't have a dependency anyways - } - } - - return ruleTypes.Where(type => - type.GetAssignableTypes().Intersect(archUnitTypeList).Any() - ); - } - - string description; - if (typeList.IsNullOrEmpty()) - { - description = "are assignable to no types (always false)"; - } - else - { - var firstType = typeList.First(); - description = typeList - .Where(type => type != firstType) - .Distinct() - .Aggregate( - "are assignable to \"" + firstType.FullName + "\"", - (current, type) => current + " or \"" + type.FullName + "\"" - ); - } - return new ArchitecturePredicate(Condition, description); - } - - public static IPredicate AreNestedIn(IType firstType, params IType[] moreTypes) - { - IEnumerable Condition(IEnumerable ruleTypes) - { - var types = moreTypes.Concat(new[] { firstType }); - return ruleTypes.Where(type => - types.Any(outerType => type.FullName.StartsWith(outerType.FullName + "+")) - ); - } - - var description = moreTypes.Aggregate( - "are nested in \"" + firstType.FullName + "\"", - (current, type) => current + " or \"" + type.FullName + "\"" - ); - return new EnumerablePredicate(Condition, description); - } - - public static IPredicate AreNestedIn(Type firstType, params Type[] moreTypes) - { - IEnumerable Condition(IEnumerable ruleTypes, Architecture architecture) - { - var types = moreTypes - .Concat(new[] { firstType }) - .Select(architecture.GetITypeOfType); - return ruleTypes.Where(type => - types.Any(outerType => type.FullName.StartsWith(outerType.FullName + "+")) - ); - } - var description = moreTypes.Aggregate( - "are nested in \"" + firstType.FullName + "\"", - (current, type) => current + " or \"" + type.FullName + "\"" + var description = objectProvider.FormatDescription( + "are assignable to no types (always false)", + "are assignable to", + "are assignable to" ); return new ArchitecturePredicate(Condition, description); } @@ -225,69 +51,11 @@ IEnumerable Condition(IEnumerable ruleTypes, Architecture architecture) ); } - var description = "are nested in " + objectProvider.Description; - return new ArchitecturePredicate(Condition, description); - } - - public static IPredicate AreNestedIn(IEnumerable types) - { - var typeList = types.ToList(); - - IEnumerable Condition(IEnumerable ruleTypes) - { - return ruleTypes.Where(type => - typeList.Any(outerType => type.FullName.StartsWith(outerType.FullName + "+")) - ); - } - - string description; - if (typeList.IsNullOrEmpty()) - { - description = "are nested in no types (always false)"; - } - else - { - var firstType = typeList.First(); - description = typeList - .Where(type => !type.Equals(firstType)) - .Distinct() - .Aggregate( - "are nested in \"" + firstType.FullName + "\"", - (current, type) => current + " or \"" + type.FullName + "\"" - ); - } - - return new EnumerablePredicate(Condition, description); - } - - public static IPredicate AreNestedIn(IEnumerable types) - { - var typeList = types.ToList(); - - IEnumerable Condition(IEnumerable ruleTypes, Architecture architecture) - { - return ruleTypes.Where(type => - typeList.Any(outerType => type.FullName.StartsWith(outerType.FullName + "+")) - ); - } - - string description; - if (typeList.IsNullOrEmpty()) - { - description = "are nested in no types (always false)"; - } - else - { - var firstType = typeList.First(); - description = typeList - .Where(type => type != firstType) - .Distinct() - .Aggregate( - "are nested in \"" + firstType.FullName + "\"", - (current, type) => current + " or \"" + type.FullName + "\"" - ); - } - + var description = objectProvider.FormatDescription( + "are nested in no types (always false)", + "are nested in", + "are nested in" + ); return new ArchitecturePredicate(Condition, description); } @@ -470,84 +238,20 @@ public static IPredicate AreNested() //Negations - public static IPredicate AreNot(Type firstType, params Type[] moreTypes) - { - return AreNot(new List() { firstType }.Concat(moreTypes)); - } - - public static IPredicate AreNot(IEnumerable types) + public static IPredicate AreNot(IObjectProvider objectProvider) { - var typeList = types.ToList(); - - IEnumerable Filter(IEnumerable ruleTypes, Architecture architecture) + IEnumerable Filter(IEnumerable objects, Architecture architecture) { - var archUnitTypeList = new List(); - foreach (var type in typeList) - { - try - { - var archUnitType = architecture.GetITypeOfType(type); - archUnitTypeList.Add(archUnitType); - } - catch (TypeDoesNotExistInArchitecture) - { - //ignore, can't be equal anyways - } - } - - return ruleTypes.Except(archUnitTypeList.OfType()); + var typeList = objectProvider.GetObjects(architecture).ToList(); + return objects.Except(typeList.OfType()); } - string description; - if (typeList.IsNullOrEmpty()) - { - description = "are not no types (always true)"; - } - else - { - var firstType = typeList.First(); - description = typeList - .Where(obj => obj != firstType) - .Distinct() - .Aggregate( - "are not \"" + firstType.FullName + "\"", - (current, obj) => current + " or \"" + obj.FullName + "\"" - ); - } - - return new ArchitecturePredicate(Filter, description); - } - - public static IPredicate AreNotAssignableTo(IType firstType, params IType[] moreTypes) - { - IEnumerable Condition(IEnumerable ruleTypes) - { - var types = moreTypes.Concat(new[] { firstType }); - return ruleTypes.Where(type => !type.GetAssignableTypes().Intersect(types).Any()); - } - - var description = moreTypes.Aggregate( - "are not assignable to \"" + firstType.FullName + "\"", - (current, type) => current + " or \"" + type.FullName + "\"" + var description = objectProvider.FormatDescription( + "are all types", + "are not", + "are not" ); - return new EnumerablePredicate(Condition, description); - } - - public static IPredicate AreNotAssignableTo(Type firstType, params Type[] moreTypes) - { - IEnumerable Condition(IEnumerable ruleTypes, Architecture architecture) - { - var types = moreTypes - .Concat(new[] { firstType }) - .Select(architecture.GetITypeOfType); - return ruleTypes.Where(type => !type.GetAssignableTypes().Intersect(types).Any()); - } - - var description = moreTypes.Aggregate( - "are not assignable to \"" + firstType.FullName + "\"", - (current, type) => current + " or \"" + type.FullName + "\"" - ); - return new ArchitecturePredicate(Condition, description); + return new ArchitecturePredicate(Filter, description); } public static IPredicate AreNotAssignableTo(IObjectProvider objectProvider) @@ -558,83 +262,11 @@ IEnumerable Condition(IEnumerable ruleTypes, Architecture architecture) return ruleTypes.Where(type => !type.GetAssignableTypes().Intersect(types).Any()); } - var description = "are not assignable to " + objectProvider.Description; - return new ArchitecturePredicate(Condition, description); - } - - public static IPredicate AreNotAssignableTo(IEnumerable types) - { - var typeList = types.ToList(); - - IEnumerable Condition(IEnumerable ruleTypes) - { - return ruleTypes.Where(type => - !type.GetAssignableTypes().Intersect(typeList).Any() - ); - } - - string description; - if (typeList.IsNullOrEmpty()) - { - description = "are not assignable to no types (always true)"; - } - else - { - var firstType = typeList.First(); - description = typeList - .Where(type => !type.Equals(firstType)) - .Distinct() - .Aggregate( - "are not assignable to \"" + firstType.FullName + "\"", - (current, type) => current + " or \"" + type.FullName + "\"" - ); - } - - return new EnumerablePredicate(Condition, description); - } - - public static IPredicate AreNotAssignableTo(IEnumerable types) - { - var typeList = types.ToList(); - - IEnumerable Condition(IEnumerable ruleTypes, Architecture architecture) - { - var archUnitTypeList = new List(); - foreach (var type in typeList) - { - try - { - var archUnitType = architecture.GetITypeOfType(type); - archUnitTypeList.Add(archUnitType); - } - catch (TypeDoesNotExistInArchitecture) - { - //ignore, can't have a dependency anyways - } - } - - return ruleTypes.Where(type => - !type.GetAssignableTypes().Intersect(archUnitTypeList).Any() - ); - } - - string description; - if (typeList.IsNullOrEmpty()) - { - description = "are not assignable to no types (always true)"; - } - else - { - var firstType = typeList.First(); - description = typeList - .Where(type => type != firstType) - .Distinct() - .Aggregate( - "are not assignable to \"" + firstType.FullName + "\"", - (current, type) => current + " or \"" + type.FullName + "\"" - ); - } - + var description = objectProvider.FormatDescription( + "are not assignable to no types (always true)", + "are not assignable to", + "are not assignable to" + ); return new ArchitecturePredicate(Condition, description); } diff --git a/ArchUnitNETTests/ArchUnitNETTests.csproj b/ArchUnitNETTests/ArchUnitNETTests.csproj index d62bb28df..631aec75e 100644 --- a/ArchUnitNETTests/ArchUnitNETTests.csproj +++ b/ArchUnitNETTests/ArchUnitNETTests.csproj @@ -14,10 +14,10 @@ - - + + + diff --git a/ArchUnitNETTests/AssemblyTestHelper/InterfaceAssemblyTestHelper.cs b/ArchUnitNETTests/AssemblyTestHelper/InterfaceAssemblyTestHelper.cs deleted file mode 100644 index 6ce265878..000000000 --- a/ArchUnitNETTests/AssemblyTestHelper/InterfaceAssemblyTestHelper.cs +++ /dev/null @@ -1,45 +0,0 @@ -using System; -using ArchUnitNET.Domain; -using ArchUnitNET.Domain.Extensions; -using InterfaceAssembly; - -namespace ArchUnitNETTests.AssemblyTestHelper; - -public class InterfaceAssemblyTestHelper : AssemblyTestHelper -{ - public sealed override Architecture Architecture => - StaticTestArchitectures.InterfaceArchitecture; - - public Interface BaseInterface; - public Type BaseInterfaceSystemType = typeof(IBaseInterface); - - public Interface OtherBaseInterface; - public Type OtherBaseInterfaceSystemType = typeof(IOtherBaseInterface); - - public Interface ChildInterface; - public Type ChildInterfaceSystemType = typeof(IChildInterface); - - public Interface OtherChildInterface; - public Type OtherChildInterfaceSystemType = typeof(IOtherChildInterface); - - public Interface InterfaceWithMultipleDependencies; - public Type InterfaceWithMultipleDependenciesSystemType = - typeof(IInterfaceWithMultipleDependencies); - - public Interface InterfaceWithoutDependencies; - public Type InterfaceWithoutDependenciesSystemType = typeof(IInterfaceWithoutDependencies); - - public InterfaceAssemblyTestHelper() - { - BaseInterface = Architecture.GetInterfaceOfType(typeof(IBaseInterface)); - OtherBaseInterface = Architecture.GetInterfaceOfType(typeof(IOtherBaseInterface)); - ChildInterface = Architecture.GetInterfaceOfType(typeof(IChildInterface)); - OtherChildInterface = Architecture.GetInterfaceOfType(typeof(IOtherChildInterface)); - InterfaceWithMultipleDependencies = Architecture.GetInterfaceOfType( - typeof(IInterfaceWithMultipleDependencies) - ); - InterfaceWithoutDependencies = Architecture.GetInterfaceOfType( - typeof(IInterfaceWithoutDependencies) - ); - } -} diff --git a/ArchUnitNETTests/AssemblyTestHelper/MethodDependencyAssemblyTestHelper.cs b/ArchUnitNETTests/AssemblyTestHelper/MethodDependencyAssemblyTestHelper.cs new file mode 100644 index 000000000..99a5a9eae --- /dev/null +++ b/ArchUnitNETTests/AssemblyTestHelper/MethodDependencyAssemblyTestHelper.cs @@ -0,0 +1,42 @@ +using System.Linq; +using ArchUnitNET.Domain; +using ArchUnitNET.Domain.Extensions; + +namespace ArchUnitNETTests.AssemblyTestHelper; + +public class MethodDependencyAssemblyTestHelper : AssemblyTestHelper +{ + public sealed override Architecture Architecture => + StaticTestArchitectures.MethodDependencyArchitecture; + + public MethodMember MethodWithSingleDependency; + + public MethodMember CalledMethod; + + public MethodMember MethodWithMultipleDependencies; + + public MethodMember CalledMethod1; + + public MethodMember CalledMethod2; + + public MethodMember CalledMethod3; + + public MethodMember MethodWithoutDependencies; + + public MethodDependencyAssemblyTestHelper() + { + MethodWithSingleDependency = Architecture + .MethodMembers.WhereNameIs("MethodWithSingleDependency()") + .First(); + CalledMethod = Architecture.MethodMembers.WhereNameIs("CalledMethod()").First(); + MethodWithMultipleDependencies = Architecture + .MethodMembers.WhereNameIs("MethodWithMultipleDependencies()") + .First(); + CalledMethod1 = Architecture.MethodMembers.WhereNameIs("CalledMethod1()").First(); + CalledMethod2 = Architecture.MethodMembers.WhereNameIs("CalledMethod2()").First(); + CalledMethod3 = Architecture.MethodMembers.WhereNameIs("CalledMethod3()").First(); + MethodWithoutDependencies = Architecture + .MethodMembers.WhereNameIs("MethodWithoutDependencies()") + .First(); + } +} diff --git a/ArchUnitNETTests/AssemblyTestHelper/TypeAssemblyTestHelper.cs b/ArchUnitNETTests/AssemblyTestHelper/TypeAssemblyTestHelper.cs new file mode 100644 index 000000000..c4135e7e2 --- /dev/null +++ b/ArchUnitNETTests/AssemblyTestHelper/TypeAssemblyTestHelper.cs @@ -0,0 +1,164 @@ +using System; +using System.Linq; +using ArchUnitNET.Domain; +using ArchUnitNET.Domain.Extensions; +using TypeNamespace; + +namespace ArchUnitNETTests.AssemblyTestHelper; + +public class TypeAssemblyTestHelper : AssemblyTestHelper +{ + public sealed override Architecture Architecture => StaticTestArchitectures.TypeArchitecture; + + // Enums + public IType SimpleEnum; + public Type SimpleEnumSystemType = typeof(SimpleEnum); + + public IType OtherEnum; + public Type OtherEnumSystemType = typeof(OtherEnum); + + // Structs + public IType SimpleStruct; + public Type SimpleStructSystemType = typeof(SimpleStruct); + + public IType OtherStruct; + public Type OtherStructSystemType = typeof(OtherStruct); + + // Regular classes + public Class RegularClass; + public Type RegularClassSystemType = typeof(RegularClass); + + public Class OtherRegularClass; + public Type OtherRegularClassSystemType = typeof(OtherRegularClass); + + // Member classes + public Class ClassWithProperty; + public Type ClassWithPropertySystemType = typeof(ClassWithProperty); + + public Class ClassWithField; + public Type ClassWithFieldSystemType = typeof(ClassWithField); + + public Class ClassWithMethod; + public Type ClassWithMethodSystemType = typeof(ClassWithMethod); + + public Class ClassWithAllMembers; + public Type ClassWithAllMembersSystemType = typeof(ClassWithAllMembers); + + public Class ClassWithoutMembers; + public Type ClassWithoutMembersSystemType = typeof(ClassWithoutMembers); + + // Nested classes + public Class OuterClassA; + public Type OuterClassASystemType = typeof(OuterClassA); + + public Class OuterClassB; + public Type OuterClassBSystemType = typeof(OuterClassB); + + public Class InnerClassA; + public Type InnerClassASystemType = typeof(OuterClassA.InnerClassA); + + public Class OtherInnerClassA; + public Type OtherInnerClassASystemType = typeof(OuterClassA.OtherInnerClassA); + + public Class InnerClassB; + public Type InnerClassBSystemType = typeof(OuterClassB.InnerClassB); + + public Class NonNestedClass; + public Type NonNestedClassSystemType = typeof(NonNestedClass); + + // Interfaces + public Interface TestInterface; + public Type TestInterfaceSystemType = typeof(ITestInterface); + + public Interface OtherTestInterface; + public Type OtherTestInterfaceSystemType = typeof(IOtherTestInterface); + + public Interface ChildTestInterface; + public Type ChildTestInterfaceSystemType = typeof(IChildTestInterface); + + public Interface OtherChildTestInterface; + public Type OtherChildTestInterfaceSystemType = typeof(IOtherChildTestInterface); + + public Interface MultiParentTestInterface; + public Type MultiParentTestInterfaceSystemType = typeof(IMultiParentTestInterface); + + public Interface StandaloneTestInterface; + public Type StandaloneTestInterfaceSystemType = typeof(IStandaloneTestInterface); + + // Interface implementation + public Class ClassImplementingInterface; + public Type ClassImplementingInterfaceSystemType = typeof(ClassImplementingInterface); + + public Class ClassNotImplementingInterface; + public Type ClassNotImplementingInterfaceSystemType = typeof(ClassNotImplementingInterface); + + // Assignability + public Class BaseClassForAssign; + public Type BaseClassForAssignSystemType = typeof(BaseClassForAssign); + + public Class OtherBaseClassForAssign; + public Type OtherBaseClassForAssignSystemType = typeof(OtherBaseClassForAssign); + + public Class DerivedClassForAssign; + public Type DerivedClassForAssignSystemType = typeof(DerivedClassForAssign); + + public Class OtherDerivedClassForAssign; + public Type OtherDerivedClassForAssignSystemType = typeof(OtherDerivedClassForAssign); + + public Class UnrelatedClassForAssign; + public Type UnrelatedClassForAssignSystemType = typeof(UnrelatedClassForAssign); + + public Class OtherUnrelatedClassForAssign; + public Type OtherUnrelatedClassForAssignSystemType = typeof(OtherUnrelatedClassForAssign); + + public TypeAssemblyTestHelper() + { + SimpleEnum = Architecture.GetITypeOfType(typeof(SimpleEnum)); + OtherEnum = Architecture.GetITypeOfType(typeof(OtherEnum)); + SimpleStruct = Architecture.GetITypeOfType(typeof(SimpleStruct)); + OtherStruct = Architecture.GetITypeOfType(typeof(OtherStruct)); + + RegularClass = Architecture.GetClassOfType(typeof(RegularClass)); + OtherRegularClass = Architecture.GetClassOfType(typeof(OtherRegularClass)); + + ClassWithProperty = Architecture.GetClassOfType(typeof(ClassWithProperty)); + ClassWithField = Architecture.GetClassOfType(typeof(ClassWithField)); + ClassWithMethod = Architecture.GetClassOfType(typeof(ClassWithMethod)); + ClassWithAllMembers = Architecture.GetClassOfType(typeof(ClassWithAllMembers)); + ClassWithoutMembers = Architecture.GetClassOfType(typeof(ClassWithoutMembers)); + + OuterClassA = Architecture.GetClassOfType(typeof(OuterClassA)); + OuterClassB = Architecture.GetClassOfType(typeof(OuterClassB)); + InnerClassA = Architecture.GetClassOfType(typeof(OuterClassA.InnerClassA)); + OtherInnerClassA = Architecture.GetClassOfType(typeof(OuterClassA.OtherInnerClassA)); + InnerClassB = Architecture.GetClassOfType(typeof(OuterClassB.InnerClassB)); + NonNestedClass = Architecture.GetClassOfType(typeof(NonNestedClass)); + + TestInterface = Architecture.GetInterfaceOfType(typeof(ITestInterface)); + OtherTestInterface = Architecture.GetInterfaceOfType(typeof(IOtherTestInterface)); + ChildTestInterface = Architecture.GetInterfaceOfType(typeof(IChildTestInterface)); + OtherChildTestInterface = Architecture.GetInterfaceOfType(typeof(IOtherChildTestInterface)); + MultiParentTestInterface = Architecture.GetInterfaceOfType( + typeof(IMultiParentTestInterface) + ); + StandaloneTestInterface = Architecture.GetInterfaceOfType(typeof(IStandaloneTestInterface)); + + ClassImplementingInterface = Architecture.GetClassOfType( + typeof(ClassImplementingInterface) + ); + ClassNotImplementingInterface = Architecture.GetClassOfType( + typeof(ClassNotImplementingInterface) + ); + + BaseClassForAssign = Architecture.GetClassOfType(typeof(BaseClassForAssign)); + OtherBaseClassForAssign = Architecture.GetClassOfType(typeof(OtherBaseClassForAssign)); + DerivedClassForAssign = Architecture.GetClassOfType(typeof(DerivedClassForAssign)); + OtherDerivedClassForAssign = Architecture.GetClassOfType( + typeof(OtherDerivedClassForAssign) + ); + UnrelatedClassForAssign = Architecture.GetClassOfType(typeof(UnrelatedClassForAssign)); + OtherUnrelatedClassForAssign = Architecture.GetClassOfType( + typeof(OtherUnrelatedClassForAssign) + ); + } +} diff --git a/ArchUnitNETTests/AssemblyTestHelper/DependencyAssemblyTestHelpers.cs b/ArchUnitNETTests/AssemblyTestHelper/TypeDependencyAssemblyTestHelper.cs similarity index 73% rename from ArchUnitNETTests/AssemblyTestHelper/DependencyAssemblyTestHelpers.cs rename to ArchUnitNETTests/AssemblyTestHelper/TypeDependencyAssemblyTestHelper.cs index a001222ab..0a1a1eb7d 100644 --- a/ArchUnitNETTests/AssemblyTestHelper/DependencyAssemblyTestHelpers.cs +++ b/ArchUnitNETTests/AssemblyTestHelper/TypeDependencyAssemblyTestHelper.cs @@ -1,16 +1,15 @@ using System; using System.Collections.Generic; -using System.Linq; using ArchUnitNET.Domain; using ArchUnitNET.Domain.Extensions; using TypeDependencyNamespace; namespace ArchUnitNETTests.AssemblyTestHelper; -public class DependencyAssemblyTestHelper : AssemblyTestHelper +public class TypeDependencyAssemblyTestHelper : AssemblyTestHelper { public sealed override Architecture Architecture => - StaticTestArchitectures.DependencyArchitecture; + StaticTestArchitectures.TypeDependencyArchitecture; public Class BaseClass; public Type BaseClassSystemType = typeof(BaseClass); @@ -64,23 +63,7 @@ public class DependencyAssemblyTestHelper : AssemblyTestHelper public Type ReferencedType = typeof(List<>); - public MethodMember MethodWithSingleDependency; - - public MethodMember CalledMethod; - - public MethodMember MethodWithMultipleDependencies; - - public MethodMember CalledMethod1; - - public MethodMember CalledMethod2; - - public MethodMember CalledMethod3; - - public MethodMember UnusedMethod; - - public MethodMember MethodWithoutDependencies; - - public DependencyAssemblyTestHelper() + public TypeDependencyAssemblyTestHelper() { BaseClass = Architecture.GetClassOfType(typeof(BaseClass)); ChildClass = Architecture.GetClassOfType(typeof(ChildClass)); @@ -106,18 +89,5 @@ public DependencyAssemblyTestHelper() ClassWithReferencedTypeDependency = Architecture.GetClassOfType( typeof(ClassWithReferencedTypeDependency) ); - MethodWithSingleDependency = Architecture - .MethodMembers.WhereNameIs("MethodWithSingleDependency()") - .First(); - CalledMethod = Architecture.MethodMembers.WhereNameIs("CalledMethod()").First(); - MethodWithMultipleDependencies = Architecture - .MethodMembers.WhereNameIs("MethodWithMultipleDependencies()") - .First(); - CalledMethod1 = Architecture.MethodMembers.WhereNameIs("CalledMethod1()").First(); - CalledMethod2 = Architecture.MethodMembers.WhereNameIs("CalledMethod2()").First(); - CalledMethod3 = Architecture.MethodMembers.WhereNameIs("CalledMethod3()").First(); - MethodWithoutDependencies = Architecture - .MethodMembers.WhereNameIs("MethodWithoutDependencies()") - .First(); } } diff --git a/ArchUnitNETTests/Fluent/NoErrorReferencingOfTypesOutsideOfArchitectureTests.cs b/ArchUnitNETTests/Fluent/NoErrorReferencingOfTypesOutsideOfArchitectureTests.cs index 634f30025..bf40b0497 100644 --- a/ArchUnitNETTests/Fluent/NoErrorReferencingOfTypesOutsideOfArchitectureTests.cs +++ b/ArchUnitNETTests/Fluent/NoErrorReferencingOfTypesOutsideOfArchitectureTests.cs @@ -33,57 +33,6 @@ private static void AssertNoException(Action action) Assert.Null(exception); } - [Fact] - public void AreBeTest() - { - var rule = Classes() - .That() - .Are(typeof(EmptyTestClass)) - .Should() - .Be(_classNotInArchitecture); - var negation = Classes() - .That() - .Are(typeof(EmptyTestClass)) - .Should() - .NotBe(_classNotInArchitecture); - Assert.Throws(() => rule.Check(Architecture)); - negation.Check(Architecture); - - AssertNoException(() => - Classes().That().Are(_classNotInArchitecture).GetObjects(Architecture) - ); - AssertNoException(() => - Classes().That().AreNot(_classNotInArchitecture).GetObjects(Architecture) - ); - } - - [Fact] - public void AreAssignableTest() - { - var rule = Classes() - .That() - .Are(typeof(EmptyTestClass)) - .Should() - .BeAssignableTo(_classNotInArchitecture); - var negation = Classes() - .That() - .Are(typeof(EmptyTestClass)) - .Should() - .NotBeAssignableTo(_classNotInArchitecture); - Assert.Throws(() => rule.Check(Architecture)); - negation.Check(Architecture); - - AssertNoException(() => - Classes().That().AreAssignableTo(_classNotInArchitecture).GetObjects(Architecture) - ); - AssertNoException(() => - Classes() - .That() - .AreNotAssignableTo(_classNotInArchitecture) - .GetObjects(Architecture) - ); - } - [Fact] public void ImplementInterfaceTest() { diff --git a/ArchUnitNETTests/Fluent/Syntax/Elements/ObjectSyntaxElementsTests.cs b/ArchUnitNETTests/Fluent/Syntax/Elements/ObjectSyntaxElementsTests.cs index 32f37e3d2..beeefb49f 100644 --- a/ArchUnitNETTests/Fluent/Syntax/Elements/ObjectSyntaxElementsTests.cs +++ b/ArchUnitNETTests/Fluent/Syntax/Elements/ObjectSyntaxElementsTests.cs @@ -20,7 +20,7 @@ public class ObjectSyntaxElementsTests [Fact] public async Task AreTest() { - var helper = new DependencyAssemblyTestHelper(); + var helper = new TypeDependencyAssemblyTestHelper(); // Single argument var predicates = new List { @@ -62,7 +62,7 @@ public async Task AreTest() [Fact] public async Task BeTest() { - var helper = new DependencyAssemblyTestHelper(); + var helper = new TypeDependencyAssemblyTestHelper(); helper.AddSnapshotHeader("No violations"); var should = Types().That().Are(helper.ChildClass).Should(); should.Be(helper.ChildClass).AssertNoViolations(helper); @@ -102,7 +102,7 @@ public async Task BeTest() [Fact] public async Task BeTypesThatTest() { - var helper = new DependencyAssemblyTestHelper(); + var helper = new TypeDependencyAssemblyTestHelper(); helper.AddSnapshotHeader("No violations"); var should = Types().That().Are(helper.ChildClass).Should(); should.BeTypesThat().Are(helper.ChildClass).AssertNoViolations(helper); @@ -249,7 +249,7 @@ public async Task BePublicTest() [Fact] public async Task CallAnyTest() { - var helper = new DependencyAssemblyTestHelper(); + var helper = new MethodDependencyAssemblyTestHelper(); helper.AddSnapshotHeader("No violations"); var should = MethodMembers().That().Are(helper.MethodWithSingleDependency).Should(); @@ -320,7 +320,7 @@ public async Task CallAnyTest() [Fact] public async Task DependOnAnyTest() { - var helper = new DependencyAssemblyTestHelper(); + var helper = new TypeDependencyAssemblyTestHelper(); helper.AddSnapshotHeader("No violations"); var should = Types().That().Are(helper.ChildClass).Should(); @@ -429,7 +429,7 @@ public async Task DependOnAnyTest() [Fact] public async Task DependOnAnyTypesThatTest() { - var helper = new DependencyAssemblyTestHelper(); + var helper = new TypeDependencyAssemblyTestHelper(); helper.AddSnapshotHeader("No violations"); Types().That().Are(helper.ChildClass).Should().DependOnAnyTypesThat().Are(helper.BaseClass).AssertNoViolations(helper); @@ -441,7 +441,7 @@ public async Task DependOnAnyTypesThatTest() [Fact] public async Task ExistTest() { - var helper = new DependencyAssemblyTestHelper(); + var helper = new TypeDependencyAssemblyTestHelper(); helper.AddSnapshotHeader("No violations"); Types().That().Are(helper.BaseClass).Should().Exist().AssertNoViolations(helper); Types().That().Are(helper.BaseClassSystemType).Should().Exist().AssertNoViolations(helper); @@ -476,7 +476,7 @@ public bool CheckEmpty() [Fact] public async Task FollowCustomConditionTest() { - var helper = new DependencyAssemblyTestHelper(); + var helper = new TypeDependencyAssemblyTestHelper(); helper.AddSnapshotHeader("No violations"); var should = Types().That().Are(helper.ChildClass).Should(); @@ -506,7 +506,7 @@ public IEnumerable GetMatchingObjects(IEnumerable objects, Archite [Fact] public async Task FollowCustomPredicateTest() { - var helper = new DependencyAssemblyTestHelper(); + var helper = new TypeDependencyAssemblyTestHelper(); helper.AddSnapshotHeader("No violations"); var should = Types().That().Are(helper.ChildClass).Should(); @@ -1072,7 +1072,7 @@ public async Task HaveAttributeWithNamedArguments() [Fact] public async Task HaveNameTest() { - var helper = new DependencyAssemblyTestHelper(); + var helper = new TypeDependencyAssemblyTestHelper(); helper.AddSnapshotHeader("No violations"); var should = Types().That().Are(helper.BaseClass).Should(); @@ -1153,7 +1153,7 @@ public async Task HaveNameTest() [Fact] public async Task NotBeTest() { - var helper = new DependencyAssemblyTestHelper(); + var helper = new TypeDependencyAssemblyTestHelper(); helper.AddSnapshotHeader("No violations"); var should = Types().That().DependOnAny(helper.BaseClass).Should(); @@ -1225,7 +1225,7 @@ public async Task NotBeTest() [Fact] public async Task NotCallAnyTest() { - var helper = new DependencyAssemblyTestHelper(); + var helper = new MethodDependencyAssemblyTestHelper(); helper.AddSnapshotHeader("No violations"); var should = MethodMembers().That().Are(helper.MethodWithSingleDependency).Should(); @@ -1294,7 +1294,7 @@ public async Task NotCallAnyTest() [Fact] public async Task NotDependOnAnyTypesThatTest() { - var helper = new DependencyAssemblyTestHelper(); + var helper = new TypeDependencyAssemblyTestHelper(); helper.AddSnapshotHeader("No violations"); Types().That().Are(helper.BaseClass).Should().NotDependOnAnyTypesThat().Are(helper.ChildClass).AssertNoViolations(helper); @@ -1306,7 +1306,7 @@ public async Task NotDependOnAnyTypesThatTest() [Fact] public async Task NotDependOnAnyTest() { - var helper = new DependencyAssemblyTestHelper(); + var helper = new TypeDependencyAssemblyTestHelper(); helper.AddSnapshotHeader("No violations"); var should = Types().That().Are(helper.ChildClass).Should(); @@ -1409,7 +1409,7 @@ public async Task NotDependOnAnyTest() [Fact] public async Task NotExistTest() { - var helper = new DependencyAssemblyTestHelper(); + var helper = new TypeDependencyAssemblyTestHelper(); helper.AddSnapshotHeader("No violations"); var should = Types().That().DependOnAny(helper.ChildClass).Should(); should.NotExist().AssertNoViolations(helper); @@ -1936,7 +1936,7 @@ public async Task NotHaveAttributeWithNamedArgumentsTest() [Fact] public async Task NotHaveNameTest() { - var helper = new DependencyAssemblyTestHelper(); + var helper = new TypeDependencyAssemblyTestHelper(); helper.AddSnapshotHeader("No violations"); var should = Types().That().Are(helper.BaseClass).Should(); @@ -2018,7 +2018,7 @@ public async Task NotHaveNameTest() [Fact] public async Task OnlyDependOnTest() { - var helper = new DependencyAssemblyTestHelper(); + var helper = new TypeDependencyAssemblyTestHelper(); helper.AddSnapshotHeader("No violations"); var should = Types().That().Are(helper.ChildClass).Should(); @@ -2101,7 +2101,7 @@ public async Task OnlyDependOnTest() [Fact] public async Task OnlyDependOnTypesThatTest() { - var helper = new DependencyAssemblyTestHelper(); + var helper = new TypeDependencyAssemblyTestHelper(); helper.AddSnapshotHeader("No violations"); var should = Types().That().Are(helper.ChildClass).Should(); should.OnlyDependOnTypesThat().Are(helper.BaseClass).AssertNoViolations(helper); diff --git a/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectSyntaxElementsTests.BeTest.verified.txt b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectSyntaxElementsTests.BeTest.verified.txt index 0393ea11e..2ccb8b50e 100644 --- a/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectSyntaxElementsTests.BeTest.verified.txt +++ b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectSyntaxElementsTests.BeTest.verified.txt @@ -43,10 +43,10 @@ Message: Query: Types that are "TypeDependencyNamespace.ChildClass" should be "TypeDependencyNamespace.ClassWithoutDependencies" Result: False -Description: TypeDependencyNamespace.ChildClass is TypeDependencyNamespace.ChildClass +Description: TypeDependencyNamespace.ChildClass is not "TypeDependencyNamespace.ClassWithoutDependencies" Message: "Types that are "TypeDependencyNamespace.ChildClass" should be "TypeDependencyNamespace.ClassWithoutDependencies"" failed: - TypeDependencyNamespace.ChildClass is TypeDependencyNamespace.ChildClass + TypeDependencyNamespace.ChildClass is not "TypeDependencyNamespace.ClassWithoutDependencies" @@ -70,10 +70,10 @@ Message: Query: Types that are "TypeDependencyNamespace.ChildClass" should be "TypeDependencyNamespace.ClassWithoutDependencies" Result: False -Description: TypeDependencyNamespace.ChildClass is TypeDependencyNamespace.ChildClass +Description: TypeDependencyNamespace.ChildClass is not "TypeDependencyNamespace.ClassWithoutDependencies" Message: "Types that are "TypeDependencyNamespace.ChildClass" should be "TypeDependencyNamespace.ClassWithoutDependencies"" failed: - TypeDependencyNamespace.ChildClass is TypeDependencyNamespace.ChildClass + TypeDependencyNamespace.ChildClass is not "TypeDependencyNamespace.ClassWithoutDependencies" @@ -99,10 +99,10 @@ Message: Query: Types that are "TypeDependencyNamespace.BaseClass" should not exist Result: False -Description: TypeDependencyNamespace.BaseClass is TypeDependencyNamespace.BaseClass +Description: TypeDependencyNamespace.BaseClass does exist Message: "Types that are "TypeDependencyNamespace.BaseClass" should not exist" failed: - TypeDependencyNamespace.BaseClass is TypeDependencyNamespace.BaseClass + TypeDependencyNamespace.BaseClass does exist @@ -137,19 +137,19 @@ Message: Query: Types that are "TypeDependencyNamespace.ChildClass" should be "TypeDependencyNamespace.ClassWithoutDependencies" or "TypeDependencyNamespace.BaseClass" Result: False -Description: TypeDependencyNamespace.ChildClass is TypeDependencyNamespace.ChildClass +Description: TypeDependencyNamespace.ChildClass is not "TypeDependencyNamespace.ClassWithoutDependencies" or "TypeDependencyNamespace.BaseClass" Message: "Types that are "TypeDependencyNamespace.ChildClass" should be "TypeDependencyNamespace.ClassWithoutDependencies" or "TypeDependencyNamespace.BaseClass"" failed: - TypeDependencyNamespace.ChildClass is TypeDependencyNamespace.ChildClass + TypeDependencyNamespace.ChildClass is not "TypeDependencyNamespace.ClassWithoutDependencies" or "TypeDependencyNamespace.BaseClass" Query: Types that are "TypeDependencyNamespace.ChildClass" should be "TypeDependencyNamespace.ClassWithoutDependencies" or "TypeDependencyNamespace.BaseClass" Result: False -Description: TypeDependencyNamespace.ChildClass is TypeDependencyNamespace.ChildClass +Description: TypeDependencyNamespace.ChildClass is not "TypeDependencyNamespace.ClassWithoutDependencies" or "TypeDependencyNamespace.BaseClass" Message: "Types that are "TypeDependencyNamespace.ChildClass" should be "TypeDependencyNamespace.ClassWithoutDependencies" or "TypeDependencyNamespace.BaseClass"" failed: - TypeDependencyNamespace.ChildClass is TypeDependencyNamespace.ChildClass + TypeDependencyNamespace.ChildClass is not "TypeDependencyNamespace.ClassWithoutDependencies" or "TypeDependencyNamespace.BaseClass" diff --git a/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectSyntaxElementsTests.HaveNameTest.verified.txt b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectSyntaxElementsTests.HaveNameTest.verified.txt index 4e177090d..cec8cb4e8 100644 --- a/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectSyntaxElementsTests.HaveNameTest.verified.txt +++ b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectSyntaxElementsTests.HaveNameTest.verified.txt @@ -62,13 +62,13 @@ Description: TypeDependencyNamespace.BaseClass passed Message: All Evaluations passed -Query: Types that are "TypeDependencyNamespace.BaseClass" should have assembly qualified name "TypeDependencyNamespace.BaseClass, DependencyAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=015ff5fd0dc0b... +Query: Types that are "TypeDependencyNamespace.BaseClass" should have assembly qualified name "TypeDependencyNamespace.BaseClass, TypeDependencyAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=015ff5fd0... Result: True Description: TypeDependencyNamespace.BaseClass passed Message: All Evaluations passed -Query: Types that are "TypeDependencyNamespace.BaseClass" should have assembly qualified name matching "^TypeDependencyNamespace.BaseClass, .*DependencyAssembly.*$" +Query: Types that are "TypeDependencyNamespace.BaseClass" should have assembly qualified name matching "^TypeDependencyNamespace.BaseClass, .*TypeDependencyAssembly.*$" Result: True Description: TypeDependencyNamespace.BaseClass passed Message: @@ -80,13 +80,13 @@ Description: TypeDependencyNamespace.BaseClass passed Message: All Evaluations passed -Query: Types that are "TypeDependencyNamespace.BaseClass" should have assembly qualified name ending with "DependencyAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=015ff5fd0dc0bfa4" +Query: Types that are "TypeDependencyNamespace.BaseClass" should have assembly qualified name ending with "TypeDependencyAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=015ff5fd0dc0bfa4" Result: True Description: TypeDependencyNamespace.BaseClass passed Message: All Evaluations passed -Query: Types that are "TypeDependencyNamespace.BaseClass" should have assembly qualified name containing "DependencyAssembly" +Query: Types that are "TypeDependencyNamespace.BaseClass" should have assembly qualified name containing "TypeDependencyAssembly" Result: True Description: TypeDependencyNamespace.BaseClass passed Message: @@ -154,13 +154,13 @@ Description: TypeDependencyNamespace.BaseClass passed Message: All Evaluations passed -Query: Types that are "TypeDependencyNamespace.BaseClass" should be Types that have assembly qualified name "TypeDependencyNamespace.BaseClass, DependencyAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken... +Query: Types that are "TypeDependencyNamespace.BaseClass" should be Types that have assembly qualified name "TypeDependencyNamespace.BaseClass, TypeDependencyAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyT... Result: True Description: TypeDependencyNamespace.BaseClass passed Message: All Evaluations passed -Query: Types that are "TypeDependencyNamespace.BaseClass" should be Types that have assembly qualified name matching "^TypeDependencyNamespace.BaseClass, .*DependencyAssembly.*$" +Query: Types that are "TypeDependencyNamespace.BaseClass" should be Types that have assembly qualified name matching "^TypeDependencyNamespace.BaseClass, .*TypeDependencyAssembly.*$" Result: True Description: TypeDependencyNamespace.BaseClass passed Message: @@ -172,13 +172,13 @@ Description: TypeDependencyNamespace.BaseClass passed Message: All Evaluations passed -Query: Types that are "TypeDependencyNamespace.BaseClass" should be Types that have assembly qualified name ending with "DependencyAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=015ff5fd0dc0bfa4" +Query: Types that are "TypeDependencyNamespace.BaseClass" should be Types that have assembly qualified name ending with "TypeDependencyAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=015ff5fd0dc0bfa4" Result: True Description: TypeDependencyNamespace.BaseClass passed Message: All Evaluations passed -Query: Types that are "TypeDependencyNamespace.BaseClass" should be Types that have assembly qualified name containing "DependencyAssembly" +Query: Types that are "TypeDependencyNamespace.BaseClass" should be Types that have assembly qualified name containing "TypeDependencyAssembly" Result: True Description: TypeDependencyNamespace.BaseClass passed Message: @@ -280,46 +280,46 @@ Message: Query: Types that are "TypeDependencyNamespace.BaseClass" should have assembly qualified name "TypeDependencyNamespace.BaseClass" Result: False -Description: TypeDependencyNamespace.BaseClass does have assembly qualified name TypeDependencyNamespace.BaseClass, DependencyAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=015ff5fd0dc0bfa4 +Description: TypeDependencyNamespace.BaseClass does have assembly qualified name TypeDependencyNamespace.BaseClass, TypeDependencyAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=015ff5fd0dc0bfa4 Message: "Types that are "TypeDependencyNamespace.BaseClass" should have assembly qualified name "TypeDependencyNamespace.BaseClass"" failed: - TypeDependencyNamespace.BaseClass does have assembly qualified name TypeDependencyNamespace.BaseClass, DependencyAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=015ff5fd0dc0bfa4 + TypeDependencyNamespace.BaseClass does have assembly qualified name TypeDependencyNamespace.BaseClass, TypeDependencyAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=015ff5fd0dc0bfa4 Query: Types that are "TypeDependencyNamespace.BaseClass" should have assembly qualified name "^TypeDependencyNamespace.BaseClass, .*NotTheNameOfAnyObject.*$" Result: False -Description: TypeDependencyNamespace.BaseClass does have assembly qualified name TypeDependencyNamespace.BaseClass, DependencyAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=015ff5fd0dc0bfa4 +Description: TypeDependencyNamespace.BaseClass does have assembly qualified name TypeDependencyNamespace.BaseClass, TypeDependencyAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=015ff5fd0dc0bfa4 Message: "Types that are "TypeDependencyNamespace.BaseClass" should have assembly qualified name "^TypeDependencyNamespace.BaseClass, .*NotTheNameOfAnyObject.*$"" failed: - TypeDependencyNamespace.BaseClass does have assembly qualified name TypeDependencyNamespace.BaseClass, DependencyAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=015ff5fd0dc0bfa4 + TypeDependencyNamespace.BaseClass does have assembly qualified name TypeDependencyNamespace.BaseClass, TypeDependencyAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=015ff5fd0dc0bfa4 Query: Types that are "TypeDependencyNamespace.BaseClass" should have assembly qualified name starting with "BaseClass" Result: False -Description: TypeDependencyNamespace.BaseClass does have assembly qualified name TypeDependencyNamespace.BaseClass, DependencyAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=015ff5fd0dc0bfa4 +Description: TypeDependencyNamespace.BaseClass does have assembly qualified name TypeDependencyNamespace.BaseClass, TypeDependencyAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=015ff5fd0dc0bfa4 Message: "Types that are "TypeDependencyNamespace.BaseClass" should have assembly qualified name starting with "BaseClass"" failed: - TypeDependencyNamespace.BaseClass does have assembly qualified name TypeDependencyNamespace.BaseClass, DependencyAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=015ff5fd0dc0bfa4 + TypeDependencyNamespace.BaseClass does have assembly qualified name TypeDependencyNamespace.BaseClass, TypeDependencyAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=015ff5fd0dc0bfa4 Query: Types that are "TypeDependencyNamespace.BaseClass" should have assembly qualified name ending with "TypeDependencyNamespace" Result: False -Description: TypeDependencyNamespace.BaseClass does have assembly qualified name TypeDependencyNamespace.BaseClass, DependencyAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=015ff5fd0dc0bfa4 +Description: TypeDependencyNamespace.BaseClass does have assembly qualified name TypeDependencyNamespace.BaseClass, TypeDependencyAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=015ff5fd0dc0bfa4 Message: "Types that are "TypeDependencyNamespace.BaseClass" should have assembly qualified name ending with "TypeDependencyNamespace"" failed: - TypeDependencyNamespace.BaseClass does have assembly qualified name TypeDependencyNamespace.BaseClass, DependencyAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=015ff5fd0dc0bfa4 + TypeDependencyNamespace.BaseClass does have assembly qualified name TypeDependencyNamespace.BaseClass, TypeDependencyAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=015ff5fd0dc0bfa4 Query: Types that are "TypeDependencyNamespace.BaseClass" should have assembly qualified name containing "NotTheNameOfAnyObject" Result: False -Description: TypeDependencyNamespace.BaseClass does have assembly qualified name TypeDependencyNamespace.BaseClass, DependencyAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=015ff5fd0dc0bfa4 +Description: TypeDependencyNamespace.BaseClass does have assembly qualified name TypeDependencyNamespace.BaseClass, TypeDependencyAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=015ff5fd0dc0bfa4 Message: "Types that are "TypeDependencyNamespace.BaseClass" should have assembly qualified name containing "NotTheNameOfAnyObject"" failed: - TypeDependencyNamespace.BaseClass does have assembly qualified name TypeDependencyNamespace.BaseClass, DependencyAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=015ff5fd0dc0bfa4 + TypeDependencyNamespace.BaseClass does have assembly qualified name TypeDependencyNamespace.BaseClass, TypeDependencyAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=015ff5fd0dc0bfa4 diff --git a/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectSyntaxElementsTests.NotBeTest.verified.txt b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectSyntaxElementsTests.NotBeTest.verified.txt index 271a39643..bc21527e2 100644 --- a/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectSyntaxElementsTests.NotBeTest.verified.txt +++ b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectSyntaxElementsTests.NotBeTest.verified.txt @@ -101,12 +101,12 @@ Message: Query: Types that depend on "TypeDependencyNamespace.BaseClass" should not be "TypeDependencyNamespace.ChildClass" Result: False -Description: TypeDependencyNamespace.ChildClass is TypeDependencyNamespace.ChildClass +Description: TypeDependencyNamespace.ChildClass is "TypeDependencyNamespace.ChildClass" Result: True Description: TypeDependencyNamespace.OtherChildClass passed Message: "Types that depend on "TypeDependencyNamespace.BaseClass" should not be "TypeDependencyNamespace.ChildClass"" failed: - TypeDependencyNamespace.ChildClass is TypeDependencyNamespace.ChildClass + TypeDependencyNamespace.ChildClass is "TypeDependencyNamespace.ChildClass" @@ -134,12 +134,12 @@ Message: Query: Types that depend on "TypeDependencyNamespace.BaseClass" should not be "TypeDependencyNamespace.ChildClass" Result: False -Description: TypeDependencyNamespace.ChildClass is TypeDependencyNamespace.ChildClass +Description: TypeDependencyNamespace.ChildClass is "TypeDependencyNamespace.ChildClass" Result: True Description: TypeDependencyNamespace.OtherChildClass passed Message: "Types that depend on "TypeDependencyNamespace.BaseClass" should not be "TypeDependencyNamespace.ChildClass"" failed: - TypeDependencyNamespace.ChildClass is TypeDependencyNamespace.ChildClass + TypeDependencyNamespace.ChildClass is "TypeDependencyNamespace.ChildClass" @@ -204,7 +204,7 @@ Message: ----- Conditions ----- -Query: Types that depend on "TypeDependencyNamespace.BaseClass" should not be any of no objects (always true) +Query: Types that depend on "TypeDependencyNamespace.BaseClass" should exist Result: True Description: TypeDependencyNamespace.ChildClass passed Result: True @@ -220,7 +220,7 @@ Description: TypeDependencyNamespace.OtherChildClass passed Message: All Evaluations passed -Query: Types that depend on "TypeDependencyNamespace.BaseClass" should not be no type (always true) +Query: Types that depend on "TypeDependencyNamespace.BaseClass" should exist Result: True Description: TypeDependencyNamespace.ChildClass passed Result: True @@ -238,7 +238,7 @@ All Evaluations passed ----- Predicates ----- -Query: Types that depend on "TypeDependencyNamespace.BaseClass" should be Types that are not any of no objects (always true) +Query: Types that depend on "TypeDependencyNamespace.BaseClass" should be Types that are all types Result: True Description: TypeDependencyNamespace.ChildClass passed Result: True @@ -254,7 +254,7 @@ 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) +Query: Types that depend on "TypeDependencyNamespace.BaseClass" should be Types that are all types Result: True Description: TypeDependencyNamespace.ChildClass passed Result: True diff --git a/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectSyntaxElementsTests.NotHaveNameTest.verified.txt b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectSyntaxElementsTests.NotHaveNameTest.verified.txt index 0ae2354b5..272aab578 100644 --- a/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectSyntaxElementsTests.NotHaveNameTest.verified.txt +++ b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/ObjectSyntaxElementsTests.NotHaveNameTest.verified.txt @@ -62,7 +62,7 @@ Description: TypeDependencyNamespace.BaseClass passed Message: All Evaluations passed -Query: Types that are "TypeDependencyNamespace.BaseClass" should not have assembly qualified name "TypeDependencyNamespace.ChildClass, DependencyAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=015ff5fd... +Query: Types that are "TypeDependencyNamespace.BaseClass" should not have assembly qualified name "TypeDependencyNamespace.ChildClass, TypeDependencyAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=015f... Result: True Description: TypeDependencyNamespace.BaseClass passed Message: @@ -154,7 +154,7 @@ Description: TypeDependencyNamespace.BaseClass passed Message: All Evaluations passed -Query: Types that are "TypeDependencyNamespace.BaseClass" should be Types that do not have assembly qualified name "TypeDependencyNamespace.ChildClass, DependencyAssembly, Version=1.0.0.0, Culture=neutral, Public... +Query: Types that are "TypeDependencyNamespace.BaseClass" should be Types that do not have assembly qualified name "TypeDependencyNamespace.ChildClass, TypeDependencyAssembly, Version=1.0.0.0, Culture=neutral, Pu... Result: True Description: TypeDependencyNamespace.BaseClass passed Message: @@ -278,48 +278,48 @@ Message: -Query: Types that are "TypeDependencyNamespace.BaseClass" should not have assembly qualified name "TypeDependencyNamespace.BaseClass, DependencyAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=015ff5fd0... +Query: Types that are "TypeDependencyNamespace.BaseClass" should not have assembly qualified name "TypeDependencyNamespace.BaseClass, TypeDependencyAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=015ff... Result: False -Description: TypeDependencyNamespace.BaseClass does have assembly qualified name TypeDependencyNamespace.BaseClass, DependencyAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=015ff5fd0dc0bfa4 +Description: TypeDependencyNamespace.BaseClass does have assembly qualified name TypeDependencyNamespace.BaseClass, TypeDependencyAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=015ff5fd0dc0bfa4 Message: -"Types that are "TypeDependencyNamespace.BaseClass" should not have assembly qualified name "TypeDependencyNamespace.BaseClass, DependencyAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=015ff5fd0..." failed: - TypeDependencyNamespace.BaseClass does have assembly qualified name TypeDependencyNamespace.BaseClass, DependencyAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=015ff5fd0dc0bfa4 +"Types that are "TypeDependencyNamespace.BaseClass" should not have assembly qualified name "TypeDependencyNamespace.BaseClass, TypeDependencyAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=015ff..." failed: + TypeDependencyNamespace.BaseClass does have assembly qualified name TypeDependencyNamespace.BaseClass, TypeDependencyAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=015ff5fd0dc0bfa4 Query: Types that are "TypeDependencyNamespace.BaseClass" should not have assembly qualified name matching "^.*\.Base.*$" Result: False -Description: TypeDependencyNamespace.BaseClass does have assembly qualified name TypeDependencyNamespace.BaseClass, DependencyAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=015ff5fd0dc0bfa4 +Description: TypeDependencyNamespace.BaseClass does have assembly qualified name TypeDependencyNamespace.BaseClass, TypeDependencyAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=015ff5fd0dc0bfa4 Message: "Types that are "TypeDependencyNamespace.BaseClass" should not have assembly qualified name matching "^.*\.Base.*$"" failed: - TypeDependencyNamespace.BaseClass does have assembly qualified name TypeDependencyNamespace.BaseClass, DependencyAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=015ff5fd0dc0bfa4 + TypeDependencyNamespace.BaseClass does have assembly qualified name TypeDependencyNamespace.BaseClass, TypeDependencyAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=015ff5fd0dc0bfa4 Query: Types that are "TypeDependencyNamespace.BaseClass" should not have assembly qualified name starting with "TypeDependencyNamespace" Result: False -Description: TypeDependencyNamespace.BaseClass does have assembly qualified name TypeDependencyNamespace.BaseClass, DependencyAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=015ff5fd0dc0bfa4 +Description: TypeDependencyNamespace.BaseClass does have assembly qualified name TypeDependencyNamespace.BaseClass, TypeDependencyAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=015ff5fd0dc0bfa4 Message: "Types that are "TypeDependencyNamespace.BaseClass" should not have assembly qualified name starting with "TypeDependencyNamespace"" failed: - TypeDependencyNamespace.BaseClass does have assembly qualified name TypeDependencyNamespace.BaseClass, DependencyAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=015ff5fd0dc0bfa4 + TypeDependencyNamespace.BaseClass does have assembly qualified name TypeDependencyNamespace.BaseClass, TypeDependencyAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=015ff5fd0dc0bfa4 -Query: Types that are "TypeDependencyNamespace.BaseClass" should not have assembly qualified name ending with "DependencyAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=015ff5fd0dc0bfa4" +Query: Types that are "TypeDependencyNamespace.BaseClass" should not have assembly qualified name ending with "TypeDependencyAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=015ff5fd0dc0bfa4" Result: False -Description: TypeDependencyNamespace.BaseClass does have assembly qualified name TypeDependencyNamespace.BaseClass, DependencyAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=015ff5fd0dc0bfa4 +Description: TypeDependencyNamespace.BaseClass does have assembly qualified name TypeDependencyNamespace.BaseClass, TypeDependencyAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=015ff5fd0dc0bfa4 Message: -"Types that are "TypeDependencyNamespace.BaseClass" should not have assembly qualified name ending with "DependencyAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=015ff5fd0dc0bfa4"" failed: - TypeDependencyNamespace.BaseClass does have assembly qualified name TypeDependencyNamespace.BaseClass, DependencyAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=015ff5fd0dc0bfa4 +"Types that are "TypeDependencyNamespace.BaseClass" should not have assembly qualified name ending with "TypeDependencyAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=015ff5fd0dc0bfa4"" failed: + TypeDependencyNamespace.BaseClass does have assembly qualified name TypeDependencyNamespace.BaseClass, TypeDependencyAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=015ff5fd0dc0bfa4 Query: Types that are "TypeDependencyNamespace.BaseClass" should not have assembly qualified name containing "TypeDependencyNamespace" Result: False -Description: TypeDependencyNamespace.BaseClass does have assembly qualified name TypeDependencyNamespace.BaseClass, DependencyAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=015ff5fd0dc0bfa4 +Description: TypeDependencyNamespace.BaseClass does have assembly qualified name TypeDependencyNamespace.BaseClass, TypeDependencyAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=015ff5fd0dc0bfa4 Message: "Types that are "TypeDependencyNamespace.BaseClass" should not have assembly qualified name containing "TypeDependencyNamespace"" failed: - TypeDependencyNamespace.BaseClass does have assembly qualified name TypeDependencyNamespace.BaseClass, DependencyAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=015ff5fd0dc0bfa4 + TypeDependencyNamespace.BaseClass does have assembly qualified name TypeDependencyNamespace.BaseClass, TypeDependencyAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=015ff5fd0dc0bfa4 @@ -415,12 +415,12 @@ Message: -Query: Types that are "TypeDependencyNamespace.BaseClass" should be Types that do not have assembly qualified name "TypeDependencyNamespace.BaseClass, DependencyAssembly, Version=1.0.0.0, Culture=neutral, PublicK... +Query: Types that are "TypeDependencyNamespace.BaseClass" should be Types that do not have assembly qualified name "TypeDependencyNamespace.BaseClass, TypeDependencyAssembly, Version=1.0.0.0, Culture=neutral, Pub... Result: False -Description: TypeDependencyNamespace.BaseClass is not Types that do not have assembly qualified name "TypeDependencyNamespace.BaseClass, DependencyAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=015ff5... +Description: TypeDependencyNamespace.BaseClass is not Types that do not have assembly qualified name "TypeDependencyNamespace.BaseClass, TypeDependencyAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=01... Message: -"Types that are "TypeDependencyNamespace.BaseClass" should be Types that do not have assembly qualified name "TypeDependencyNamespace.BaseClass, DependencyAssembly, Version=1.0.0.0, Culture=neutral, PublicK..." failed: - TypeDependencyNamespace.BaseClass is not Types that do not have assembly qualified name "TypeDependencyNamespace.BaseClass, DependencyAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=015ff5... +"Types that are "TypeDependencyNamespace.BaseClass" should be Types that do not have assembly qualified name "TypeDependencyNamespace.BaseClass, TypeDependencyAssembly, Version=1.0.0.0, Culture=neutral, Pub..." failed: + TypeDependencyNamespace.BaseClass is not Types that do not have assembly qualified name "TypeDependencyNamespace.BaseClass, TypeDependencyAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=01... @@ -442,12 +442,12 @@ Message: -Query: Types that are "TypeDependencyNamespace.BaseClass" should be Types that do not have assembly qualified name ending with "DependencyAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=015ff5fd0dc0bfa4" +Query: Types that are "TypeDependencyNamespace.BaseClass" should be Types that do not have assembly qualified name ending with "TypeDependencyAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=015ff5fd0dc... Result: False -Description: TypeDependencyNamespace.BaseClass is not Types that do not have assembly qualified name ending with "DependencyAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=015ff5fd0dc0bfa4" +Description: TypeDependencyNamespace.BaseClass is not Types that do not have assembly qualified name ending with "TypeDependencyAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=015ff5fd0dc0bfa4" Message: -"Types that are "TypeDependencyNamespace.BaseClass" should be Types that do not have assembly qualified name ending with "DependencyAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=015ff5fd0dc0bfa4"" failed: - TypeDependencyNamespace.BaseClass is not Types that do not have assembly qualified name ending with "DependencyAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=015ff5fd0dc0bfa4" +"Types that are "TypeDependencyNamespace.BaseClass" should be Types that do not have assembly qualified name ending with "TypeDependencyAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=015ff5fd0dc..." failed: + TypeDependencyNamespace.BaseClass is not Types that do not have assembly qualified name ending with "TypeDependencyAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=015ff5fd0dc0bfa4" diff --git a/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/TypeSyntaxElementsTests.BeAssignableToTest.verified.txt b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/TypeSyntaxElementsTests.BeAssignableToTest.verified.txt new file mode 100644 index 000000000..3b40cb3ba --- /dev/null +++ b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/TypeSyntaxElementsTests.BeAssignableToTest.verified.txt @@ -0,0 +1,341 @@ +===== No Violations ===== + +----- Conditions ----- + +Query: Types that are "TypeNamespace.DerivedClassForAssign" should be assignable to "TypeNamespace.BaseClassForAssign" +Result: True +Description: TypeNamespace.DerivedClassForAssign passed +Message: +All Evaluations passed + +Query: Types that are "TypeNamespace.DerivedClassForAssign" should be assignable to "TypeNamespace.BaseClassForAssign" +Result: True +Description: TypeNamespace.DerivedClassForAssign passed +Message: +All Evaluations passed + +Query: Types that are "TypeNamespace.DerivedClassForAssign" should be assignable to Types that are "TypeNamespace.BaseClassForAssign" +Result: True +Description: TypeNamespace.DerivedClassForAssign passed +Message: +All Evaluations passed + +Query: Types that are "TypeNamespace.DerivedClassForAssign" should be assignable to "TypeNamespace.BaseClassForAssign" +Result: True +Description: TypeNamespace.DerivedClassForAssign passed +Message: +All Evaluations passed + +Query: Types that are "TypeNamespace.DerivedClassForAssign" should be assignable to "TypeNamespace.BaseClassForAssign" +Result: True +Description: TypeNamespace.DerivedClassForAssign passed +Message: +All Evaluations passed + +----- Predicates ----- + +Query: Types that are "TypeNamespace.DerivedClassForAssign" should be Types that are assignable to "TypeNamespace.BaseClassForAssign" +Result: True +Description: TypeNamespace.DerivedClassForAssign passed +Message: +All Evaluations passed + +Query: Types that are "TypeNamespace.DerivedClassForAssign" should be Types that are assignable to "TypeNamespace.BaseClassForAssign" +Result: True +Description: TypeNamespace.DerivedClassForAssign passed +Message: +All Evaluations passed + +Query: Types that are "TypeNamespace.DerivedClassForAssign" should be Types that are assignable to Types that are "TypeNamespace.BaseClassForAssign" +Result: True +Description: TypeNamespace.DerivedClassForAssign passed +Message: +All Evaluations passed + +Query: Types that are "TypeNamespace.DerivedClassForAssign" should be Types that are assignable to "TypeNamespace.BaseClassForAssign" +Result: True +Description: TypeNamespace.DerivedClassForAssign passed +Message: +All Evaluations passed + +Query: Types that are "TypeNamespace.DerivedClassForAssign" should be Types that are assignable to "TypeNamespace.BaseClassForAssign" +Result: True +Description: TypeNamespace.DerivedClassForAssign passed +Message: +All Evaluations passed + +----- Complex conditions ----- + +Query: Types that are "TypeNamespace.DerivedClassForAssign" should be assignable to types that are "TypeNamespace.BaseClassForAssign" +Result: True +Description: TypeNamespace.DerivedClassForAssign passed +Message: +All Evaluations passed + +===== Violations ===== + +----- Conditions ----- + +Query: Types that are "TypeNamespace.UnrelatedClassForAssign" should be assignable to "TypeNamespace.BaseClassForAssign" +Result: False +Description: TypeNamespace.UnrelatedClassForAssign is not assignable to "TypeNamespace.BaseClassForAssign" +Message: +"Types that are "TypeNamespace.UnrelatedClassForAssign" should be assignable to "TypeNamespace.BaseClassForAssign"" failed: + TypeNamespace.UnrelatedClassForAssign is not assignable to "TypeNamespace.BaseClassForAssign" + + + +Query: Types that are "TypeNamespace.UnrelatedClassForAssign" should be assignable to "TypeNamespace.BaseClassForAssign" +Result: False +Description: TypeNamespace.UnrelatedClassForAssign is not assignable to "TypeNamespace.BaseClassForAssign" +Message: +"Types that are "TypeNamespace.UnrelatedClassForAssign" should be assignable to "TypeNamespace.BaseClassForAssign"" failed: + TypeNamespace.UnrelatedClassForAssign is not assignable to "TypeNamespace.BaseClassForAssign" + + + +Query: Types that are "TypeNamespace.UnrelatedClassForAssign" should be assignable to Types that are "TypeNamespace.BaseClassForAssign" +Result: False +Description: TypeNamespace.UnrelatedClassForAssign is not assignable to Types that are "TypeNamespace.BaseClassForAssign" +Message: +"Types that are "TypeNamespace.UnrelatedClassForAssign" should be assignable to Types that are "TypeNamespace.BaseClassForAssign"" failed: + TypeNamespace.UnrelatedClassForAssign is not assignable to Types that are "TypeNamespace.BaseClassForAssign" + + + +Query: Types that are "TypeNamespace.UnrelatedClassForAssign" should be assignable to "TypeNamespace.BaseClassForAssign" +Result: False +Description: TypeNamespace.UnrelatedClassForAssign is not assignable to "TypeNamespace.BaseClassForAssign" +Message: +"Types that are "TypeNamespace.UnrelatedClassForAssign" should be assignable to "TypeNamespace.BaseClassForAssign"" failed: + TypeNamespace.UnrelatedClassForAssign is not assignable to "TypeNamespace.BaseClassForAssign" + + + +Query: Types that are "TypeNamespace.UnrelatedClassForAssign" should be assignable to "TypeNamespace.BaseClassForAssign" +Result: False +Description: TypeNamespace.UnrelatedClassForAssign is not assignable to "TypeNamespace.BaseClassForAssign" +Message: +"Types that are "TypeNamespace.UnrelatedClassForAssign" should be assignable to "TypeNamespace.BaseClassForAssign"" failed: + TypeNamespace.UnrelatedClassForAssign is not assignable to "TypeNamespace.BaseClassForAssign" + + + +----- Predicates ----- + +Query: Types that are "TypeNamespace.UnrelatedClassForAssign" should be Types that are assignable to "TypeNamespace.BaseClassForAssign" +Result: False +Description: TypeNamespace.UnrelatedClassForAssign is not Types that are assignable to "TypeNamespace.BaseClassForAssign" +Message: +"Types that are "TypeNamespace.UnrelatedClassForAssign" should be Types that are assignable to "TypeNamespace.BaseClassForAssign"" failed: + TypeNamespace.UnrelatedClassForAssign is not Types that are assignable to "TypeNamespace.BaseClassForAssign" + + + +Query: Types that are "TypeNamespace.UnrelatedClassForAssign" should be Types that are assignable to "TypeNamespace.BaseClassForAssign" +Result: False +Description: TypeNamespace.UnrelatedClassForAssign is not Types that are assignable to "TypeNamespace.BaseClassForAssign" +Message: +"Types that are "TypeNamespace.UnrelatedClassForAssign" should be Types that are assignable to "TypeNamespace.BaseClassForAssign"" failed: + TypeNamespace.UnrelatedClassForAssign is not Types that are assignable to "TypeNamespace.BaseClassForAssign" + + + +Query: Types that are "TypeNamespace.UnrelatedClassForAssign" should be Types that are assignable to Types that are "TypeNamespace.BaseClassForAssign" +Result: False +Description: TypeNamespace.UnrelatedClassForAssign is not Types that are assignable to Types that are "TypeNamespace.BaseClassForAssign" +Message: +"Types that are "TypeNamespace.UnrelatedClassForAssign" should be Types that are assignable to Types that are "TypeNamespace.BaseClassForAssign"" failed: + TypeNamespace.UnrelatedClassForAssign is not Types that are assignable to Types that are "TypeNamespace.BaseClassForAssign" + + + +Query: Types that are "TypeNamespace.UnrelatedClassForAssign" should be Types that are assignable to "TypeNamespace.BaseClassForAssign" +Result: False +Description: TypeNamespace.UnrelatedClassForAssign is not Types that are assignable to "TypeNamespace.BaseClassForAssign" +Message: +"Types that are "TypeNamespace.UnrelatedClassForAssign" should be Types that are assignable to "TypeNamespace.BaseClassForAssign"" failed: + TypeNamespace.UnrelatedClassForAssign is not Types that are assignable to "TypeNamespace.BaseClassForAssign" + + + +Query: Types that are "TypeNamespace.UnrelatedClassForAssign" should be Types that are assignable to "TypeNamespace.BaseClassForAssign" +Result: False +Description: TypeNamespace.UnrelatedClassForAssign is not Types that are assignable to "TypeNamespace.BaseClassForAssign" +Message: +"Types that are "TypeNamespace.UnrelatedClassForAssign" should be Types that are assignable to "TypeNamespace.BaseClassForAssign"" failed: + TypeNamespace.UnrelatedClassForAssign is not Types that are assignable to "TypeNamespace.BaseClassForAssign" + + + +----- Complex conditions ----- + +Query: Types that are "TypeNamespace.UnrelatedClassForAssign" should be assignable to types that are "TypeNamespace.BaseClassForAssign" +Result: False +Description: TypeNamespace.UnrelatedClassForAssign is not assignable to "TypeNamespace.BaseClassForAssign" +Message: +"Types that are "TypeNamespace.UnrelatedClassForAssign" should be assignable to types that are "TypeNamespace.BaseClassForAssign"" failed: + TypeNamespace.UnrelatedClassForAssign is not assignable to "TypeNamespace.BaseClassForAssign" + + + +===== Multiple arguments ===== + +----- Conditions ----- + +Query: Types that are "TypeNamespace.UnrelatedClassForAssign" should be assignable to "TypeNamespace.BaseClassForAssign" or "TypeNamespace.OtherBaseClassForAssign" +Result: False +Description: TypeNamespace.UnrelatedClassForAssign is not assignable to "TypeNamespace.BaseClassForAssign" or "TypeNamespace.OtherBaseClassForAssign" +Message: +"Types that are "TypeNamespace.UnrelatedClassForAssign" should be assignable to "TypeNamespace.BaseClassForAssign" or "TypeNamespace.OtherBaseClassForAssign"" failed: + TypeNamespace.UnrelatedClassForAssign is not assignable to "TypeNamespace.BaseClassForAssign" or "TypeNamespace.OtherBaseClassForAssign" + + + +Query: Types that are "TypeNamespace.UnrelatedClassForAssign" should be assignable to "TypeNamespace.BaseClassForAssign" or "TypeNamespace.OtherBaseClassForAssign" +Result: False +Description: TypeNamespace.UnrelatedClassForAssign is not assignable to "TypeNamespace.BaseClassForAssign" or "TypeNamespace.OtherBaseClassForAssign" +Message: +"Types that are "TypeNamespace.UnrelatedClassForAssign" should be assignable to "TypeNamespace.BaseClassForAssign" or "TypeNamespace.OtherBaseClassForAssign"" failed: + TypeNamespace.UnrelatedClassForAssign is not assignable to "TypeNamespace.BaseClassForAssign" or "TypeNamespace.OtherBaseClassForAssign" + + + +Query: Types that are "TypeNamespace.UnrelatedClassForAssign" should be assignable to Types that are "TypeNamespace.BaseClassForAssign" or "TypeNamespace.OtherBaseClassForAssign" +Result: False +Description: TypeNamespace.UnrelatedClassForAssign is not assignable to Types that are "TypeNamespace.BaseClassForAssign" or "TypeNamespace.OtherBaseClassForAssign" +Message: +"Types that are "TypeNamespace.UnrelatedClassForAssign" should be assignable to Types that are "TypeNamespace.BaseClassForAssign" or "TypeNamespace.OtherBaseClassForAssign"" failed: + TypeNamespace.UnrelatedClassForAssign is not assignable to Types that are "TypeNamespace.BaseClassForAssign" or "TypeNamespace.OtherBaseClassForAssign" + + + +Query: Types that are "TypeNamespace.UnrelatedClassForAssign" should be assignable to "TypeNamespace.BaseClassForAssign" or "TypeNamespace.OtherBaseClassForAssign" +Result: False +Description: TypeNamespace.UnrelatedClassForAssign is not assignable to "TypeNamespace.BaseClassForAssign" or "TypeNamespace.OtherBaseClassForAssign" +Message: +"Types that are "TypeNamespace.UnrelatedClassForAssign" should be assignable to "TypeNamespace.BaseClassForAssign" or "TypeNamespace.OtherBaseClassForAssign"" failed: + TypeNamespace.UnrelatedClassForAssign is not assignable to "TypeNamespace.BaseClassForAssign" or "TypeNamespace.OtherBaseClassForAssign" + + + +Query: Types that are "TypeNamespace.UnrelatedClassForAssign" should be assignable to "TypeNamespace.BaseClassForAssign" or "TypeNamespace.OtherBaseClassForAssign" +Result: False +Description: TypeNamespace.UnrelatedClassForAssign is not assignable to "TypeNamespace.BaseClassForAssign" or "TypeNamespace.OtherBaseClassForAssign" +Message: +"Types that are "TypeNamespace.UnrelatedClassForAssign" should be assignable to "TypeNamespace.BaseClassForAssign" or "TypeNamespace.OtherBaseClassForAssign"" failed: + TypeNamespace.UnrelatedClassForAssign is not assignable to "TypeNamespace.BaseClassForAssign" or "TypeNamespace.OtherBaseClassForAssign" + + + +----- Predicates ----- + +Query: Types that are "TypeNamespace.UnrelatedClassForAssign" should be Types that are assignable to "TypeNamespace.BaseClassForAssign" or "TypeNamespace.OtherBaseClassForAssign" +Result: False +Description: TypeNamespace.UnrelatedClassForAssign is not Types that are assignable to "TypeNamespace.BaseClassForAssign" or "TypeNamespace.OtherBaseClassForAssign" +Message: +"Types that are "TypeNamespace.UnrelatedClassForAssign" should be Types that are assignable to "TypeNamespace.BaseClassForAssign" or "TypeNamespace.OtherBaseClassForAssign"" failed: + TypeNamespace.UnrelatedClassForAssign is not Types that are assignable to "TypeNamespace.BaseClassForAssign" or "TypeNamespace.OtherBaseClassForAssign" + + + +Query: Types that are "TypeNamespace.UnrelatedClassForAssign" should be Types that are assignable to "TypeNamespace.BaseClassForAssign" or "TypeNamespace.OtherBaseClassForAssign" +Result: False +Description: TypeNamespace.UnrelatedClassForAssign is not Types that are assignable to "TypeNamespace.BaseClassForAssign" or "TypeNamespace.OtherBaseClassForAssign" +Message: +"Types that are "TypeNamespace.UnrelatedClassForAssign" should be Types that are assignable to "TypeNamespace.BaseClassForAssign" or "TypeNamespace.OtherBaseClassForAssign"" failed: + TypeNamespace.UnrelatedClassForAssign is not Types that are assignable to "TypeNamespace.BaseClassForAssign" or "TypeNamespace.OtherBaseClassForAssign" + + + +Query: Types that are "TypeNamespace.UnrelatedClassForAssign" should be Types that are assignable to Types that are "TypeNamespace.BaseClassForAssign" or "TypeNamespace.OtherBaseClassForAssign" +Result: False +Description: TypeNamespace.UnrelatedClassForAssign is not Types that are assignable to Types that are "TypeNamespace.BaseClassForAssign" or "TypeNamespace.OtherBaseClassForAssign" +Message: +"Types that are "TypeNamespace.UnrelatedClassForAssign" should be Types that are assignable to Types that are "TypeNamespace.BaseClassForAssign" or "TypeNamespace.OtherBaseClassForAssign"" failed: + TypeNamespace.UnrelatedClassForAssign is not Types that are assignable to Types that are "TypeNamespace.BaseClassForAssign" or "TypeNamespace.OtherBaseClassForAssign" + + + +Query: Types that are "TypeNamespace.UnrelatedClassForAssign" should be Types that are assignable to "TypeNamespace.BaseClassForAssign" or "TypeNamespace.OtherBaseClassForAssign" +Result: False +Description: TypeNamespace.UnrelatedClassForAssign is not Types that are assignable to "TypeNamespace.BaseClassForAssign" or "TypeNamespace.OtherBaseClassForAssign" +Message: +"Types that are "TypeNamespace.UnrelatedClassForAssign" should be Types that are assignable to "TypeNamespace.BaseClassForAssign" or "TypeNamespace.OtherBaseClassForAssign"" failed: + TypeNamespace.UnrelatedClassForAssign is not Types that are assignable to "TypeNamespace.BaseClassForAssign" or "TypeNamespace.OtherBaseClassForAssign" + + + +Query: Types that are "TypeNamespace.UnrelatedClassForAssign" should be Types that are assignable to "TypeNamespace.BaseClassForAssign" or "TypeNamespace.OtherBaseClassForAssign" +Result: False +Description: TypeNamespace.UnrelatedClassForAssign is not Types that are assignable to "TypeNamespace.BaseClassForAssign" or "TypeNamespace.OtherBaseClassForAssign" +Message: +"Types that are "TypeNamespace.UnrelatedClassForAssign" should be Types that are assignable to "TypeNamespace.BaseClassForAssign" or "TypeNamespace.OtherBaseClassForAssign"" failed: + TypeNamespace.UnrelatedClassForAssign is not Types that are assignable to "TypeNamespace.BaseClassForAssign" or "TypeNamespace.OtherBaseClassForAssign" + + + +----- Complex conditions ----- + +Query: Types that are "TypeNamespace.UnrelatedClassForAssign" should be assignable to types that are "TypeNamespace.BaseClassForAssign" or "TypeNamespace.OtherBaseClassForAssign" +Result: False +Description: TypeNamespace.UnrelatedClassForAssign is not assignable to "TypeNamespace.BaseClassForAssign" or "TypeNamespace.OtherBaseClassForAssign" +Message: +"Types that are "TypeNamespace.UnrelatedClassForAssign" should be assignable to types that are "TypeNamespace.BaseClassForAssign" or "TypeNamespace.OtherBaseClassForAssign"" failed: + TypeNamespace.UnrelatedClassForAssign is not assignable to "TypeNamespace.BaseClassForAssign" or "TypeNamespace.OtherBaseClassForAssign" + + + +===== Multiple inputs ===== + +Query: Types that are "TypeNamespace.DerivedClassForAssign" or "TypeNamespace.OtherDerivedClassForAssign" should be assignable to "TypeNamespace.BaseClassForAssign" +Result: True +Description: TypeNamespace.DerivedClassForAssign passed +Result: True +Description: TypeNamespace.OtherDerivedClassForAssign passed +Message: +All Evaluations passed + +Query: Types that are "TypeNamespace.DerivedClassForAssign" or "TypeNamespace.UnrelatedClassForAssign" should be assignable to "TypeNamespace.BaseClassForAssign" +Result: True +Description: TypeNamespace.DerivedClassForAssign passed +Result: False +Description: TypeNamespace.UnrelatedClassForAssign is not assignable to "TypeNamespace.BaseClassForAssign" +Message: +"Types that are "TypeNamespace.DerivedClassForAssign" or "TypeNamespace.UnrelatedClassForAssign" should be assignable to "TypeNamespace.BaseClassForAssign"" failed: + TypeNamespace.UnrelatedClassForAssign is not assignable to "TypeNamespace.BaseClassForAssign" + + + +===== Type not in architecture ===== + +----- Conditions ----- + +Query: Types that are "TypeNamespace.BaseClassForAssign" should be assignable to "AttributeNamespace.ClassWithoutAttributes" +Exception: Type AttributeNamespace.ClassWithoutAttributes does not exist in provided architecture or is no class. + +----- Predicates ----- + +Query: Types that are "TypeNamespace.BaseClassForAssign" should be Types that are assignable to "AttributeNamespace.ClassWithoutAttributes" +Exception: Type AttributeNamespace.ClassWithoutAttributes does not exist in provided architecture or is no class. + +===== Empty Arguments (Predicates only) ===== + +Query: Types that are "TypeNamespace.BaseClassForAssign" should be Types that are assignable to no types (always false) +Result: False +Description: TypeNamespace.BaseClassForAssign is not Types that are assignable to no types (always false) +Message: +"Types that are "TypeNamespace.BaseClassForAssign" should be Types that are assignable to no types (always false)" failed: + TypeNamespace.BaseClassForAssign is not Types that are assignable to no types (always false) + + + +Query: Types that are "TypeNamespace.BaseClassForAssign" should be Types that are assignable to no types (always false) +Result: False +Description: TypeNamespace.BaseClassForAssign is not Types that are assignable to no types (always false) +Message: +"Types that are "TypeNamespace.BaseClassForAssign" should be Types that are assignable to no types (always false)" failed: + TypeNamespace.BaseClassForAssign is not Types that are assignable to no types (always false) + + + diff --git a/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/TypeSyntaxElementsTests.BeEnumsTest.verified.txt b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/TypeSyntaxElementsTests.BeEnumsTest.verified.txt new file mode 100644 index 000000000..fdf7302dc --- /dev/null +++ b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/TypeSyntaxElementsTests.BeEnumsTest.verified.txt @@ -0,0 +1,81 @@ +===== No Violations ===== + +----- Conditions ----- + +Query: Types that are "TypeNamespace.SimpleEnum" should be enums +Result: True +Description: TypeNamespace.SimpleEnum passed +Message: +All Evaluations passed + +----- Predicates ----- + +Query: Types that are "TypeNamespace.SimpleEnum" should be Types that are enums +Result: True +Description: TypeNamespace.SimpleEnum passed +Message: +All Evaluations passed + +===== Violations ===== + +----- Conditions ----- + +Query: Types that are "TypeNamespace.RegularClass" should be enums +Result: False +Description: TypeNamespace.RegularClass is no enum +Message: +"Types that are "TypeNamespace.RegularClass" should be enums" failed: + TypeNamespace.RegularClass is no enum + + + +Query: Types that are "TypeNamespace.SimpleStruct" should be enums +Result: False +Description: TypeNamespace.SimpleStruct is no enum +Message: +"Types that are "TypeNamespace.SimpleStruct" should be enums" failed: + TypeNamespace.SimpleStruct is no enum + + + +----- Predicates ----- + +Query: Types that are "TypeNamespace.RegularClass" should be Types that are enums +Result: False +Description: TypeNamespace.RegularClass is not Types that are enums +Message: +"Types that are "TypeNamespace.RegularClass" should be Types that are enums" failed: + TypeNamespace.RegularClass is not Types that are enums + + + +Query: Types that are "TypeNamespace.SimpleStruct" should be Types that are enums +Result: False +Description: TypeNamespace.SimpleStruct is not Types that are enums +Message: +"Types that are "TypeNamespace.SimpleStruct" should be Types that are enums" failed: + TypeNamespace.SimpleStruct is not Types that are enums + + + +===== Multiple inputs ===== + +Query: Types that are "TypeNamespace.SimpleEnum" or "TypeNamespace.OtherEnum" should be enums +Result: True +Description: TypeNamespace.SimpleEnum passed +Result: True +Description: TypeNamespace.OtherEnum passed +Message: +All Evaluations passed + +Query: Types that are "TypeNamespace.SimpleEnum" or "TypeNamespace.RegularClass" should be enums +Result: True +Description: TypeNamespace.SimpleEnum passed +Result: False +Description: TypeNamespace.RegularClass is no enum +Message: +"Types that are "TypeNamespace.SimpleEnum" or "TypeNamespace.RegularClass" should be enums" failed: + TypeNamespace.RegularClass is no enum + + + diff --git a/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/TypeSyntaxElementsTests.BeNestedInTest.verified.txt b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/TypeSyntaxElementsTests.BeNestedInTest.verified.txt new file mode 100644 index 000000000..5d346f36a --- /dev/null +++ b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/TypeSyntaxElementsTests.BeNestedInTest.verified.txt @@ -0,0 +1,279 @@ +===== No Violations ===== + +----- Conditions ----- + +Query: Types that are "TypeNamespace.OuterClassA+InnerClassA" should be nested in "TypeNamespace.OuterClassA" +Result: True +Description: TypeNamespace.OuterClassA+InnerClassA passed +Message: +All Evaluations passed + +Query: Types that are "TypeNamespace.OuterClassA+InnerClassA" should be nested in "TypeNamespace.OuterClassA" +Result: True +Description: TypeNamespace.OuterClassA+InnerClassA passed +Message: +All Evaluations passed + +Query: Types that are "TypeNamespace.OuterClassA+InnerClassA" should be nested in Types that are "TypeNamespace.OuterClassA" +Result: True +Description: TypeNamespace.OuterClassA+InnerClassA passed +Message: +All Evaluations passed + +Query: Types that are "TypeNamespace.OuterClassA+InnerClassA" should be nested in "TypeNamespace.OuterClassA" +Result: True +Description: TypeNamespace.OuterClassA+InnerClassA passed +Message: +All Evaluations passed + +Query: Types that are "TypeNamespace.OuterClassA+InnerClassA" should be nested in "TypeNamespace.OuterClassA" +Result: True +Description: TypeNamespace.OuterClassA+InnerClassA passed +Message: +All Evaluations passed + +----- Predicates ----- + +Query: Types that are "TypeNamespace.OuterClassA+InnerClassA" should be Types that are nested in "TypeNamespace.OuterClassA" +Result: True +Description: TypeNamespace.OuterClassA+InnerClassA passed +Message: +All Evaluations passed + +Query: Types that are "TypeNamespace.OuterClassA+InnerClassA" should be Types that are nested in "TypeNamespace.OuterClassA" +Result: True +Description: TypeNamespace.OuterClassA+InnerClassA passed +Message: +All Evaluations passed + +Query: Types that are "TypeNamespace.OuterClassA+InnerClassA" should be Types that are nested in Types that are "TypeNamespace.OuterClassA" +Result: True +Description: TypeNamespace.OuterClassA+InnerClassA passed +Message: +All Evaluations passed + +Query: Types that are "TypeNamespace.OuterClassA+InnerClassA" should be Types that are nested in "TypeNamespace.OuterClassA" +Result: True +Description: TypeNamespace.OuterClassA+InnerClassA passed +Message: +All Evaluations passed + +Query: Types that are "TypeNamespace.OuterClassA+InnerClassA" should be Types that are nested in "TypeNamespace.OuterClassA" +Result: True +Description: TypeNamespace.OuterClassA+InnerClassA passed +Message: +All Evaluations passed + +===== Violations ===== + +----- Conditions ----- + +Query: Types that are "TypeNamespace.NonNestedClass" should be nested in "TypeNamespace.OuterClassA" +Result: False +Description: TypeNamespace.NonNestedClass is not nested in "TypeNamespace.OuterClassA" +Message: +"Types that are "TypeNamespace.NonNestedClass" should be nested in "TypeNamespace.OuterClassA"" failed: + TypeNamespace.NonNestedClass is not nested in "TypeNamespace.OuterClassA" + + + +Query: Types that are "TypeNamespace.NonNestedClass" should be nested in "TypeNamespace.OuterClassA" +Result: False +Description: TypeNamespace.NonNestedClass is not nested in "TypeNamespace.OuterClassA" +Message: +"Types that are "TypeNamespace.NonNestedClass" should be nested in "TypeNamespace.OuterClassA"" failed: + TypeNamespace.NonNestedClass is not nested in "TypeNamespace.OuterClassA" + + + +Query: Types that are "TypeNamespace.NonNestedClass" should be nested in Types that are "TypeNamespace.OuterClassA" +Result: False +Description: TypeNamespace.NonNestedClass is not nested in Types that are "TypeNamespace.OuterClassA" +Message: +"Types that are "TypeNamespace.NonNestedClass" should be nested in Types that are "TypeNamespace.OuterClassA"" failed: + TypeNamespace.NonNestedClass is not nested in Types that are "TypeNamespace.OuterClassA" + + + +Query: Types that are "TypeNamespace.NonNestedClass" should be nested in "TypeNamespace.OuterClassA" +Result: False +Description: TypeNamespace.NonNestedClass is not nested in "TypeNamespace.OuterClassA" +Message: +"Types that are "TypeNamespace.NonNestedClass" should be nested in "TypeNamespace.OuterClassA"" failed: + TypeNamespace.NonNestedClass is not nested in "TypeNamespace.OuterClassA" + + + +Query: Types that are "TypeNamespace.NonNestedClass" should be nested in "TypeNamespace.OuterClassA" +Result: False +Description: TypeNamespace.NonNestedClass is not nested in "TypeNamespace.OuterClassA" +Message: +"Types that are "TypeNamespace.NonNestedClass" should be nested in "TypeNamespace.OuterClassA"" failed: + TypeNamespace.NonNestedClass is not nested in "TypeNamespace.OuterClassA" + + + +----- Predicates ----- + +Query: Types that are "TypeNamespace.NonNestedClass" should be Types that are nested in "TypeNamespace.OuterClassA" +Result: False +Description: TypeNamespace.NonNestedClass is not Types that are nested in "TypeNamespace.OuterClassA" +Message: +"Types that are "TypeNamespace.NonNestedClass" should be Types that are nested in "TypeNamespace.OuterClassA"" failed: + TypeNamespace.NonNestedClass is not Types that are nested in "TypeNamespace.OuterClassA" + + + +Query: Types that are "TypeNamespace.NonNestedClass" should be Types that are nested in "TypeNamespace.OuterClassA" +Result: False +Description: TypeNamespace.NonNestedClass is not Types that are nested in "TypeNamespace.OuterClassA" +Message: +"Types that are "TypeNamespace.NonNestedClass" should be Types that are nested in "TypeNamespace.OuterClassA"" failed: + TypeNamespace.NonNestedClass is not Types that are nested in "TypeNamespace.OuterClassA" + + + +Query: Types that are "TypeNamespace.NonNestedClass" should be Types that are nested in Types that are "TypeNamespace.OuterClassA" +Result: False +Description: TypeNamespace.NonNestedClass is not Types that are nested in Types that are "TypeNamespace.OuterClassA" +Message: +"Types that are "TypeNamespace.NonNestedClass" should be Types that are nested in Types that are "TypeNamespace.OuterClassA"" failed: + TypeNamespace.NonNestedClass is not Types that are nested in Types that are "TypeNamespace.OuterClassA" + + + +Query: Types that are "TypeNamespace.NonNestedClass" should be Types that are nested in "TypeNamespace.OuterClassA" +Result: False +Description: TypeNamespace.NonNestedClass is not Types that are nested in "TypeNamespace.OuterClassA" +Message: +"Types that are "TypeNamespace.NonNestedClass" should be Types that are nested in "TypeNamespace.OuterClassA"" failed: + TypeNamespace.NonNestedClass is not Types that are nested in "TypeNamespace.OuterClassA" + + + +Query: Types that are "TypeNamespace.NonNestedClass" should be Types that are nested in "TypeNamespace.OuterClassA" +Result: False +Description: TypeNamespace.NonNestedClass is not Types that are nested in "TypeNamespace.OuterClassA" +Message: +"Types that are "TypeNamespace.NonNestedClass" should be Types that are nested in "TypeNamespace.OuterClassA"" failed: + TypeNamespace.NonNestedClass is not Types that are nested in "TypeNamespace.OuterClassA" + + + +===== Multiple inputs ===== + +Query: Types that are "TypeNamespace.OuterClassA+InnerClassA" or "TypeNamespace.OuterClassA+OtherInnerClassA" should be nested in "TypeNamespace.OuterClassA" +Result: True +Description: TypeNamespace.OuterClassA+InnerClassA passed +Result: True +Description: TypeNamespace.OuterClassA+OtherInnerClassA passed +Message: +All Evaluations passed + +Query: Types that are "TypeNamespace.OuterClassA+InnerClassA" or "TypeNamespace.NonNestedClass" should be nested in "TypeNamespace.OuterClassA" +Result: False +Description: TypeNamespace.NonNestedClass is not nested in "TypeNamespace.OuterClassA" +Result: True +Description: TypeNamespace.OuterClassA+InnerClassA passed +Message: +"Types that are "TypeNamespace.OuterClassA+InnerClassA" or "TypeNamespace.NonNestedClass" should be nested in "TypeNamespace.OuterClassA"" failed: + TypeNamespace.NonNestedClass is not nested in "TypeNamespace.OuterClassA" + + + +===== Multiple arguments ===== + +----- Conditions ----- + +Query: Types that are "TypeNamespace.OuterClassA+InnerClassA" should be nested in "TypeNamespace.OuterClassA" or "TypeNamespace.NonNestedClass" +Result: True +Description: TypeNamespace.OuterClassA+InnerClassA passed +Message: +All Evaluations passed + +Query: Types that are "TypeNamespace.OuterClassA+InnerClassA" should be nested in "TypeNamespace.OuterClassA" or "TypeNamespace.NonNestedClass" +Result: True +Description: TypeNamespace.OuterClassA+InnerClassA passed +Message: +All Evaluations passed + +Query: Types that are "TypeNamespace.OuterClassA+InnerClassA" should be nested in "TypeNamespace.OuterClassA" or "TypeNamespace.NonNestedClass" +Result: True +Description: TypeNamespace.OuterClassA+InnerClassA passed +Message: +All Evaluations passed + +Query: Types that are "TypeNamespace.OuterClassA+InnerClassA" should be nested in "TypeNamespace.OuterClassA" or "TypeNamespace.NonNestedClass" +Result: True +Description: TypeNamespace.OuterClassA+InnerClassA passed +Message: +All Evaluations passed + +----- Predicates ----- + +Query: Types that are "TypeNamespace.OuterClassA+InnerClassA" should be Types that are nested in "TypeNamespace.OuterClassA" or "TypeNamespace.NonNestedClass" +Result: True +Description: TypeNamespace.OuterClassA+InnerClassA passed +Message: +All Evaluations passed + +Query: Types that are "TypeNamespace.OuterClassA+InnerClassA" should be Types that are nested in "TypeNamespace.OuterClassA" or "TypeNamespace.NonNestedClass" +Result: True +Description: TypeNamespace.OuterClassA+InnerClassA passed +Message: +All Evaluations passed + +Query: Types that are "TypeNamespace.OuterClassA+InnerClassA" should be Types that are nested in "TypeNamespace.OuterClassA" or "TypeNamespace.NonNestedClass" +Result: True +Description: TypeNamespace.OuterClassA+InnerClassA passed +Message: +All Evaluations passed + +Query: Types that are "TypeNamespace.OuterClassA+InnerClassA" should be Types that are nested in "TypeNamespace.OuterClassA" or "TypeNamespace.NonNestedClass" +Result: True +Description: TypeNamespace.OuterClassA+InnerClassA passed +Message: +All Evaluations passed + +===== Empty Arguments ===== + +----- Conditions ----- + +Query: Types that are "TypeNamespace.OuterClassA+InnerClassA" should be nested in no types (always false) +Result: False +Description: TypeNamespace.OuterClassA+InnerClassA is not nested in +Message: +"Types that are "TypeNamespace.OuterClassA+InnerClassA" should be nested in no types (always false)" failed: + TypeNamespace.OuterClassA+InnerClassA is not nested in + + + +Query: Types that are "TypeNamespace.OuterClassA+InnerClassA" should be nested in no types (always false) +Result: False +Description: TypeNamespace.OuterClassA+InnerClassA is not nested in +Message: +"Types that are "TypeNamespace.OuterClassA+InnerClassA" should be nested in no types (always false)" failed: + TypeNamespace.OuterClassA+InnerClassA is not nested in + + + +----- Predicates ----- + +Query: Types that are "TypeNamespace.OuterClassA+InnerClassA" should be Types that are nested in no types (always false) +Result: False +Description: TypeNamespace.OuterClassA+InnerClassA is not Types that are nested in no types (always false) +Message: +"Types that are "TypeNamespace.OuterClassA+InnerClassA" should be Types that are nested in no types (always false)" failed: + TypeNamespace.OuterClassA+InnerClassA is not Types that are nested in no types (always false) + + + +Query: Types that are "TypeNamespace.OuterClassA+InnerClassA" should be Types that are nested in no types (always false) +Result: False +Description: TypeNamespace.OuterClassA+InnerClassA is not Types that are nested in no types (always false) +Message: +"Types that are "TypeNamespace.OuterClassA+InnerClassA" should be Types that are nested in no types (always false)" failed: + TypeNamespace.OuterClassA+InnerClassA is not Types that are nested in no types (always false) + + + diff --git a/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/TypeSyntaxElementsTests.BeNestedTest.verified.txt b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/TypeSyntaxElementsTests.BeNestedTest.verified.txt new file mode 100644 index 000000000..d60c02a0c --- /dev/null +++ b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/TypeSyntaxElementsTests.BeNestedTest.verified.txt @@ -0,0 +1,63 @@ +===== No Violations ===== + +----- Conditions ----- + +Query: Types that are "TypeNamespace.OuterClassA+InnerClassA" should be nested +Result: True +Description: TypeNamespace.OuterClassA+InnerClassA passed +Message: +All Evaluations passed + +----- Predicates ----- + +Query: Types that are "TypeNamespace.OuterClassA+InnerClassA" should be Types that are nested +Result: True +Description: TypeNamespace.OuterClassA+InnerClassA passed +Message: +All Evaluations passed + +===== Violations ===== + +----- Conditions ----- + +Query: Types that are "TypeNamespace.NonNestedClass" should be nested +Result: False +Description: TypeNamespace.NonNestedClass is not nested +Message: +"Types that are "TypeNamespace.NonNestedClass" should be nested" failed: + TypeNamespace.NonNestedClass is not nested + + + +----- Predicates ----- + +Query: Types that are "TypeNamespace.NonNestedClass" should be Types that are nested +Result: False +Description: TypeNamespace.NonNestedClass is not Types that are nested +Message: +"Types that are "TypeNamespace.NonNestedClass" should be Types that are nested" failed: + TypeNamespace.NonNestedClass is not Types that are nested + + + +===== Multiple inputs ===== + +Query: Types that are "TypeNamespace.OuterClassA+InnerClassA" or "TypeNamespace.OuterClassA+OtherInnerClassA" should be nested +Result: True +Description: TypeNamespace.OuterClassA+InnerClassA passed +Result: True +Description: TypeNamespace.OuterClassA+OtherInnerClassA passed +Message: +All Evaluations passed + +Query: Types that are "TypeNamespace.OuterClassA+InnerClassA" or "TypeNamespace.NonNestedClass" should be nested +Result: False +Description: TypeNamespace.NonNestedClass is not nested +Result: True +Description: TypeNamespace.OuterClassA+InnerClassA passed +Message: +"Types that are "TypeNamespace.OuterClassA+InnerClassA" or "TypeNamespace.NonNestedClass" should be nested" failed: + TypeNamespace.NonNestedClass is not nested + + + diff --git a/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/TypeSyntaxElementsTests.BeStructsTest.verified.txt b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/TypeSyntaxElementsTests.BeStructsTest.verified.txt new file mode 100644 index 000000000..f96d35b93 --- /dev/null +++ b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/TypeSyntaxElementsTests.BeStructsTest.verified.txt @@ -0,0 +1,81 @@ +===== No Violations ===== + +----- Conditions ----- + +Query: Types that are "TypeNamespace.SimpleStruct" should be structs +Result: True +Description: TypeNamespace.SimpleStruct passed +Message: +All Evaluations passed + +----- Predicates ----- + +Query: Types that are "TypeNamespace.SimpleStruct" should be Types that are structs +Result: True +Description: TypeNamespace.SimpleStruct passed +Message: +All Evaluations passed + +===== Violations ===== + +----- Conditions ----- + +Query: Types that are "TypeNamespace.RegularClass" should be structs +Result: False +Description: TypeNamespace.RegularClass is no struct +Message: +"Types that are "TypeNamespace.RegularClass" should be structs" failed: + TypeNamespace.RegularClass is no struct + + + +Query: Types that are "TypeNamespace.SimpleEnum" should be structs +Result: False +Description: TypeNamespace.SimpleEnum is no struct +Message: +"Types that are "TypeNamespace.SimpleEnum" should be structs" failed: + TypeNamespace.SimpleEnum is no struct + + + +----- Predicates ----- + +Query: Types that are "TypeNamespace.RegularClass" should be Types that are structs +Result: False +Description: TypeNamespace.RegularClass is not Types that are structs +Message: +"Types that are "TypeNamespace.RegularClass" should be Types that are structs" failed: + TypeNamespace.RegularClass is not Types that are structs + + + +Query: Types that are "TypeNamespace.SimpleEnum" should be Types that are structs +Result: False +Description: TypeNamespace.SimpleEnum is not Types that are structs +Message: +"Types that are "TypeNamespace.SimpleEnum" should be Types that are structs" failed: + TypeNamespace.SimpleEnum is not Types that are structs + + + +===== Multiple inputs ===== + +Query: Types that are "TypeNamespace.SimpleStruct" or "TypeNamespace.OtherStruct" should be structs +Result: True +Description: TypeNamespace.SimpleStruct passed +Result: True +Description: TypeNamespace.OtherStruct passed +Message: +All Evaluations passed + +Query: Types that are "TypeNamespace.SimpleStruct" or "TypeNamespace.RegularClass" should be structs +Result: True +Description: TypeNamespace.SimpleStruct passed +Result: False +Description: TypeNamespace.RegularClass is no struct +Message: +"Types that are "TypeNamespace.SimpleStruct" or "TypeNamespace.RegularClass" should be structs" failed: + TypeNamespace.RegularClass is no struct + + + diff --git a/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/TypeSyntaxElementsTests.BeSystemTypeTest.verified.txt b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/TypeSyntaxElementsTests.BeSystemTypeTest.verified.txt new file mode 100644 index 000000000..dd1e35513 --- /dev/null +++ b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/TypeSyntaxElementsTests.BeSystemTypeTest.verified.txt @@ -0,0 +1,165 @@ +===== No Violations ===== + +----- Conditions ----- + +Query: Types that are "TypeNamespace.RegularClass" should be "TypeNamespace.RegularClass" +Result: True +Description: TypeNamespace.RegularClass passed +Message: +All Evaluations passed + +Query: Types that are "TypeNamespace.RegularClass" should be "TypeNamespace.RegularClass" +Result: True +Description: TypeNamespace.RegularClass passed +Message: +All Evaluations passed + +----- Complex conditions ----- + +Query: Types that are "TypeNamespace.RegularClass" should be types that are "TypeNamespace.RegularClass" +Result: True +Description: TypeNamespace.RegularClass passed +Message: +All Evaluations passed + +----- Predicates ----- + +Query: Types that are "TypeNamespace.RegularClass" should be Types that are "TypeNamespace.RegularClass" +Result: True +Description: TypeNamespace.RegularClass passed +Message: +All Evaluations passed + +Query: Types that are "TypeNamespace.RegularClass" should be Types that are "TypeNamespace.RegularClass" +Result: True +Description: TypeNamespace.RegularClass passed +Message: +All Evaluations passed + +===== Violations ===== + +----- Conditions ----- + +Query: Types that are "TypeNamespace.OtherRegularClass" should be "TypeNamespace.RegularClass" +Result: False +Description: TypeNamespace.OtherRegularClass is not "TypeNamespace.RegularClass" +Message: +"Types that are "TypeNamespace.OtherRegularClass" should be "TypeNamespace.RegularClass"" failed: + TypeNamespace.OtherRegularClass is not "TypeNamespace.RegularClass" + + + +Query: Types that are "TypeNamespace.OtherRegularClass" should be "TypeNamespace.RegularClass" +Result: False +Description: TypeNamespace.OtherRegularClass is not "TypeNamespace.RegularClass" +Message: +"Types that are "TypeNamespace.OtherRegularClass" should be "TypeNamespace.RegularClass"" failed: + TypeNamespace.OtherRegularClass is not "TypeNamespace.RegularClass" + + + +----- Predicates ----- + +Query: Types that are "TypeNamespace.OtherRegularClass" should be Types that are "TypeNamespace.RegularClass" +Result: False +Description: TypeNamespace.OtherRegularClass is not Types that are "TypeNamespace.RegularClass" +Message: +"Types that are "TypeNamespace.OtherRegularClass" should be Types that are "TypeNamespace.RegularClass"" failed: + TypeNamespace.OtherRegularClass is not Types that are "TypeNamespace.RegularClass" + + + +Query: Types that are "TypeNamespace.OtherRegularClass" should be Types that are "TypeNamespace.RegularClass" +Result: False +Description: TypeNamespace.OtherRegularClass is not Types that are "TypeNamespace.RegularClass" +Message: +"Types that are "TypeNamespace.OtherRegularClass" should be Types that are "TypeNamespace.RegularClass"" failed: + TypeNamespace.OtherRegularClass is not Types that are "TypeNamespace.RegularClass" + + + +===== Empty Arguments (Only Violations) ===== + +----- Conditions ----- + +Query: Types that are "TypeNamespace.RegularClass" should not exist +Result: False +Description: TypeNamespace.RegularClass does exist +Message: +"Types that are "TypeNamespace.RegularClass" should not exist" failed: + TypeNamespace.RegularClass does exist + + + +----- Predicates ----- + +Query: Types that are "TypeNamespace.RegularClass" should be Types that do not exist +Result: False +Description: TypeNamespace.RegularClass is not Types that do not exist +Message: +"Types that are "TypeNamespace.RegularClass" should be Types that do not exist" failed: + TypeNamespace.RegularClass is not Types that do not exist + + + +===== Type not in architecture ===== + +----- Conditions ----- + +Query: Types that are "TypeNamespace.RegularClass" should be "AttributeNamespace.ClassWithoutAttributes" +Exception: Type AttributeNamespace.ClassWithoutAttributes does not exist in provided architecture or is no class. + +Query: Types that are "TypeNamespace.RegularClass" should be "AttributeNamespace.ClassWithoutAttributes" +Exception: Type AttributeNamespace.ClassWithoutAttributes does not exist in provided architecture or is no class. + +----- Predicates ----- + +Query: Types that are "TypeNamespace.RegularClass" should be Types that are "AttributeNamespace.ClassWithoutAttributes" +Exception: Type AttributeNamespace.ClassWithoutAttributes does not exist in provided architecture or is no class. + +Query: Types that are "TypeNamespace.RegularClass" should be Types that are "AttributeNamespace.ClassWithoutAttributes" +Exception: Type AttributeNamespace.ClassWithoutAttributes does not exist in provided architecture or is no class. + +===== Multiple arguments ===== + +----- Conditions ----- + +Query: Types that are "TypeNamespace.RegularClass" should be "TypeNamespace.RegularClass" or "TypeNamespace.OtherRegularClass" +Result: True +Description: TypeNamespace.RegularClass passed +Message: +All Evaluations passed + +Query: Types that are "TypeNamespace.RegularClass" should be "TypeNamespace.RegularClass" or "TypeNamespace.OtherRegularClass" +Result: True +Description: TypeNamespace.RegularClass passed +Message: +All Evaluations passed + +----- Predicates ----- + +Query: Types that are "TypeNamespace.RegularClass" should be Types that are "TypeNamespace.RegularClass" or "TypeNamespace.OtherRegularClass" +Result: True +Description: TypeNamespace.RegularClass passed +Message: +All Evaluations passed + +Query: Types that are "TypeNamespace.RegularClass" should be Types that are "TypeNamespace.RegularClass" or "TypeNamespace.OtherRegularClass" +Result: True +Description: TypeNamespace.RegularClass passed +Message: +All Evaluations passed + +===== Multiple inputs ===== + +Query: Types that are "TypeNamespace.RegularClass" or "TypeNamespace.OtherRegularClass" should be "TypeNamespace.RegularClass" +Result: True +Description: TypeNamespace.RegularClass passed +Result: False +Description: TypeNamespace.OtherRegularClass is not "TypeNamespace.RegularClass" +Message: +"Types that are "TypeNamespace.RegularClass" or "TypeNamespace.OtherRegularClass" should be "TypeNamespace.RegularClass"" failed: + TypeNamespace.OtherRegularClass is not "TypeNamespace.RegularClass" + + + diff --git a/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/TypeSyntaxElementsTests.BeValueTypesTest.verified.txt b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/TypeSyntaxElementsTests.BeValueTypesTest.verified.txt new file mode 100644 index 000000000..5046f7c35 --- /dev/null +++ b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/TypeSyntaxElementsTests.BeValueTypesTest.verified.txt @@ -0,0 +1,75 @@ +===== No Violations ===== + +----- Conditions ----- + +Query: Types that are "TypeNamespace.SimpleEnum" should be value types +Result: True +Description: TypeNamespace.SimpleEnum passed +Message: +All Evaluations passed + +Query: Types that are "TypeNamespace.SimpleStruct" should be value types +Result: True +Description: TypeNamespace.SimpleStruct passed +Message: +All Evaluations passed + +----- Predicates ----- + +Query: Types that are "TypeNamespace.SimpleEnum" should be Types that are value types +Result: True +Description: TypeNamespace.SimpleEnum passed +Message: +All Evaluations passed + +Query: Types that are "TypeNamespace.SimpleStruct" should be Types that are value types +Result: True +Description: TypeNamespace.SimpleStruct passed +Message: +All Evaluations passed + +===== Violations ===== + +----- Conditions ----- + +Query: Types that are "TypeNamespace.RegularClass" should be value types +Result: False +Description: TypeNamespace.RegularClass is no value type +Message: +"Types that are "TypeNamespace.RegularClass" should be value types" failed: + TypeNamespace.RegularClass is no value type + + + +----- Predicates ----- + +Query: Types that are "TypeNamespace.RegularClass" should be Types that are value types +Result: False +Description: TypeNamespace.RegularClass is not Types that are value types +Message: +"Types that are "TypeNamespace.RegularClass" should be Types that are value types" failed: + TypeNamespace.RegularClass is not Types that are value types + + + +===== Multiple inputs ===== + +Query: Types that are "TypeNamespace.SimpleEnum" or "TypeNamespace.SimpleStruct" should be value types +Result: True +Description: TypeNamespace.SimpleEnum passed +Result: True +Description: TypeNamespace.SimpleStruct passed +Message: +All Evaluations passed + +Query: Types that are "TypeNamespace.SimpleEnum" or "TypeNamespace.RegularClass" should be value types +Result: True +Description: TypeNamespace.SimpleEnum passed +Result: False +Description: TypeNamespace.RegularClass is no value type +Message: +"Types that are "TypeNamespace.SimpleEnum" or "TypeNamespace.RegularClass" should be value types" failed: + TypeNamespace.RegularClass is no value type + + + diff --git a/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/TypeSyntaxElementsTests.HaveFieldMemberWithNameTest.verified.txt b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/TypeSyntaxElementsTests.HaveFieldMemberWithNameTest.verified.txt new file mode 100644 index 000000000..205b45826 --- /dev/null +++ b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/TypeSyntaxElementsTests.HaveFieldMemberWithNameTest.verified.txt @@ -0,0 +1,55 @@ +===== No Violations ===== + +----- Conditions ----- + +Query: Types that are "TypeNamespace.ClassWithField" should have a field member with name "FieldA" +Result: True +Description: TypeNamespace.ClassWithField passed +Message: +All Evaluations passed + +----- Predicates ----- + +Query: Types that are "TypeNamespace.ClassWithField" should be Types that have field member with name "FieldA" +Result: True +Description: TypeNamespace.ClassWithField passed +Message: +All Evaluations passed + +===== Violations ===== + +----- Conditions ----- + +Query: Types that are "TypeNamespace.ClassWithoutMembers" should have a field member with name "FieldA" +Result: False +Description: TypeNamespace.ClassWithoutMembers does not have a field member with name "FieldA" +Message: +"Types that are "TypeNamespace.ClassWithoutMembers" should have a field member with name "FieldA"" failed: + TypeNamespace.ClassWithoutMembers does not have a field member with name "FieldA" + + + +----- Predicates ----- + +Query: Types that are "TypeNamespace.ClassWithoutMembers" should be Types that have field member with name "FieldA" +Result: False +Description: TypeNamespace.ClassWithoutMembers is not Types that have field member with name "FieldA" +Message: +"Types that are "TypeNamespace.ClassWithoutMembers" should be Types that have field member with name "FieldA"" failed: + TypeNamespace.ClassWithoutMembers is not Types that have field member with name "FieldA" + + + +===== Multiple inputs ===== + +Query: Types that are "TypeNamespace.ClassWithField" or "TypeNamespace.ClassWithoutMembers" should have a field member with name "FieldA" +Result: True +Description: TypeNamespace.ClassWithField passed +Result: False +Description: TypeNamespace.ClassWithoutMembers does not have a field member with name "FieldA" +Message: +"Types that are "TypeNamespace.ClassWithField" or "TypeNamespace.ClassWithoutMembers" should have a field member with name "FieldA"" failed: + TypeNamespace.ClassWithoutMembers does not have a field member with name "FieldA" + + + diff --git a/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/TypeSyntaxElementsTests.HaveMemberWithNameTest.verified.txt b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/TypeSyntaxElementsTests.HaveMemberWithNameTest.verified.txt new file mode 100644 index 000000000..96e878b9f --- /dev/null +++ b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/TypeSyntaxElementsTests.HaveMemberWithNameTest.verified.txt @@ -0,0 +1,55 @@ +===== No Violations ===== + +----- Conditions ----- + +Query: Types that are "TypeNamespace.ClassWithAllMembers" should have a member with name "PropertyB" +Result: True +Description: TypeNamespace.ClassWithAllMembers passed +Message: +All Evaluations passed + +----- Predicates ----- + +Query: Types that are "TypeNamespace.ClassWithAllMembers" should be Types that have member with name "PropertyB" +Result: True +Description: TypeNamespace.ClassWithAllMembers passed +Message: +All Evaluations passed + +===== Violations ===== + +----- Conditions ----- + +Query: Types that are "TypeNamespace.ClassWithoutMembers" should have a member with name "PropertyB" +Result: False +Description: TypeNamespace.ClassWithoutMembers does not have a member with name "PropertyB" +Message: +"Types that are "TypeNamespace.ClassWithoutMembers" should have a member with name "PropertyB"" failed: + TypeNamespace.ClassWithoutMembers does not have a member with name "PropertyB" + + + +----- Predicates ----- + +Query: Types that are "TypeNamespace.ClassWithoutMembers" should be Types that have member with name "PropertyB" +Result: False +Description: TypeNamespace.ClassWithoutMembers is not Types that have member with name "PropertyB" +Message: +"Types that are "TypeNamespace.ClassWithoutMembers" should be Types that have member with name "PropertyB"" failed: + TypeNamespace.ClassWithoutMembers is not Types that have member with name "PropertyB" + + + +===== Multiple inputs ===== + +Query: Types that are "TypeNamespace.ClassWithAllMembers" or "TypeNamespace.ClassWithoutMembers" should have a member with name "PropertyB" +Result: True +Description: TypeNamespace.ClassWithAllMembers passed +Result: False +Description: TypeNamespace.ClassWithoutMembers does not have a member with name "PropertyB" +Message: +"Types that are "TypeNamespace.ClassWithAllMembers" or "TypeNamespace.ClassWithoutMembers" should have a member with name "PropertyB"" failed: + TypeNamespace.ClassWithoutMembers does not have a member with name "PropertyB" + + + diff --git a/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/TypeSyntaxElementsTests.HaveMethodMemberWithNameTest.verified.txt b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/TypeSyntaxElementsTests.HaveMethodMemberWithNameTest.verified.txt new file mode 100644 index 000000000..b0ff6a6e2 --- /dev/null +++ b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/TypeSyntaxElementsTests.HaveMethodMemberWithNameTest.verified.txt @@ -0,0 +1,55 @@ +===== No Violations ===== + +----- Conditions ----- + +Query: Types that are "TypeNamespace.ClassWithMethod" should have a method member with name "MethodA()" +Result: True +Description: TypeNamespace.ClassWithMethod passed +Message: +All Evaluations passed + +----- Predicates ----- + +Query: Types that are "TypeNamespace.ClassWithMethod" should be Types that have method member with name "MethodA()" +Result: True +Description: TypeNamespace.ClassWithMethod passed +Message: +All Evaluations passed + +===== Violations ===== + +----- Conditions ----- + +Query: Types that are "TypeNamespace.ClassWithoutMembers" should have a method member with name "MethodA()" +Result: False +Description: TypeNamespace.ClassWithoutMembers does not have a method member with name "MethodA()" +Message: +"Types that are "TypeNamespace.ClassWithoutMembers" should have a method member with name "MethodA()"" failed: + TypeNamespace.ClassWithoutMembers does not have a method member with name "MethodA()" + + + +----- Predicates ----- + +Query: Types that are "TypeNamespace.ClassWithoutMembers" should be Types that have method member with name "MethodA()" +Result: False +Description: TypeNamespace.ClassWithoutMembers is not Types that have method member with name "MethodA()" +Message: +"Types that are "TypeNamespace.ClassWithoutMembers" should be Types that have method member with name "MethodA()"" failed: + TypeNamespace.ClassWithoutMembers is not Types that have method member with name "MethodA()" + + + +===== Multiple inputs ===== + +Query: Types that are "TypeNamespace.ClassWithMethod" or "TypeNamespace.ClassWithoutMembers" should have a method member with name "MethodA()" +Result: True +Description: TypeNamespace.ClassWithMethod passed +Result: False +Description: TypeNamespace.ClassWithoutMembers does not have a method member with name "MethodA()" +Message: +"Types that are "TypeNamespace.ClassWithMethod" or "TypeNamespace.ClassWithoutMembers" should have a method member with name "MethodA()"" failed: + TypeNamespace.ClassWithoutMembers does not have a method member with name "MethodA()" + + + diff --git a/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/TypeSyntaxElementsTests.HavePropertyMemberWithNameTest.verified.txt b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/TypeSyntaxElementsTests.HavePropertyMemberWithNameTest.verified.txt new file mode 100644 index 000000000..9e6965235 --- /dev/null +++ b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/TypeSyntaxElementsTests.HavePropertyMemberWithNameTest.verified.txt @@ -0,0 +1,55 @@ +===== No Violations ===== + +----- Conditions ----- + +Query: Types that are "TypeNamespace.ClassWithProperty" should have a property member with name "PropertyA" +Result: True +Description: TypeNamespace.ClassWithProperty passed +Message: +All Evaluations passed + +----- Predicates ----- + +Query: Types that are "TypeNamespace.ClassWithProperty" should be Types that have property member with name"PropertyA" +Result: True +Description: TypeNamespace.ClassWithProperty passed +Message: +All Evaluations passed + +===== Violations ===== + +----- Conditions ----- + +Query: Types that are "TypeNamespace.ClassWithoutMembers" should have a property member with name "PropertyA" +Result: False +Description: TypeNamespace.ClassWithoutMembers does not have a property member with name "PropertyA" +Message: +"Types that are "TypeNamespace.ClassWithoutMembers" should have a property member with name "PropertyA"" failed: + TypeNamespace.ClassWithoutMembers does not have a property member with name "PropertyA" + + + +----- Predicates ----- + +Query: Types that are "TypeNamespace.ClassWithoutMembers" should be Types that have property member with name"PropertyA" +Result: False +Description: TypeNamespace.ClassWithoutMembers is not Types that have property member with name"PropertyA" +Message: +"Types that are "TypeNamespace.ClassWithoutMembers" should be Types that have property member with name"PropertyA"" failed: + TypeNamespace.ClassWithoutMembers is not Types that have property member with name"PropertyA" + + + +===== Multiple inputs ===== + +Query: Types that are "TypeNamespace.ClassWithProperty" or "TypeNamespace.ClassWithoutMembers" should have a property member with name "PropertyA" +Result: True +Description: TypeNamespace.ClassWithProperty passed +Result: False +Description: TypeNamespace.ClassWithoutMembers does not have a property member with name "PropertyA" +Message: +"Types that are "TypeNamespace.ClassWithProperty" or "TypeNamespace.ClassWithoutMembers" should have a property member with name "PropertyA"" failed: + TypeNamespace.ClassWithoutMembers does not have a property member with name "PropertyA" + + + diff --git a/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/TypeSyntaxElementsTests.ImplementAnyInterfacesTest.verified.txt b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/TypeSyntaxElementsTests.ImplementAnyInterfacesTest.verified.txt index bb85ad741..9c7189931 100644 --- a/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/TypeSyntaxElementsTests.ImplementAnyInterfacesTest.verified.txt +++ b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/TypeSyntaxElementsTests.ImplementAnyInterfacesTest.verified.txt @@ -2,105 +2,73 @@ ----- Conditions ----- -Query: Interfaces that are "InterfaceAssembly.IChildInterface" should implement "InterfaceAssembly.IBaseInterface" +Query: Interfaces that are "TypeNamespace.IChildTestInterface" should implement "TypeNamespace.ITestInterface" Result: True -Description: InterfaceAssembly.IChildInterface passed +Description: TypeNamespace.IChildTestInterface passed Message: All Evaluations passed -Query: Interfaces that are "InterfaceAssembly.IChildInterface" should implement "InterfaceAssembly.IBaseInterface" +Query: Interfaces that are "TypeNamespace.IChildTestInterface" should implement "TypeNamespace.ITestInterface" Result: True -Description: InterfaceAssembly.IChildInterface passed +Description: TypeNamespace.IChildTestInterface passed Message: All Evaluations passed -Query: Interfaces that are "InterfaceAssembly.IChildInterface" should implement "InterfaceAssembly.IBaseInterface" +Query: Interfaces that are "TypeNamespace.IChildTestInterface" should implement "TypeNamespace.ITestInterface" Result: True -Description: InterfaceAssembly.IChildInterface passed +Description: TypeNamespace.IChildTestInterface passed Message: All Evaluations passed -Query: Interfaces that are "InterfaceAssembly.IChildInterface" should implement "InterfaceAssembly.IBaseInterface" +Query: Interfaces that are "TypeNamespace.IChildTestInterface" should implement "TypeNamespace.ITestInterface" Result: True -Description: InterfaceAssembly.IChildInterface passed +Description: TypeNamespace.IChildTestInterface passed Message: All Evaluations passed -Query: Interfaces that are "InterfaceAssembly.IChildInterface" should implement any Interfaces that are "InterfaceAssembly.IBaseInterface" +Query: Interfaces that are "TypeNamespace.IChildTestInterface" should implement any Interfaces that are "TypeNamespace.ITestInterface" Result: True -Description: InterfaceAssembly.IChildInterface passed +Description: TypeNamespace.IChildTestInterface passed Message: All Evaluations passed ----- Predicates ----- -Query: Interfaces that are "InterfaceAssembly.IChildInterface" should be Interfaces that implement "InterfaceAssembly.IBaseInterface" +Query: Interfaces that are "TypeNamespace.IChildTestInterface" should be Interfaces that implement "TypeNamespace.ITestInterface" Result: True -Description: InterfaceAssembly.IChildInterface passed +Description: TypeNamespace.IChildTestInterface passed Message: All Evaluations passed -Query: Interfaces that are "InterfaceAssembly.IChildInterface" should be Interfaces that implement "InterfaceAssembly.IBaseInterface" +Query: Interfaces that are "TypeNamespace.IChildTestInterface" should be Interfaces that implement "TypeNamespace.ITestInterface" Result: True -Description: InterfaceAssembly.IChildInterface passed +Description: TypeNamespace.IChildTestInterface passed Message: All Evaluations passed -Query: Interfaces that are "InterfaceAssembly.IChildInterface" should be Interfaces that implement "InterfaceAssembly.IBaseInterface" +Query: Interfaces that are "TypeNamespace.IChildTestInterface" should be Interfaces that implement "TypeNamespace.ITestInterface" Result: True -Description: InterfaceAssembly.IChildInterface passed +Description: TypeNamespace.IChildTestInterface passed Message: All Evaluations passed -Query: Interfaces that are "InterfaceAssembly.IChildInterface" should be Interfaces that implement "InterfaceAssembly.IBaseInterface" +Query: Interfaces that are "TypeNamespace.IChildTestInterface" should be Interfaces that implement "TypeNamespace.ITestInterface" Result: True -Description: InterfaceAssembly.IChildInterface passed +Description: TypeNamespace.IChildTestInterface passed Message: All Evaluations passed -Query: Interfaces that are "InterfaceAssembly.IChildInterface" should be Interfaces that implement any Interfaces that are "InterfaceAssembly.IBaseInterface" +Query: Interfaces that are "TypeNamespace.IChildTestInterface" should be Interfaces that implement any Interfaces that are "TypeNamespace.ITestInterface" Result: True -Description: InterfaceAssembly.IChildInterface passed -Message: -All Evaluations passed - ------ Predicates as conditions ----- - -Query: Interfaces that are "InterfaceAssembly.IChildInterface" should be types that implement "InterfaceAssembly.IBaseInterface" -Result: True -Description: InterfaceAssembly.IChildInterface passed -Message: -All Evaluations passed - -Query: Interfaces that are "InterfaceAssembly.IChildInterface" should be types that implement "InterfaceAssembly.IBaseInterface" -Result: True -Description: InterfaceAssembly.IChildInterface passed -Message: -All Evaluations passed - -Query: Interfaces that are "InterfaceAssembly.IChildInterface" should be types that implement "InterfaceAssembly.IBaseInterface" -Result: True -Description: InterfaceAssembly.IChildInterface passed -Message: -All Evaluations passed - -Query: Interfaces that are "InterfaceAssembly.IChildInterface" should be types that implement "InterfaceAssembly.IBaseInterface" -Result: True -Description: InterfaceAssembly.IChildInterface passed -Message: -All Evaluations passed - -Query: Interfaces that are "InterfaceAssembly.IChildInterface" should be types that implement any Interfaces that are "InterfaceAssembly.IBaseInterface" -Result: True -Description: InterfaceAssembly.IChildInterface passed +Description: TypeNamespace.IChildTestInterface passed Message: All Evaluations passed ----- Complex conditions ----- -Query: Interfaces that are "InterfaceAssembly.IChildInterface" should implement any interfaces that are "InterfaceAssembly.IBaseInterface" +Query: Interfaces that are "TypeNamespace.IChildTestInterface" should implement any interfaces that are "TypeNamespace.ITestInterface" Result: True -Description: InterfaceAssembly.IChildInterface passed +Description: TypeNamespace.IChildTestInterface passed Message: All Evaluations passed @@ -108,153 +76,106 @@ All Evaluations passed ----- Conditions ----- -Query: Interfaces that are "InterfaceAssembly.IChildInterface" should implement "InterfaceAssembly.IOtherBaseInterface" +Query: Interfaces that are "TypeNamespace.IChildTestInterface" should implement "TypeNamespace.IOtherTestInterface" Result: False -Description: InterfaceAssembly.IChildInterface only implements InterfaceAssembly.IBaseInterface +Description: TypeNamespace.IChildTestInterface only implements TypeNamespace.ITestInterface Message: -"Interfaces that are "InterfaceAssembly.IChildInterface" should implement "InterfaceAssembly.IOtherBaseInterface"" failed: - InterfaceAssembly.IChildInterface only implements InterfaceAssembly.IBaseInterface +"Interfaces that are "TypeNamespace.IChildTestInterface" should implement "TypeNamespace.IOtherTestInterface"" failed: + TypeNamespace.IChildTestInterface only implements TypeNamespace.ITestInterface -Query: Interfaces that are "InterfaceAssembly.IChildInterface" should implement "InterfaceAssembly.IOtherBaseInterface" +Query: Interfaces that are "TypeNamespace.IChildTestInterface" should implement "TypeNamespace.IOtherTestInterface" Result: False -Description: InterfaceAssembly.IChildInterface only implements InterfaceAssembly.IBaseInterface +Description: TypeNamespace.IChildTestInterface only implements TypeNamespace.ITestInterface Message: -"Interfaces that are "InterfaceAssembly.IChildInterface" should implement "InterfaceAssembly.IOtherBaseInterface"" failed: - InterfaceAssembly.IChildInterface only implements InterfaceAssembly.IBaseInterface +"Interfaces that are "TypeNamespace.IChildTestInterface" should implement "TypeNamespace.IOtherTestInterface"" failed: + TypeNamespace.IChildTestInterface only implements TypeNamespace.ITestInterface -Query: Interfaces that are "InterfaceAssembly.IChildInterface" should implement "InterfaceAssembly.IOtherBaseInterface" +Query: Interfaces that are "TypeNamespace.IChildTestInterface" should implement "TypeNamespace.IOtherTestInterface" Result: False -Description: InterfaceAssembly.IChildInterface only implements InterfaceAssembly.IBaseInterface +Description: TypeNamespace.IChildTestInterface only implements TypeNamespace.ITestInterface Message: -"Interfaces that are "InterfaceAssembly.IChildInterface" should implement "InterfaceAssembly.IOtherBaseInterface"" failed: - InterfaceAssembly.IChildInterface only implements InterfaceAssembly.IBaseInterface +"Interfaces that are "TypeNamespace.IChildTestInterface" should implement "TypeNamespace.IOtherTestInterface"" failed: + TypeNamespace.IChildTestInterface only implements TypeNamespace.ITestInterface -Query: Interfaces that are "InterfaceAssembly.IChildInterface" should implement "InterfaceAssembly.IOtherBaseInterface" +Query: Interfaces that are "TypeNamespace.IChildTestInterface" should implement "TypeNamespace.IOtherTestInterface" Result: False -Description: InterfaceAssembly.IChildInterface only implements InterfaceAssembly.IBaseInterface +Description: TypeNamespace.IChildTestInterface only implements TypeNamespace.ITestInterface Message: -"Interfaces that are "InterfaceAssembly.IChildInterface" should implement "InterfaceAssembly.IOtherBaseInterface"" failed: - InterfaceAssembly.IChildInterface only implements InterfaceAssembly.IBaseInterface +"Interfaces that are "TypeNamespace.IChildTestInterface" should implement "TypeNamespace.IOtherTestInterface"" failed: + TypeNamespace.IChildTestInterface only implements TypeNamespace.ITestInterface -Query: Interfaces that are "InterfaceAssembly.IChildInterface" should implement any Interfaces that are "InterfaceAssembly.IOtherBaseInterface" +Query: Interfaces that are "TypeNamespace.IChildTestInterface" should implement any Interfaces that are "TypeNamespace.IOtherTestInterface" Result: False -Description: InterfaceAssembly.IChildInterface only implements InterfaceAssembly.IBaseInterface +Description: TypeNamespace.IChildTestInterface only implements TypeNamespace.ITestInterface Message: -"Interfaces that are "InterfaceAssembly.IChildInterface" should implement any Interfaces that are "InterfaceAssembly.IOtherBaseInterface"" failed: - InterfaceAssembly.IChildInterface only implements InterfaceAssembly.IBaseInterface +"Interfaces that are "TypeNamespace.IChildTestInterface" should implement any Interfaces that are "TypeNamespace.IOtherTestInterface"" failed: + TypeNamespace.IChildTestInterface only implements TypeNamespace.ITestInterface ----- Predicates ----- -Query: Interfaces that are "InterfaceAssembly.IChildInterface" should be Interfaces that implement "InterfaceAssembly.IOtherBaseInterface" -Result: False -Description: InterfaceAssembly.IChildInterface is not Interfaces that implement "InterfaceAssembly.IOtherBaseInterface" -Message: -"Interfaces that are "InterfaceAssembly.IChildInterface" should be Interfaces that implement "InterfaceAssembly.IOtherBaseInterface"" failed: - InterfaceAssembly.IChildInterface is not Interfaces that implement "InterfaceAssembly.IOtherBaseInterface" - - - -Query: Interfaces that are "InterfaceAssembly.IChildInterface" should be Interfaces that implement "InterfaceAssembly.IOtherBaseInterface" -Result: False -Description: InterfaceAssembly.IChildInterface is not Interfaces that implement "InterfaceAssembly.IOtherBaseInterface" -Message: -"Interfaces that are "InterfaceAssembly.IChildInterface" should be Interfaces that implement "InterfaceAssembly.IOtherBaseInterface"" failed: - InterfaceAssembly.IChildInterface is not Interfaces that implement "InterfaceAssembly.IOtherBaseInterface" - - - -Query: Interfaces that are "InterfaceAssembly.IChildInterface" should be Interfaces that implement "InterfaceAssembly.IOtherBaseInterface" -Result: False -Description: InterfaceAssembly.IChildInterface is not Interfaces that implement "InterfaceAssembly.IOtherBaseInterface" -Message: -"Interfaces that are "InterfaceAssembly.IChildInterface" should be Interfaces that implement "InterfaceAssembly.IOtherBaseInterface"" failed: - InterfaceAssembly.IChildInterface is not Interfaces that implement "InterfaceAssembly.IOtherBaseInterface" - - - -Query: Interfaces that are "InterfaceAssembly.IChildInterface" should be Interfaces that implement "InterfaceAssembly.IOtherBaseInterface" -Result: False -Description: InterfaceAssembly.IChildInterface is not Interfaces that implement "InterfaceAssembly.IOtherBaseInterface" -Message: -"Interfaces that are "InterfaceAssembly.IChildInterface" should be Interfaces that implement "InterfaceAssembly.IOtherBaseInterface"" failed: - InterfaceAssembly.IChildInterface is not Interfaces that implement "InterfaceAssembly.IOtherBaseInterface" - - - -Query: Interfaces that are "InterfaceAssembly.IChildInterface" should be Interfaces that implement any Interfaces that are "InterfaceAssembly.IOtherBaseInterface" -Result: False -Description: InterfaceAssembly.IChildInterface is not Interfaces that implement any Interfaces that are "InterfaceAssembly.IOtherBaseInterface" -Message: -"Interfaces that are "InterfaceAssembly.IChildInterface" should be Interfaces that implement any Interfaces that are "InterfaceAssembly.IOtherBaseInterface"" failed: - InterfaceAssembly.IChildInterface is not Interfaces that implement any Interfaces that are "InterfaceAssembly.IOtherBaseInterface" - - - ------ Predicates as conditions ----- - -Query: Interfaces that are "InterfaceAssembly.IChildInterface" should be types that implement "InterfaceAssembly.IOtherBaseInterface" +Query: Interfaces that are "TypeNamespace.IChildTestInterface" should be Interfaces that implement "TypeNamespace.IOtherTestInterface" Result: False -Description: InterfaceAssembly.IChildInterface is not "InterfaceAssembly.IOtherChildInterface" or "InterfaceAssembly.IInterfaceWithMultipleDependencies" +Description: TypeNamespace.IChildTestInterface is not Interfaces that implement "TypeNamespace.IOtherTestInterface" Message: -"Interfaces that are "InterfaceAssembly.IChildInterface" should be types that implement "InterfaceAssembly.IOtherBaseInterface"" failed: - InterfaceAssembly.IChildInterface is not "InterfaceAssembly.IOtherChildInterface" or "InterfaceAssembly.IInterfaceWithMultipleDependencies" +"Interfaces that are "TypeNamespace.IChildTestInterface" should be Interfaces that implement "TypeNamespace.IOtherTestInterface"" failed: + TypeNamespace.IChildTestInterface is not Interfaces that implement "TypeNamespace.IOtherTestInterface" -Query: Interfaces that are "InterfaceAssembly.IChildInterface" should be types that implement "InterfaceAssembly.IOtherBaseInterface" +Query: Interfaces that are "TypeNamespace.IChildTestInterface" should be Interfaces that implement "TypeNamespace.IOtherTestInterface" Result: False -Description: InterfaceAssembly.IChildInterface is not "InterfaceAssembly.IOtherChildInterface" or "InterfaceAssembly.IInterfaceWithMultipleDependencies" +Description: TypeNamespace.IChildTestInterface is not Interfaces that implement "TypeNamespace.IOtherTestInterface" Message: -"Interfaces that are "InterfaceAssembly.IChildInterface" should be types that implement "InterfaceAssembly.IOtherBaseInterface"" failed: - InterfaceAssembly.IChildInterface is not "InterfaceAssembly.IOtherChildInterface" or "InterfaceAssembly.IInterfaceWithMultipleDependencies" +"Interfaces that are "TypeNamespace.IChildTestInterface" should be Interfaces that implement "TypeNamespace.IOtherTestInterface"" failed: + TypeNamespace.IChildTestInterface is not Interfaces that implement "TypeNamespace.IOtherTestInterface" -Query: Interfaces that are "InterfaceAssembly.IChildInterface" should be types that implement "InterfaceAssembly.IOtherBaseInterface" +Query: Interfaces that are "TypeNamespace.IChildTestInterface" should be Interfaces that implement "TypeNamespace.IOtherTestInterface" Result: False -Description: InterfaceAssembly.IChildInterface is not "InterfaceAssembly.IOtherChildInterface" or "InterfaceAssembly.IInterfaceWithMultipleDependencies" +Description: TypeNamespace.IChildTestInterface is not Interfaces that implement "TypeNamespace.IOtherTestInterface" Message: -"Interfaces that are "InterfaceAssembly.IChildInterface" should be types that implement "InterfaceAssembly.IOtherBaseInterface"" failed: - InterfaceAssembly.IChildInterface is not "InterfaceAssembly.IOtherChildInterface" or "InterfaceAssembly.IInterfaceWithMultipleDependencies" +"Interfaces that are "TypeNamespace.IChildTestInterface" should be Interfaces that implement "TypeNamespace.IOtherTestInterface"" failed: + TypeNamespace.IChildTestInterface is not Interfaces that implement "TypeNamespace.IOtherTestInterface" -Query: Interfaces that are "InterfaceAssembly.IChildInterface" should be types that implement "InterfaceAssembly.IOtherBaseInterface" +Query: Interfaces that are "TypeNamespace.IChildTestInterface" should be Interfaces that implement "TypeNamespace.IOtherTestInterface" Result: False -Description: InterfaceAssembly.IChildInterface is not "InterfaceAssembly.IOtherChildInterface" or "InterfaceAssembly.IInterfaceWithMultipleDependencies" +Description: TypeNamespace.IChildTestInterface is not Interfaces that implement "TypeNamespace.IOtherTestInterface" Message: -"Interfaces that are "InterfaceAssembly.IChildInterface" should be types that implement "InterfaceAssembly.IOtherBaseInterface"" failed: - InterfaceAssembly.IChildInterface is not "InterfaceAssembly.IOtherChildInterface" or "InterfaceAssembly.IInterfaceWithMultipleDependencies" +"Interfaces that are "TypeNamespace.IChildTestInterface" should be Interfaces that implement "TypeNamespace.IOtherTestInterface"" failed: + TypeNamespace.IChildTestInterface is not Interfaces that implement "TypeNamespace.IOtherTestInterface" -Query: Interfaces that are "InterfaceAssembly.IChildInterface" should be types that implement any Interfaces that are "InterfaceAssembly.IOtherBaseInterface" +Query: Interfaces that are "TypeNamespace.IChildTestInterface" should be Interfaces that implement any Interfaces that are "TypeNamespace.IOtherTestInterface" Result: False -Description: InterfaceAssembly.IChildInterface is not "InterfaceAssembly.IOtherChildInterface" or "InterfaceAssembly.IInterfaceWithMultipleDependencies" +Description: TypeNamespace.IChildTestInterface is not Interfaces that implement any Interfaces that are "TypeNamespace.IOtherTestInterface" Message: -"Interfaces that are "InterfaceAssembly.IChildInterface" should be types that implement any Interfaces that are "InterfaceAssembly.IOtherBaseInterface"" failed: - InterfaceAssembly.IChildInterface is not "InterfaceAssembly.IOtherChildInterface" or "InterfaceAssembly.IInterfaceWithMultipleDependencies" +"Interfaces that are "TypeNamespace.IChildTestInterface" should be Interfaces that implement any Interfaces that are "TypeNamespace.IOtherTestInterface"" failed: + TypeNamespace.IChildTestInterface is not Interfaces that implement any Interfaces that are "TypeNamespace.IOtherTestInterface" ----- Complex conditions ----- -Query: Interfaces that are "InterfaceAssembly.IChildInterface" should implement any interfaces that are "InterfaceAssembly.IOtherBaseInterface" +Query: Interfaces that are "TypeNamespace.IChildTestInterface" should implement any interfaces that are "TypeNamespace.IOtherTestInterface" Result: False -Description: InterfaceAssembly.IChildInterface only implements InterfaceAssembly.IBaseInterface +Description: TypeNamespace.IChildTestInterface only implements TypeNamespace.ITestInterface Message: -"Interfaces that are "InterfaceAssembly.IChildInterface" should implement any interfaces that are "InterfaceAssembly.IOtherBaseInterface"" failed: - InterfaceAssembly.IChildInterface only implements InterfaceAssembly.IBaseInterface +"Interfaces that are "TypeNamespace.IChildTestInterface" should implement any interfaces that are "TypeNamespace.IOtherTestInterface"" failed: + TypeNamespace.IChildTestInterface only implements TypeNamespace.ITestInterface @@ -262,153 +183,115 @@ Message: ----- Conditions ----- -Query: Interfaces that are "InterfaceAssembly.IBaseInterface" or "InterfaceAssembly.IChildInterface" should implement any of no interfaces (always false) +Query: Interfaces that are "TypeNamespace.ITestInterface" or "TypeNamespace.IChildTestInterface" should implement any of no interfaces (always false) Result: False -Description: InterfaceAssembly.IBaseInterface does not implement any interface +Description: TypeNamespace.ITestInterface does not implement any interface Result: False -Description: InterfaceAssembly.IChildInterface only implements InterfaceAssembly.IBaseInterface +Description: TypeNamespace.IChildTestInterface only implements TypeNamespace.ITestInterface Message: -"Interfaces that are "InterfaceAssembly.IBaseInterface" or "InterfaceAssembly.IChildInterface" should implement any of no interfaces (always false)" failed: - InterfaceAssembly.IBaseInterface does not implement any interface - InterfaceAssembly.IChildInterface only implements InterfaceAssembly.IBaseInterface +"Interfaces that are "TypeNamespace.ITestInterface" or "TypeNamespace.IChildTestInterface" should implement any of no interfaces (always false)" failed: + TypeNamespace.ITestInterface does not implement any interface + TypeNamespace.IChildTestInterface only implements TypeNamespace.ITestInterface -Query: Interfaces that are "InterfaceAssembly.IBaseInterface" or "InterfaceAssembly.IChildInterface" should implement any of no interfaces (always false) +Query: Interfaces that are "TypeNamespace.ITestInterface" or "TypeNamespace.IChildTestInterface" should implement any of no interfaces (always false) Result: False -Description: InterfaceAssembly.IBaseInterface does not implement any interface +Description: TypeNamespace.ITestInterface does not implement any interface Result: False -Description: InterfaceAssembly.IChildInterface only implements InterfaceAssembly.IBaseInterface +Description: TypeNamespace.IChildTestInterface only implements TypeNamespace.ITestInterface Message: -"Interfaces that are "InterfaceAssembly.IBaseInterface" or "InterfaceAssembly.IChildInterface" should implement any of no interfaces (always false)" failed: - InterfaceAssembly.IBaseInterface does not implement any interface - InterfaceAssembly.IChildInterface only implements InterfaceAssembly.IBaseInterface +"Interfaces that are "TypeNamespace.ITestInterface" or "TypeNamespace.IChildTestInterface" should implement any of no interfaces (always false)" failed: + TypeNamespace.ITestInterface does not implement any interface + TypeNamespace.IChildTestInterface only implements TypeNamespace.ITestInterface -Query: Interfaces that are "InterfaceAssembly.IBaseInterface" or "InterfaceAssembly.IChildInterface" should implement any of no interfaces (always false) +Query: Interfaces that are "TypeNamespace.ITestInterface" or "TypeNamespace.IChildTestInterface" should implement any of no interfaces (always false) Result: False -Description: InterfaceAssembly.IBaseInterface does not implement any interface +Description: TypeNamespace.ITestInterface does not implement any interface Result: False -Description: InterfaceAssembly.IChildInterface only implements InterfaceAssembly.IBaseInterface +Description: TypeNamespace.IChildTestInterface only implements TypeNamespace.ITestInterface Message: -"Interfaces that are "InterfaceAssembly.IBaseInterface" or "InterfaceAssembly.IChildInterface" should implement any of no interfaces (always false)" failed: - InterfaceAssembly.IBaseInterface does not implement any interface - InterfaceAssembly.IChildInterface only implements InterfaceAssembly.IBaseInterface +"Interfaces that are "TypeNamespace.ITestInterface" or "TypeNamespace.IChildTestInterface" should implement any of no interfaces (always false)" failed: + TypeNamespace.ITestInterface does not implement any interface + TypeNamespace.IChildTestInterface only implements TypeNamespace.ITestInterface -Query: Interfaces that are "InterfaceAssembly.IBaseInterface" or "InterfaceAssembly.IChildInterface" should implement any Interfaces that have name "NotTheNameOfAnyObject" +Query: Interfaces that are "TypeNamespace.ITestInterface" or "TypeNamespace.IChildTestInterface" should implement any Interfaces that have name "NotTheNameOfAnyObject" Result: False -Description: InterfaceAssembly.IBaseInterface does not implement any interface +Description: TypeNamespace.ITestInterface does not implement any interface Result: False -Description: InterfaceAssembly.IChildInterface only implements InterfaceAssembly.IBaseInterface +Description: TypeNamespace.IChildTestInterface only implements TypeNamespace.ITestInterface Message: -"Interfaces that are "InterfaceAssembly.IBaseInterface" or "InterfaceAssembly.IChildInterface" should implement any Interfaces that have name "NotTheNameOfAnyObject"" failed: - InterfaceAssembly.IBaseInterface does not implement any interface - InterfaceAssembly.IChildInterface only implements InterfaceAssembly.IBaseInterface +"Interfaces that are "TypeNamespace.ITestInterface" or "TypeNamespace.IChildTestInterface" should implement any Interfaces that have name "NotTheNameOfAnyObject"" failed: + TypeNamespace.ITestInterface does not implement any interface + TypeNamespace.IChildTestInterface only implements TypeNamespace.ITestInterface ----- Predicates ----- -Query: Interfaces that are "InterfaceAssembly.IBaseInterface" or "InterfaceAssembly.IChildInterface" should be Interfaces that implement any of no interfaces (always false) -Result: False -Description: InterfaceAssembly.IBaseInterface is not Interfaces that implement any of no interfaces (always false) -Result: False -Description: InterfaceAssembly.IChildInterface is not Interfaces that implement any of no interfaces (always false) -Message: -"Interfaces that are "InterfaceAssembly.IBaseInterface" or "InterfaceAssembly.IChildInterface" should be Interfaces that implement any of no interfaces (always false)" failed: - InterfaceAssembly.IBaseInterface is not Interfaces that implement any of no interfaces (always false) - InterfaceAssembly.IChildInterface is not Interfaces that implement any of no interfaces (always false) - - - -Query: Interfaces that are "InterfaceAssembly.IBaseInterface" or "InterfaceAssembly.IChildInterface" should be Interfaces that implement any of no interfaces (always false) +Query: Interfaces that are "TypeNamespace.ITestInterface" or "TypeNamespace.IChildTestInterface" should be Interfaces that implement any of no interfaces (always false) Result: False -Description: InterfaceAssembly.IBaseInterface is not Interfaces that implement any of no interfaces (always false) +Description: TypeNamespace.ITestInterface is not Interfaces that implement any of no interfaces (always false) Result: False -Description: InterfaceAssembly.IChildInterface is not Interfaces that implement any of no interfaces (always false) +Description: TypeNamespace.IChildTestInterface is not Interfaces that implement any of no interfaces (always false) Message: -"Interfaces that are "InterfaceAssembly.IBaseInterface" or "InterfaceAssembly.IChildInterface" should be Interfaces that implement any of no interfaces (always false)" failed: - InterfaceAssembly.IBaseInterface is not Interfaces that implement any of no interfaces (always false) - InterfaceAssembly.IChildInterface is not Interfaces that implement any of no interfaces (always false) +"Interfaces that are "TypeNamespace.ITestInterface" or "TypeNamespace.IChildTestInterface" should be Interfaces that implement any of no interfaces (always false)" failed: + TypeNamespace.ITestInterface is not Interfaces that implement any of no interfaces (always false) + TypeNamespace.IChildTestInterface is not Interfaces that implement any of no interfaces (always false) -Query: Interfaces that are "InterfaceAssembly.IBaseInterface" or "InterfaceAssembly.IChildInterface" should be Interfaces that implement any of no interfaces (always false) +Query: Interfaces that are "TypeNamespace.ITestInterface" or "TypeNamespace.IChildTestInterface" should be Interfaces that implement any of no interfaces (always false) Result: False -Description: InterfaceAssembly.IBaseInterface is not Interfaces that implement any of no interfaces (always false) +Description: TypeNamespace.ITestInterface is not Interfaces that implement any of no interfaces (always false) Result: False -Description: InterfaceAssembly.IChildInterface is not Interfaces that implement any of no interfaces (always false) +Description: TypeNamespace.IChildTestInterface is not Interfaces that implement any of no interfaces (always false) Message: -"Interfaces that are "InterfaceAssembly.IBaseInterface" or "InterfaceAssembly.IChildInterface" should be Interfaces that implement any of no interfaces (always false)" failed: - InterfaceAssembly.IBaseInterface is not Interfaces that implement any of no interfaces (always false) - InterfaceAssembly.IChildInterface is not Interfaces that implement any of no interfaces (always false) +"Interfaces that are "TypeNamespace.ITestInterface" or "TypeNamespace.IChildTestInterface" should be Interfaces that implement any of no interfaces (always false)" failed: + TypeNamespace.ITestInterface is not Interfaces that implement any of no interfaces (always false) + TypeNamespace.IChildTestInterface is not Interfaces that implement any of no interfaces (always false) -Query: Interfaces that are "InterfaceAssembly.IBaseInterface" or "InterfaceAssembly.IChildInterface" should be Interfaces that implement any Interfaces that have name "NotTheNameOfAnyObject" +Query: Interfaces that are "TypeNamespace.ITestInterface" or "TypeNamespace.IChildTestInterface" should be Interfaces that implement any of no interfaces (always false) Result: False -Description: InterfaceAssembly.IBaseInterface is not Interfaces that implement any Interfaces that have name "NotTheNameOfAnyObject" +Description: TypeNamespace.ITestInterface is not Interfaces that implement any of no interfaces (always false) Result: False -Description: InterfaceAssembly.IChildInterface is not Interfaces that implement any Interfaces that have name "NotTheNameOfAnyObject" +Description: TypeNamespace.IChildTestInterface is not Interfaces that implement any of no interfaces (always false) Message: -"Interfaces that are "InterfaceAssembly.IBaseInterface" or "InterfaceAssembly.IChildInterface" should be Interfaces that implement any Interfaces that have name "NotTheNameOfAnyObject"" failed: - InterfaceAssembly.IBaseInterface is not Interfaces that implement any Interfaces that have name "NotTheNameOfAnyObject" - InterfaceAssembly.IChildInterface is not Interfaces that implement any Interfaces that have name "NotTheNameOfAnyObject" - +"Interfaces that are "TypeNamespace.ITestInterface" or "TypeNamespace.IChildTestInterface" should be Interfaces that implement any of no interfaces (always false)" failed: + TypeNamespace.ITestInterface is not Interfaces that implement any of no interfaces (always false) + TypeNamespace.IChildTestInterface is not Interfaces that implement any of no interfaces (always false) ------ Predicates as conditions ----- -Query: Interfaces that are "InterfaceAssembly.IBaseInterface" or "InterfaceAssembly.IChildInterface" should be types that implement any of no interfaces (always false) +Query: Interfaces that are "TypeNamespace.ITestInterface" or "TypeNamespace.IChildTestInterface" should be Interfaces that implement any Interfaces that have name "NotTheNameOfAnyObject" Result: False -Description: InterfaceAssembly.IBaseInterface does exist +Description: TypeNamespace.ITestInterface is not Interfaces that implement any Interfaces that have name "NotTheNameOfAnyObject" Result: False -Description: InterfaceAssembly.IChildInterface does exist +Description: TypeNamespace.IChildTestInterface is not Interfaces that implement any Interfaces that have name "NotTheNameOfAnyObject" Message: -"Interfaces that are "InterfaceAssembly.IBaseInterface" or "InterfaceAssembly.IChildInterface" should be types that implement any of no interfaces (always false)" failed: - InterfaceAssembly.IBaseInterface does exist - InterfaceAssembly.IChildInterface does exist - - - -Query: Interfaces that are "InterfaceAssembly.IBaseInterface" or "InterfaceAssembly.IChildInterface" should be types that implement any of no interfaces (always false) -Result: False -Description: InterfaceAssembly.IBaseInterface does exist -Result: False -Description: InterfaceAssembly.IChildInterface does exist -Message: -"Interfaces that are "InterfaceAssembly.IBaseInterface" or "InterfaceAssembly.IChildInterface" should be types that implement any of no interfaces (always false)" failed: - InterfaceAssembly.IBaseInterface does exist - InterfaceAssembly.IChildInterface does exist - - - -Query: Interfaces that are "InterfaceAssembly.IBaseInterface" or "InterfaceAssembly.IChildInterface" should be types that implement any Interfaces that have name "NotTheNameOfAnyObject" -Result: False -Description: InterfaceAssembly.IBaseInterface does exist -Result: False -Description: InterfaceAssembly.IChildInterface does exist -Message: -"Interfaces that are "InterfaceAssembly.IBaseInterface" or "InterfaceAssembly.IChildInterface" should be types that implement any Interfaces that have name "NotTheNameOfAnyObject"" failed: - InterfaceAssembly.IBaseInterface does exist - InterfaceAssembly.IChildInterface does exist +"Interfaces that are "TypeNamespace.ITestInterface" or "TypeNamespace.IChildTestInterface" should be Interfaces that implement any Interfaces that have name "NotTheNameOfAnyObject"" failed: + TypeNamespace.ITestInterface is not Interfaces that implement any Interfaces that have name "NotTheNameOfAnyObject" + TypeNamespace.IChildTestInterface is not Interfaces that implement any Interfaces that have name "NotTheNameOfAnyObject" ----- Complex conditions ----- -Query: Interfaces that are "InterfaceAssembly.IBaseInterface" or "InterfaceAssembly.IChildInterface" should implement any interfaces that are any of no objects (always empty) +Query: Interfaces that are "TypeNamespace.ITestInterface" or "TypeNamespace.IChildTestInterface" should implement any interfaces that are any of no objects (always empty) Result: False -Description: InterfaceAssembly.IBaseInterface does not implement any interface +Description: TypeNamespace.ITestInterface does not implement any interface Result: False -Description: InterfaceAssembly.IChildInterface only implements InterfaceAssembly.IBaseInterface +Description: TypeNamespace.IChildTestInterface only implements TypeNamespace.ITestInterface Message: -"Interfaces that are "InterfaceAssembly.IBaseInterface" or "InterfaceAssembly.IChildInterface" should implement any interfaces that are any of no objects (always empty)" failed: - InterfaceAssembly.IBaseInterface does not implement any interface - InterfaceAssembly.IChildInterface only implements InterfaceAssembly.IBaseInterface +"Interfaces that are "TypeNamespace.ITestInterface" or "TypeNamespace.IChildTestInterface" should implement any interfaces that are any of no objects (always empty)" failed: + TypeNamespace.ITestInterface does not implement any interface + TypeNamespace.IChildTestInterface only implements TypeNamespace.ITestInterface @@ -416,200 +299,153 @@ Message: ----- Conditions ----- -Query: Interfaces that are "InterfaceAssembly.IChildInterface" should implement any "InterfaceAssembly.IOtherBaseInterface" or "InterfaceAssembly.IOtherChildInterface" +Query: Interfaces that are "TypeNamespace.IChildTestInterface" should implement any "TypeNamespace.IOtherTestInterface" or "TypeNamespace.IOtherChildTestInterface" Result: False -Description: InterfaceAssembly.IChildInterface only implements InterfaceAssembly.IBaseInterface +Description: TypeNamespace.IChildTestInterface only implements TypeNamespace.ITestInterface Message: -"Interfaces that are "InterfaceAssembly.IChildInterface" should implement any "InterfaceAssembly.IOtherBaseInterface" or "InterfaceAssembly.IOtherChildInterface"" failed: - InterfaceAssembly.IChildInterface only implements InterfaceAssembly.IBaseInterface +"Interfaces that are "TypeNamespace.IChildTestInterface" should implement any "TypeNamespace.IOtherTestInterface" or "TypeNamespace.IOtherChildTestInterface"" failed: + TypeNamespace.IChildTestInterface only implements TypeNamespace.ITestInterface -Query: Interfaces that are "InterfaceAssembly.IChildInterface" should implement any "InterfaceAssembly.IOtherBaseInterface" or "InterfaceAssembly.IOtherChildInterface" +Query: Interfaces that are "TypeNamespace.IChildTestInterface" should implement any "TypeNamespace.IOtherTestInterface" or "TypeNamespace.IOtherChildTestInterface" Result: False -Description: InterfaceAssembly.IChildInterface only implements InterfaceAssembly.IBaseInterface +Description: TypeNamespace.IChildTestInterface only implements TypeNamespace.ITestInterface Message: -"Interfaces that are "InterfaceAssembly.IChildInterface" should implement any "InterfaceAssembly.IOtherBaseInterface" or "InterfaceAssembly.IOtherChildInterface"" failed: - InterfaceAssembly.IChildInterface only implements InterfaceAssembly.IBaseInterface +"Interfaces that are "TypeNamespace.IChildTestInterface" should implement any "TypeNamespace.IOtherTestInterface" or "TypeNamespace.IOtherChildTestInterface"" failed: + TypeNamespace.IChildTestInterface only implements TypeNamespace.ITestInterface -Query: Interfaces that are "InterfaceAssembly.IChildInterface" should implement any "InterfaceAssembly.IOtherBaseInterface" or "InterfaceAssembly.IOtherChildInterface" +Query: Interfaces that are "TypeNamespace.IChildTestInterface" should implement any "TypeNamespace.IOtherTestInterface" or "TypeNamespace.IOtherChildTestInterface" Result: False -Description: InterfaceAssembly.IChildInterface only implements InterfaceAssembly.IBaseInterface +Description: TypeNamespace.IChildTestInterface only implements TypeNamespace.ITestInterface Message: -"Interfaces that are "InterfaceAssembly.IChildInterface" should implement any "InterfaceAssembly.IOtherBaseInterface" or "InterfaceAssembly.IOtherChildInterface"" failed: - InterfaceAssembly.IChildInterface only implements InterfaceAssembly.IBaseInterface +"Interfaces that are "TypeNamespace.IChildTestInterface" should implement any "TypeNamespace.IOtherTestInterface" or "TypeNamespace.IOtherChildTestInterface"" failed: + TypeNamespace.IChildTestInterface only implements TypeNamespace.ITestInterface -Query: Interfaces that are "InterfaceAssembly.IChildInterface" should implement any "InterfaceAssembly.IOtherBaseInterface" or "InterfaceAssembly.IOtherChildInterface" +Query: Interfaces that are "TypeNamespace.IChildTestInterface" should implement any "TypeNamespace.IOtherTestInterface" or "TypeNamespace.IOtherChildTestInterface" Result: False -Description: InterfaceAssembly.IChildInterface only implements InterfaceAssembly.IBaseInterface +Description: TypeNamespace.IChildTestInterface only implements TypeNamespace.ITestInterface Message: -"Interfaces that are "InterfaceAssembly.IChildInterface" should implement any "InterfaceAssembly.IOtherBaseInterface" or "InterfaceAssembly.IOtherChildInterface"" failed: - InterfaceAssembly.IChildInterface only implements InterfaceAssembly.IBaseInterface +"Interfaces that are "TypeNamespace.IChildTestInterface" should implement any "TypeNamespace.IOtherTestInterface" or "TypeNamespace.IOtherChildTestInterface"" failed: + TypeNamespace.IChildTestInterface only implements TypeNamespace.ITestInterface -Query: Interfaces that are "InterfaceAssembly.IChildInterface" should implement any Interfaces that are "InterfaceAssembly.IOtherBaseInterface" or "InterfaceAssembly.IOtherChildInterface" +Query: Interfaces that are "TypeNamespace.IChildTestInterface" should implement any Interfaces that are "TypeNamespace.IOtherTestInterface" or "TypeNamespace.IOtherChildTestInterface" Result: False -Description: InterfaceAssembly.IChildInterface only implements InterfaceAssembly.IBaseInterface +Description: TypeNamespace.IChildTestInterface only implements TypeNamespace.ITestInterface Message: -"Interfaces that are "InterfaceAssembly.IChildInterface" should implement any Interfaces that are "InterfaceAssembly.IOtherBaseInterface" or "InterfaceAssembly.IOtherChildInterface"" failed: - InterfaceAssembly.IChildInterface only implements InterfaceAssembly.IBaseInterface +"Interfaces that are "TypeNamespace.IChildTestInterface" should implement any Interfaces that are "TypeNamespace.IOtherTestInterface" or "TypeNamespace.IOtherChildTestInterface"" failed: + TypeNamespace.IChildTestInterface only implements TypeNamespace.ITestInterface ----- Predicates ----- -Query: Interfaces that are "InterfaceAssembly.IChildInterface" should be Interfaces that implement any "InterfaceAssembly.IOtherBaseInterface" or "InterfaceAssembly.IOtherChildInterface" -Result: False -Description: InterfaceAssembly.IChildInterface is not Interfaces that implement any "InterfaceAssembly.IOtherBaseInterface" or "InterfaceAssembly.IOtherChildInterface" -Message: -"Interfaces that are "InterfaceAssembly.IChildInterface" should be Interfaces that implement any "InterfaceAssembly.IOtherBaseInterface" or "InterfaceAssembly.IOtherChildInterface"" failed: - InterfaceAssembly.IChildInterface is not Interfaces that implement any "InterfaceAssembly.IOtherBaseInterface" or "InterfaceAssembly.IOtherChildInterface" - - - -Query: Interfaces that are "InterfaceAssembly.IChildInterface" should be Interfaces that implement any "InterfaceAssembly.IOtherBaseInterface" or "InterfaceAssembly.IOtherChildInterface" -Result: False -Description: InterfaceAssembly.IChildInterface is not Interfaces that implement any "InterfaceAssembly.IOtherBaseInterface" or "InterfaceAssembly.IOtherChildInterface" -Message: -"Interfaces that are "InterfaceAssembly.IChildInterface" should be Interfaces that implement any "InterfaceAssembly.IOtherBaseInterface" or "InterfaceAssembly.IOtherChildInterface"" failed: - InterfaceAssembly.IChildInterface is not Interfaces that implement any "InterfaceAssembly.IOtherBaseInterface" or "InterfaceAssembly.IOtherChildInterface" - - - -Query: Interfaces that are "InterfaceAssembly.IChildInterface" should be Interfaces that implement any "InterfaceAssembly.IOtherBaseInterface" or "InterfaceAssembly.IOtherChildInterface" -Result: False -Description: InterfaceAssembly.IChildInterface is not Interfaces that implement any "InterfaceAssembly.IOtherBaseInterface" or "InterfaceAssembly.IOtherChildInterface" -Message: -"Interfaces that are "InterfaceAssembly.IChildInterface" should be Interfaces that implement any "InterfaceAssembly.IOtherBaseInterface" or "InterfaceAssembly.IOtherChildInterface"" failed: - InterfaceAssembly.IChildInterface is not Interfaces that implement any "InterfaceAssembly.IOtherBaseInterface" or "InterfaceAssembly.IOtherChildInterface" - - - -Query: Interfaces that are "InterfaceAssembly.IChildInterface" should be Interfaces that implement any "InterfaceAssembly.IOtherBaseInterface" or "InterfaceAssembly.IOtherChildInterface" -Result: False -Description: InterfaceAssembly.IChildInterface is not Interfaces that implement any "InterfaceAssembly.IOtherBaseInterface" or "InterfaceAssembly.IOtherChildInterface" -Message: -"Interfaces that are "InterfaceAssembly.IChildInterface" should be Interfaces that implement any "InterfaceAssembly.IOtherBaseInterface" or "InterfaceAssembly.IOtherChildInterface"" failed: - InterfaceAssembly.IChildInterface is not Interfaces that implement any "InterfaceAssembly.IOtherBaseInterface" or "InterfaceAssembly.IOtherChildInterface" - - - -Query: Interfaces that are "InterfaceAssembly.IChildInterface" should be Interfaces that implement any Interfaces that are "InterfaceAssembly.IOtherBaseInterface" or "InterfaceAssembly.IOtherChildInterface" -Result: False -Description: InterfaceAssembly.IChildInterface is not Interfaces that implement any Interfaces that are "InterfaceAssembly.IOtherBaseInterface" or "InterfaceAssembly.IOtherChildInterface" -Message: -"Interfaces that are "InterfaceAssembly.IChildInterface" should be Interfaces that implement any Interfaces that are "InterfaceAssembly.IOtherBaseInterface" or "InterfaceAssembly.IOtherChildInterface"" failed: - InterfaceAssembly.IChildInterface is not Interfaces that implement any Interfaces that are "InterfaceAssembly.IOtherBaseInterface" or "InterfaceAssembly.IOtherChildInterface" - - - ------ Predicates as conditions ----- - -Query: Interfaces that are "InterfaceAssembly.IChildInterface" should be types that implement any "InterfaceAssembly.IOtherBaseInterface" or "InterfaceAssembly.IOtherChildInterface" +Query: Interfaces that are "TypeNamespace.IChildTestInterface" should be Interfaces that implement any "TypeNamespace.IOtherTestInterface" or "TypeNamespace.IOtherChildTestInterface" Result: False -Description: InterfaceAssembly.IChildInterface is not "InterfaceAssembly.IOtherChildInterface" or "InterfaceAssembly.IInterfaceWithMultipleDependencies" +Description: TypeNamespace.IChildTestInterface is not Interfaces that implement any "TypeNamespace.IOtherTestInterface" or "TypeNamespace.IOtherChildTestInterface" Message: -"Interfaces that are "InterfaceAssembly.IChildInterface" should be types that implement any "InterfaceAssembly.IOtherBaseInterface" or "InterfaceAssembly.IOtherChildInterface"" failed: - InterfaceAssembly.IChildInterface is not "InterfaceAssembly.IOtherChildInterface" or "InterfaceAssembly.IInterfaceWithMultipleDependencies" +"Interfaces that are "TypeNamespace.IChildTestInterface" should be Interfaces that implement any "TypeNamespace.IOtherTestInterface" or "TypeNamespace.IOtherChildTestInterface"" failed: + TypeNamespace.IChildTestInterface is not Interfaces that implement any "TypeNamespace.IOtherTestInterface" or "TypeNamespace.IOtherChildTestInterface" -Query: Interfaces that are "InterfaceAssembly.IChildInterface" should be types that implement any "InterfaceAssembly.IOtherBaseInterface" or "InterfaceAssembly.IOtherChildInterface" +Query: Interfaces that are "TypeNamespace.IChildTestInterface" should be Interfaces that implement any "TypeNamespace.IOtherTestInterface" or "TypeNamespace.IOtherChildTestInterface" Result: False -Description: InterfaceAssembly.IChildInterface is not "InterfaceAssembly.IOtherChildInterface" or "InterfaceAssembly.IInterfaceWithMultipleDependencies" +Description: TypeNamespace.IChildTestInterface is not Interfaces that implement any "TypeNamespace.IOtherTestInterface" or "TypeNamespace.IOtherChildTestInterface" Message: -"Interfaces that are "InterfaceAssembly.IChildInterface" should be types that implement any "InterfaceAssembly.IOtherBaseInterface" or "InterfaceAssembly.IOtherChildInterface"" failed: - InterfaceAssembly.IChildInterface is not "InterfaceAssembly.IOtherChildInterface" or "InterfaceAssembly.IInterfaceWithMultipleDependencies" +"Interfaces that are "TypeNamespace.IChildTestInterface" should be Interfaces that implement any "TypeNamespace.IOtherTestInterface" or "TypeNamespace.IOtherChildTestInterface"" failed: + TypeNamespace.IChildTestInterface is not Interfaces that implement any "TypeNamespace.IOtherTestInterface" or "TypeNamespace.IOtherChildTestInterface" -Query: Interfaces that are "InterfaceAssembly.IChildInterface" should be types that implement any "InterfaceAssembly.IOtherBaseInterface" or "InterfaceAssembly.IOtherChildInterface" +Query: Interfaces that are "TypeNamespace.IChildTestInterface" should be Interfaces that implement any "TypeNamespace.IOtherTestInterface" or "TypeNamespace.IOtherChildTestInterface" Result: False -Description: InterfaceAssembly.IChildInterface is not "InterfaceAssembly.IOtherChildInterface" or "InterfaceAssembly.IInterfaceWithMultipleDependencies" +Description: TypeNamespace.IChildTestInterface is not Interfaces that implement any "TypeNamespace.IOtherTestInterface" or "TypeNamespace.IOtherChildTestInterface" Message: -"Interfaces that are "InterfaceAssembly.IChildInterface" should be types that implement any "InterfaceAssembly.IOtherBaseInterface" or "InterfaceAssembly.IOtherChildInterface"" failed: - InterfaceAssembly.IChildInterface is not "InterfaceAssembly.IOtherChildInterface" or "InterfaceAssembly.IInterfaceWithMultipleDependencies" +"Interfaces that are "TypeNamespace.IChildTestInterface" should be Interfaces that implement any "TypeNamespace.IOtherTestInterface" or "TypeNamespace.IOtherChildTestInterface"" failed: + TypeNamespace.IChildTestInterface is not Interfaces that implement any "TypeNamespace.IOtherTestInterface" or "TypeNamespace.IOtherChildTestInterface" -Query: Interfaces that are "InterfaceAssembly.IChildInterface" should be types that implement any "InterfaceAssembly.IOtherBaseInterface" or "InterfaceAssembly.IOtherChildInterface" +Query: Interfaces that are "TypeNamespace.IChildTestInterface" should be Interfaces that implement any "TypeNamespace.IOtherTestInterface" or "TypeNamespace.IOtherChildTestInterface" Result: False -Description: InterfaceAssembly.IChildInterface is not "InterfaceAssembly.IOtherChildInterface" or "InterfaceAssembly.IInterfaceWithMultipleDependencies" +Description: TypeNamespace.IChildTestInterface is not Interfaces that implement any "TypeNamespace.IOtherTestInterface" or "TypeNamespace.IOtherChildTestInterface" Message: -"Interfaces that are "InterfaceAssembly.IChildInterface" should be types that implement any "InterfaceAssembly.IOtherBaseInterface" or "InterfaceAssembly.IOtherChildInterface"" failed: - InterfaceAssembly.IChildInterface is not "InterfaceAssembly.IOtherChildInterface" or "InterfaceAssembly.IInterfaceWithMultipleDependencies" +"Interfaces that are "TypeNamespace.IChildTestInterface" should be Interfaces that implement any "TypeNamespace.IOtherTestInterface" or "TypeNamespace.IOtherChildTestInterface"" failed: + TypeNamespace.IChildTestInterface is not Interfaces that implement any "TypeNamespace.IOtherTestInterface" or "TypeNamespace.IOtherChildTestInterface" -Query: Interfaces that are "InterfaceAssembly.IChildInterface" should be types that implement any Interfaces that are "InterfaceAssembly.IOtherBaseInterface" or "InterfaceAssembly.IOtherChildInterface" +Query: Interfaces that are "TypeNamespace.IChildTestInterface" should be Interfaces that implement any Interfaces that are "TypeNamespace.IOtherTestInterface" or "TypeNamespace.IOtherChildTestInterface" Result: False -Description: InterfaceAssembly.IChildInterface is not "InterfaceAssembly.IOtherChildInterface" or "InterfaceAssembly.IInterfaceWithMultipleDependencies" +Description: TypeNamespace.IChildTestInterface is not Interfaces that implement any Interfaces that are "TypeNamespace.IOtherTestInterface" or "TypeNamespace.IOtherChildTestInterface" Message: -"Interfaces that are "InterfaceAssembly.IChildInterface" should be types that implement any Interfaces that are "InterfaceAssembly.IOtherBaseInterface" or "InterfaceAssembly.IOtherChildInterface"" failed: - InterfaceAssembly.IChildInterface is not "InterfaceAssembly.IOtherChildInterface" or "InterfaceAssembly.IInterfaceWithMultipleDependencies" +"Interfaces that are "TypeNamespace.IChildTestInterface" should be Interfaces that implement any Interfaces that are "TypeNamespace.IOtherTestInterface" or "TypeNamespace.IOtherChildTestInterface"" failed: + TypeNamespace.IChildTestInterface is not Interfaces that implement any Interfaces that are "TypeNamespace.IOtherTestInterface" or "TypeNamespace.IOtherChildTestInterface" ----- Complex conditions ----- -Query: Interfaces that are "InterfaceAssembly.IChildInterface" should implement any interfaces that are "InterfaceAssembly.IOtherBaseInterface" or "InterfaceAssembly.IOtherChildInterface" +Query: Interfaces that are "TypeNamespace.IChildTestInterface" should implement any interfaces that are "TypeNamespace.IOtherTestInterface" or "TypeNamespace.IOtherChildTestInterface" Result: False -Description: InterfaceAssembly.IChildInterface only implements InterfaceAssembly.IBaseInterface +Description: TypeNamespace.IChildTestInterface only implements TypeNamespace.ITestInterface Message: -"Interfaces that are "InterfaceAssembly.IChildInterface" should implement any interfaces that are "InterfaceAssembly.IOtherBaseInterface" or "InterfaceAssembly.IOtherChildInterface"" failed: - InterfaceAssembly.IChildInterface only implements InterfaceAssembly.IBaseInterface +"Interfaces that are "TypeNamespace.IChildTestInterface" should implement any interfaces that are "TypeNamespace.IOtherTestInterface" or "TypeNamespace.IOtherChildTestInterface"" failed: + TypeNamespace.IChildTestInterface only implements TypeNamespace.ITestInterface -Query: Interfaces that are "InterfaceAssembly.IChildInterface" should implement any interfaces that are "InterfaceAssembly.IOtherBaseInterface" or "InterfaceAssembly.IOtherChildInterface" +Query: Interfaces that are "TypeNamespace.IChildTestInterface" should implement any interfaces that are "TypeNamespace.IOtherTestInterface" or "TypeNamespace.IOtherChildTestInterface" Result: False -Description: InterfaceAssembly.IChildInterface only implements InterfaceAssembly.IBaseInterface +Description: TypeNamespace.IChildTestInterface only implements TypeNamespace.ITestInterface Message: -"Interfaces that are "InterfaceAssembly.IChildInterface" should implement any interfaces that are "InterfaceAssembly.IOtherBaseInterface" or "InterfaceAssembly.IOtherChildInterface"" failed: - InterfaceAssembly.IChildInterface only implements InterfaceAssembly.IBaseInterface +"Interfaces that are "TypeNamespace.IChildTestInterface" should implement any interfaces that are "TypeNamespace.IOtherTestInterface" or "TypeNamespace.IOtherChildTestInterface"" failed: + TypeNamespace.IChildTestInterface only implements TypeNamespace.ITestInterface -Query: Interfaces that are "InterfaceAssembly.IChildInterface" should implement any interfaces that are "InterfaceAssembly.IOtherBaseInterface" or "InterfaceAssembly.IOtherChildInterface" +Query: Interfaces that are "TypeNamespace.IChildTestInterface" should implement any interfaces that are "TypeNamespace.IOtherTestInterface" or "TypeNamespace.IOtherChildTestInterface" Result: False -Description: InterfaceAssembly.IChildInterface only implements InterfaceAssembly.IBaseInterface +Description: TypeNamespace.IChildTestInterface only implements TypeNamespace.ITestInterface Message: -"Interfaces that are "InterfaceAssembly.IChildInterface" should implement any interfaces that are "InterfaceAssembly.IOtherBaseInterface" or "InterfaceAssembly.IOtherChildInterface"" failed: - InterfaceAssembly.IChildInterface only implements InterfaceAssembly.IBaseInterface +"Interfaces that are "TypeNamespace.IChildTestInterface" should implement any interfaces that are "TypeNamespace.IOtherTestInterface" or "TypeNamespace.IOtherChildTestInterface"" failed: + TypeNamespace.IChildTestInterface only implements TypeNamespace.ITestInterface -Query: Interfaces that are "InterfaceAssembly.IChildInterface" should implement any interfaces that are "InterfaceAssembly.IOtherBaseInterface" or "InterfaceAssembly.IOtherChildInterface" +Query: Interfaces that are "TypeNamespace.IChildTestInterface" should implement any interfaces that are "TypeNamespace.IOtherTestInterface" or "TypeNamespace.IOtherChildTestInterface" Result: False -Description: InterfaceAssembly.IChildInterface only implements InterfaceAssembly.IBaseInterface +Description: TypeNamespace.IChildTestInterface only implements TypeNamespace.ITestInterface Message: -"Interfaces that are "InterfaceAssembly.IChildInterface" should implement any interfaces that are "InterfaceAssembly.IOtherBaseInterface" or "InterfaceAssembly.IOtherChildInterface"" failed: - InterfaceAssembly.IChildInterface only implements InterfaceAssembly.IBaseInterface +"Interfaces that are "TypeNamespace.IChildTestInterface" should implement any interfaces that are "TypeNamespace.IOtherTestInterface" or "TypeNamespace.IOtherChildTestInterface"" failed: + TypeNamespace.IChildTestInterface only implements TypeNamespace.ITestInterface -Query: Interfaces that are "InterfaceAssembly.IChildInterface" should implement any interfaces that are Interfaces that are "InterfaceAssembly.IOtherBaseInterface" or "InterfaceAssembly.IOtherChildInterface" +Query: Interfaces that are "TypeNamespace.IChildTestInterface" should implement any interfaces that are Interfaces that are "TypeNamespace.IOtherTestInterface" or "TypeNamespace.IOtherChildTestInterface" Result: False -Description: InterfaceAssembly.IChildInterface only implements InterfaceAssembly.IBaseInterface +Description: TypeNamespace.IChildTestInterface only implements TypeNamespace.ITestInterface Message: -"Interfaces that are "InterfaceAssembly.IChildInterface" should implement any interfaces that are Interfaces that are "InterfaceAssembly.IOtherBaseInterface" or "InterfaceAssembly.IOtherChildInterface"" failed: - InterfaceAssembly.IChildInterface only implements InterfaceAssembly.IBaseInterface +"Interfaces that are "TypeNamespace.IChildTestInterface" should implement any interfaces that are Interfaces that are "TypeNamespace.IOtherTestInterface" or "TypeNamespace.IOtherChildTestInterface"" failed: + TypeNamespace.IChildTestInterface only implements TypeNamespace.ITestInterface ----- Complex conditions ----- -Query: Interfaces that are "InterfaceAssembly.IChildInterface" should implement any interfaces that are "InterfaceAssembly.IOtherBaseInterface" or "InterfaceAssembly.IOtherChildInterface" +Query: Interfaces that are "TypeNamespace.IChildTestInterface" should implement any interfaces that are "TypeNamespace.IOtherTestInterface" or "TypeNamespace.IOtherChildTestInterface" Result: False -Description: InterfaceAssembly.IChildInterface only implements InterfaceAssembly.IBaseInterface +Description: TypeNamespace.IChildTestInterface only implements TypeNamespace.ITestInterface Message: -"Interfaces that are "InterfaceAssembly.IChildInterface" should implement any interfaces that are "InterfaceAssembly.IOtherBaseInterface" or "InterfaceAssembly.IOtherChildInterface"" failed: - InterfaceAssembly.IChildInterface only implements InterfaceAssembly.IBaseInterface +"Interfaces that are "TypeNamespace.IChildTestInterface" should implement any interfaces that are "TypeNamespace.IOtherTestInterface" or "TypeNamespace.IOtherChildTestInterface"" failed: + TypeNamespace.IChildTestInterface only implements TypeNamespace.ITestInterface diff --git a/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/TypeSyntaxElementsTests.ImplementInterfaceTest.verified.txt b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/TypeSyntaxElementsTests.ImplementInterfaceTest.verified.txt new file mode 100644 index 000000000..b52b3f25a --- /dev/null +++ b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/TypeSyntaxElementsTests.ImplementInterfaceTest.verified.txt @@ -0,0 +1,109 @@ +===== No Violations ===== + +----- Conditions ----- + +Query: Types that are "TypeNamespace.ClassImplementingInterface" should implement interface "TypeNamespace.ITestInterface" +Result: True +Description: TypeNamespace.ClassImplementingInterface passed +Message: +All Evaluations passed + +Query: Types that are "TypeNamespace.ClassImplementingInterface" should implement interface "TypeNamespace.ITestInterface" +Result: True +Description: TypeNamespace.ClassImplementingInterface passed +Message: +All Evaluations passed + +----- Predicates ----- + +Query: Types that are "TypeNamespace.ClassImplementingInterface" should be Types that implement interface "TypeNamespace.ITestInterface" +Result: True +Description: TypeNamespace.ClassImplementingInterface passed +Message: +All Evaluations passed + +Query: Types that are "TypeNamespace.ClassImplementingInterface" should be Types that implement interface "TypeNamespace.ITestInterface" +Result: True +Description: TypeNamespace.ClassImplementingInterface passed +Message: +All Evaluations passed + +===== Violations ===== + +----- Conditions ----- + +Query: Types that are "TypeNamespace.ClassNotImplementingInterface" should implement interface "TypeNamespace.ITestInterface" +Result: False +Description: TypeNamespace.ClassNotImplementingInterface does not implement interface "TypeNamespace.ITestInterface" +Message: +"Types that are "TypeNamespace.ClassNotImplementingInterface" should implement interface "TypeNamespace.ITestInterface"" failed: + TypeNamespace.ClassNotImplementingInterface does not implement interface "TypeNamespace.ITestInterface" + + + +Query: Types that are "TypeNamespace.ClassNotImplementingInterface" should implement interface "TypeNamespace.ITestInterface" +Result: False +Description: TypeNamespace.ClassNotImplementingInterface does not implement interface "TypeNamespace.ITestInterface" +Message: +"Types that are "TypeNamespace.ClassNotImplementingInterface" should implement interface "TypeNamespace.ITestInterface"" failed: + TypeNamespace.ClassNotImplementingInterface does not implement interface "TypeNamespace.ITestInterface" + + + +----- Predicates ----- + +Query: Types that are "TypeNamespace.ClassNotImplementingInterface" should be Types that implement interface "TypeNamespace.ITestInterface" +Result: False +Description: TypeNamespace.ClassNotImplementingInterface is not Types that implement interface "TypeNamespace.ITestInterface" +Message: +"Types that are "TypeNamespace.ClassNotImplementingInterface" should be Types that implement interface "TypeNamespace.ITestInterface"" failed: + TypeNamespace.ClassNotImplementingInterface is not Types that implement interface "TypeNamespace.ITestInterface" + + + +Query: Types that are "TypeNamespace.ClassNotImplementingInterface" should be Types that implement interface "TypeNamespace.ITestInterface" +Result: False +Description: TypeNamespace.ClassNotImplementingInterface is not Types that implement interface "TypeNamespace.ITestInterface" +Message: +"Types that are "TypeNamespace.ClassNotImplementingInterface" should be Types that implement interface "TypeNamespace.ITestInterface"" failed: + TypeNamespace.ClassNotImplementingInterface is not Types that implement interface "TypeNamespace.ITestInterface" + + + +===== Multiple inputs ===== + +Query: Types that are "TypeNamespace.ClassImplementingInterface" or "TypeNamespace.ClassNotImplementingInterface" should implement interface "TypeNamespace.ITestInterface" +Result: True +Description: TypeNamespace.ClassImplementingInterface passed +Result: False +Description: TypeNamespace.ClassNotImplementingInterface does not implement interface "TypeNamespace.ITestInterface" +Message: +"Types that are "TypeNamespace.ClassImplementingInterface" or "TypeNamespace.ClassNotImplementingInterface" should implement interface "TypeNamespace.ITestInterface"" failed: + TypeNamespace.ClassNotImplementingInterface does not implement interface "TypeNamespace.ITestInterface" + + + +===== Type not in architecture ===== + +----- Conditions ----- + +Query: Types that are "TypeNamespace.ClassImplementingInterface" should implement interface "System.IDisposable" +Result: False +Description: TypeNamespace.ClassImplementingInterface does not implement interface "System.IDisposable" +Message: +"Types that are "TypeNamespace.ClassImplementingInterface" should implement interface "System.IDisposable"" failed: + TypeNamespace.ClassImplementingInterface does not implement interface "System.IDisposable" + + + +----- Predicates ----- + +Query: Types that are "TypeNamespace.ClassImplementingInterface" should be Types that implement interface "System.IDisposable" +Result: False +Description: TypeNamespace.ClassImplementingInterface is not Types that implement interface "System.IDisposable" +Message: +"Types that are "TypeNamespace.ClassImplementingInterface" should be Types that implement interface "System.IDisposable"" failed: + TypeNamespace.ClassImplementingInterface is not Types that implement interface "System.IDisposable" + + + diff --git a/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/TypeSyntaxElementsTests.NotBeAssignableToTest.verified.txt b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/TypeSyntaxElementsTests.NotBeAssignableToTest.verified.txt new file mode 100644 index 000000000..69274c7bd --- /dev/null +++ b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/TypeSyntaxElementsTests.NotBeAssignableToTest.verified.txt @@ -0,0 +1,351 @@ +===== No Violations ===== + +----- Conditions ----- + +Query: Types that are "TypeNamespace.UnrelatedClassForAssign" should not be assignable to "TypeNamespace.BaseClassForAssign" +Result: True +Description: TypeNamespace.UnrelatedClassForAssign passed +Message: +All Evaluations passed + +Query: Types that are "TypeNamespace.UnrelatedClassForAssign" should not be assignable to "TypeNamespace.BaseClassForAssign" +Result: True +Description: TypeNamespace.UnrelatedClassForAssign passed +Message: +All Evaluations passed + +Query: Types that are "TypeNamespace.UnrelatedClassForAssign" should not be assignable to Types that are "TypeNamespace.BaseClassForAssign" +Result: True +Description: TypeNamespace.UnrelatedClassForAssign passed +Message: +All Evaluations passed + +Query: Types that are "TypeNamespace.UnrelatedClassForAssign" should not be assignable to "TypeNamespace.BaseClassForAssign" +Result: True +Description: TypeNamespace.UnrelatedClassForAssign passed +Message: +All Evaluations passed + +Query: Types that are "TypeNamespace.UnrelatedClassForAssign" should not be assignable to "TypeNamespace.BaseClassForAssign" +Result: True +Description: TypeNamespace.UnrelatedClassForAssign passed +Message: +All Evaluations passed + +----- Predicates ----- + +Query: Types that are "TypeNamespace.UnrelatedClassForAssign" should be Types that are not assignable to "TypeNamespace.BaseClassForAssign" +Result: True +Description: TypeNamespace.UnrelatedClassForAssign passed +Message: +All Evaluations passed + +Query: Types that are "TypeNamespace.UnrelatedClassForAssign" should be Types that are not assignable to "TypeNamespace.BaseClassForAssign" +Result: True +Description: TypeNamespace.UnrelatedClassForAssign passed +Message: +All Evaluations passed + +Query: Types that are "TypeNamespace.UnrelatedClassForAssign" should be Types that are not assignable to Types that are "TypeNamespace.BaseClassForAssign" +Result: True +Description: TypeNamespace.UnrelatedClassForAssign passed +Message: +All Evaluations passed + +Query: Types that are "TypeNamespace.UnrelatedClassForAssign" should be Types that are not assignable to "TypeNamespace.BaseClassForAssign" +Result: True +Description: TypeNamespace.UnrelatedClassForAssign passed +Message: +All Evaluations passed + +Query: Types that are "TypeNamespace.UnrelatedClassForAssign" should be Types that are not assignable to "TypeNamespace.BaseClassForAssign" +Result: True +Description: TypeNamespace.UnrelatedClassForAssign passed +Message: +All Evaluations passed + +----- Complex conditions ----- + +Query: Types that are "TypeNamespace.UnrelatedClassForAssign" should not be assignable to types that are "TypeNamespace.BaseClassForAssign" +Result: True +Description: TypeNamespace.UnrelatedClassForAssign passed +Message: +All Evaluations passed + +===== Violations ===== + +----- Conditions ----- + +Query: Types that are "TypeNamespace.DerivedClassForAssign" should not be assignable to "TypeNamespace.BaseClassForAssign" +Result: False +Description: TypeNamespace.DerivedClassForAssign is assignable to "TypeNamespace.BaseClassForAssign" +Message: +"Types that are "TypeNamespace.DerivedClassForAssign" should not be assignable to "TypeNamespace.BaseClassForAssign"" failed: + TypeNamespace.DerivedClassForAssign is assignable to "TypeNamespace.BaseClassForAssign" + + + +Query: Types that are "TypeNamespace.DerivedClassForAssign" should not be assignable to "TypeNamespace.BaseClassForAssign" +Result: False +Description: TypeNamespace.DerivedClassForAssign is assignable to "TypeNamespace.BaseClassForAssign" +Message: +"Types that are "TypeNamespace.DerivedClassForAssign" should not be assignable to "TypeNamespace.BaseClassForAssign"" failed: + TypeNamespace.DerivedClassForAssign is assignable to "TypeNamespace.BaseClassForAssign" + + + +Query: Types that are "TypeNamespace.DerivedClassForAssign" should not be assignable to Types that are "TypeNamespace.BaseClassForAssign" +Result: False +Description: TypeNamespace.DerivedClassForAssign is assignable to Types that are "TypeNamespace.BaseClassForAssign" +Message: +"Types that are "TypeNamespace.DerivedClassForAssign" should not be assignable to Types that are "TypeNamespace.BaseClassForAssign"" failed: + TypeNamespace.DerivedClassForAssign is assignable to Types that are "TypeNamespace.BaseClassForAssign" + + + +Query: Types that are "TypeNamespace.DerivedClassForAssign" should not be assignable to "TypeNamespace.BaseClassForAssign" +Result: False +Description: TypeNamespace.DerivedClassForAssign is assignable to "TypeNamespace.BaseClassForAssign" +Message: +"Types that are "TypeNamespace.DerivedClassForAssign" should not be assignable to "TypeNamespace.BaseClassForAssign"" failed: + TypeNamespace.DerivedClassForAssign is assignable to "TypeNamespace.BaseClassForAssign" + + + +Query: Types that are "TypeNamespace.DerivedClassForAssign" should not be assignable to "TypeNamespace.BaseClassForAssign" +Result: False +Description: TypeNamespace.DerivedClassForAssign is assignable to "TypeNamespace.BaseClassForAssign" +Message: +"Types that are "TypeNamespace.DerivedClassForAssign" should not be assignable to "TypeNamespace.BaseClassForAssign"" failed: + TypeNamespace.DerivedClassForAssign is assignable to "TypeNamespace.BaseClassForAssign" + + + +----- Predicates ----- + +Query: Types that are "TypeNamespace.DerivedClassForAssign" should be Types that are not assignable to "TypeNamespace.BaseClassForAssign" +Result: False +Description: TypeNamespace.DerivedClassForAssign is not Types that are not assignable to "TypeNamespace.BaseClassForAssign" +Message: +"Types that are "TypeNamespace.DerivedClassForAssign" should be Types that are not assignable to "TypeNamespace.BaseClassForAssign"" failed: + TypeNamespace.DerivedClassForAssign is not Types that are not assignable to "TypeNamespace.BaseClassForAssign" + + + +Query: Types that are "TypeNamespace.DerivedClassForAssign" should be Types that are not assignable to "TypeNamespace.BaseClassForAssign" +Result: False +Description: TypeNamespace.DerivedClassForAssign is not Types that are not assignable to "TypeNamespace.BaseClassForAssign" +Message: +"Types that are "TypeNamespace.DerivedClassForAssign" should be Types that are not assignable to "TypeNamespace.BaseClassForAssign"" failed: + TypeNamespace.DerivedClassForAssign is not Types that are not assignable to "TypeNamespace.BaseClassForAssign" + + + +Query: Types that are "TypeNamespace.DerivedClassForAssign" should be Types that are not assignable to Types that are "TypeNamespace.BaseClassForAssign" +Result: False +Description: TypeNamespace.DerivedClassForAssign is not Types that are not assignable to Types that are "TypeNamespace.BaseClassForAssign" +Message: +"Types that are "TypeNamespace.DerivedClassForAssign" should be Types that are not assignable to Types that are "TypeNamespace.BaseClassForAssign"" failed: + TypeNamespace.DerivedClassForAssign is not Types that are not assignable to Types that are "TypeNamespace.BaseClassForAssign" + + + +Query: Types that are "TypeNamespace.DerivedClassForAssign" should be Types that are not assignable to "TypeNamespace.BaseClassForAssign" +Result: False +Description: TypeNamespace.DerivedClassForAssign is not Types that are not assignable to "TypeNamespace.BaseClassForAssign" +Message: +"Types that are "TypeNamespace.DerivedClassForAssign" should be Types that are not assignable to "TypeNamespace.BaseClassForAssign"" failed: + TypeNamespace.DerivedClassForAssign is not Types that are not assignable to "TypeNamespace.BaseClassForAssign" + + + +Query: Types that are "TypeNamespace.DerivedClassForAssign" should be Types that are not assignable to "TypeNamespace.BaseClassForAssign" +Result: False +Description: TypeNamespace.DerivedClassForAssign is not Types that are not assignable to "TypeNamespace.BaseClassForAssign" +Message: +"Types that are "TypeNamespace.DerivedClassForAssign" should be Types that are not assignable to "TypeNamespace.BaseClassForAssign"" failed: + TypeNamespace.DerivedClassForAssign is not Types that are not assignable to "TypeNamespace.BaseClassForAssign" + + + +----- Complex conditions ----- + +Query: Types that are "TypeNamespace.DerivedClassForAssign" should not be assignable to types that are "TypeNamespace.BaseClassForAssign" +Result: False +Description: TypeNamespace.DerivedClassForAssign is assignable to "TypeNamespace.BaseClassForAssign" +Message: +"Types that are "TypeNamespace.DerivedClassForAssign" should not be assignable to types that are "TypeNamespace.BaseClassForAssign"" failed: + TypeNamespace.DerivedClassForAssign is assignable to "TypeNamespace.BaseClassForAssign" + + + +===== Multiple arguments ===== + +----- Conditions ----- + +Query: Types that are "TypeNamespace.DerivedClassForAssign" should not be assignable to "TypeNamespace.BaseClassForAssign" or "TypeNamespace.OtherBaseClassForAssign" +Result: False +Description: TypeNamespace.DerivedClassForAssign is assignable to "TypeNamespace.BaseClassForAssign" or "TypeNamespace.OtherBaseClassForAssign" +Message: +"Types that are "TypeNamespace.DerivedClassForAssign" should not be assignable to "TypeNamespace.BaseClassForAssign" or "TypeNamespace.OtherBaseClassForAssign"" failed: + TypeNamespace.DerivedClassForAssign is assignable to "TypeNamespace.BaseClassForAssign" or "TypeNamespace.OtherBaseClassForAssign" + + + +Query: Types that are "TypeNamespace.DerivedClassForAssign" should not be assignable to "TypeNamespace.BaseClassForAssign" or "TypeNamespace.OtherBaseClassForAssign" +Result: False +Description: TypeNamespace.DerivedClassForAssign is assignable to "TypeNamespace.BaseClassForAssign" or "TypeNamespace.OtherBaseClassForAssign" +Message: +"Types that are "TypeNamespace.DerivedClassForAssign" should not be assignable to "TypeNamespace.BaseClassForAssign" or "TypeNamespace.OtherBaseClassForAssign"" failed: + TypeNamespace.DerivedClassForAssign is assignable to "TypeNamespace.BaseClassForAssign" or "TypeNamespace.OtherBaseClassForAssign" + + + +Query: Types that are "TypeNamespace.DerivedClassForAssign" should not be assignable to Types that are "TypeNamespace.BaseClassForAssign" or "TypeNamespace.OtherBaseClassForAssign" +Result: False +Description: TypeNamespace.DerivedClassForAssign is assignable to Types that are "TypeNamespace.BaseClassForAssign" or "TypeNamespace.OtherBaseClassForAssign" +Message: +"Types that are "TypeNamespace.DerivedClassForAssign" should not be assignable to Types that are "TypeNamespace.BaseClassForAssign" or "TypeNamespace.OtherBaseClassForAssign"" failed: + TypeNamespace.DerivedClassForAssign is assignable to Types that are "TypeNamespace.BaseClassForAssign" or "TypeNamespace.OtherBaseClassForAssign" + + + +Query: Types that are "TypeNamespace.DerivedClassForAssign" should not be assignable to "TypeNamespace.BaseClassForAssign" or "TypeNamespace.OtherBaseClassForAssign" +Result: False +Description: TypeNamespace.DerivedClassForAssign is assignable to "TypeNamespace.BaseClassForAssign" or "TypeNamespace.OtherBaseClassForAssign" +Message: +"Types that are "TypeNamespace.DerivedClassForAssign" should not be assignable to "TypeNamespace.BaseClassForAssign" or "TypeNamespace.OtherBaseClassForAssign"" failed: + TypeNamespace.DerivedClassForAssign is assignable to "TypeNamespace.BaseClassForAssign" or "TypeNamespace.OtherBaseClassForAssign" + + + +Query: Types that are "TypeNamespace.DerivedClassForAssign" should not be assignable to "TypeNamespace.BaseClassForAssign" or "TypeNamespace.OtherBaseClassForAssign" +Result: False +Description: TypeNamespace.DerivedClassForAssign is assignable to "TypeNamespace.BaseClassForAssign" or "TypeNamespace.OtherBaseClassForAssign" +Message: +"Types that are "TypeNamespace.DerivedClassForAssign" should not be assignable to "TypeNamespace.BaseClassForAssign" or "TypeNamespace.OtherBaseClassForAssign"" failed: + TypeNamespace.DerivedClassForAssign is assignable to "TypeNamespace.BaseClassForAssign" or "TypeNamespace.OtherBaseClassForAssign" + + + +----- Predicates ----- + +Query: Types that are "TypeNamespace.DerivedClassForAssign" should be Types that are not assignable to "TypeNamespace.BaseClassForAssign" or "TypeNamespace.OtherBaseClassForAssign" +Result: False +Description: TypeNamespace.DerivedClassForAssign is not Types that are not assignable to "TypeNamespace.BaseClassForAssign" or "TypeNamespace.OtherBaseClassForAssign" +Message: +"Types that are "TypeNamespace.DerivedClassForAssign" should be Types that are not assignable to "TypeNamespace.BaseClassForAssign" or "TypeNamespace.OtherBaseClassForAssign"" failed: + TypeNamespace.DerivedClassForAssign is not Types that are not assignable to "TypeNamespace.BaseClassForAssign" or "TypeNamespace.OtherBaseClassForAssign" + + + +Query: Types that are "TypeNamespace.DerivedClassForAssign" should be Types that are not assignable to "TypeNamespace.BaseClassForAssign" or "TypeNamespace.OtherBaseClassForAssign" +Result: False +Description: TypeNamespace.DerivedClassForAssign is not Types that are not assignable to "TypeNamespace.BaseClassForAssign" or "TypeNamespace.OtherBaseClassForAssign" +Message: +"Types that are "TypeNamespace.DerivedClassForAssign" should be Types that are not assignable to "TypeNamespace.BaseClassForAssign" or "TypeNamespace.OtherBaseClassForAssign"" failed: + TypeNamespace.DerivedClassForAssign is not Types that are not assignable to "TypeNamespace.BaseClassForAssign" or "TypeNamespace.OtherBaseClassForAssign" + + + +Query: Types that are "TypeNamespace.DerivedClassForAssign" should be Types that are not assignable to Types that are "TypeNamespace.BaseClassForAssign" or "TypeNamespace.OtherBaseClassForAssign" +Result: False +Description: TypeNamespace.DerivedClassForAssign is not Types that are not assignable to Types that are "TypeNamespace.BaseClassForAssign" or "TypeNamespace.OtherBaseClassForAssign" +Message: +"Types that are "TypeNamespace.DerivedClassForAssign" should be Types that are not assignable to Types that are "TypeNamespace.BaseClassForAssign" or "TypeNamespace.OtherBaseClassForAssign"" failed: + TypeNamespace.DerivedClassForAssign is not Types that are not assignable to Types that are "TypeNamespace.BaseClassForAssign" or "TypeNamespace.OtherBaseClassForAssign" + + + +Query: Types that are "TypeNamespace.DerivedClassForAssign" should be Types that are not assignable to "TypeNamespace.BaseClassForAssign" or "TypeNamespace.OtherBaseClassForAssign" +Result: False +Description: TypeNamespace.DerivedClassForAssign is not Types that are not assignable to "TypeNamespace.BaseClassForAssign" or "TypeNamespace.OtherBaseClassForAssign" +Message: +"Types that are "TypeNamespace.DerivedClassForAssign" should be Types that are not assignable to "TypeNamespace.BaseClassForAssign" or "TypeNamespace.OtherBaseClassForAssign"" failed: + TypeNamespace.DerivedClassForAssign is not Types that are not assignable to "TypeNamespace.BaseClassForAssign" or "TypeNamespace.OtherBaseClassForAssign" + + + +Query: Types that are "TypeNamespace.DerivedClassForAssign" should be Types that are not assignable to "TypeNamespace.BaseClassForAssign" or "TypeNamespace.OtherBaseClassForAssign" +Result: False +Description: TypeNamespace.DerivedClassForAssign is not Types that are not assignable to "TypeNamespace.BaseClassForAssign" or "TypeNamespace.OtherBaseClassForAssign" +Message: +"Types that are "TypeNamespace.DerivedClassForAssign" should be Types that are not assignable to "TypeNamespace.BaseClassForAssign" or "TypeNamespace.OtherBaseClassForAssign"" failed: + TypeNamespace.DerivedClassForAssign is not Types that are not assignable to "TypeNamespace.BaseClassForAssign" or "TypeNamespace.OtherBaseClassForAssign" + + + +----- Complex conditions ----- + +Query: Types that are "TypeNamespace.DerivedClassForAssign" should not be assignable to types that are "TypeNamespace.BaseClassForAssign" or "TypeNamespace.OtherBaseClassForAssign" +Result: False +Description: TypeNamespace.DerivedClassForAssign is assignable to "TypeNamespace.BaseClassForAssign" or "TypeNamespace.OtherBaseClassForAssign" +Message: +"Types that are "TypeNamespace.DerivedClassForAssign" should not be assignable to types that are "TypeNamespace.BaseClassForAssign" or "TypeNamespace.OtherBaseClassForAssign"" failed: + TypeNamespace.DerivedClassForAssign is assignable to "TypeNamespace.BaseClassForAssign" or "TypeNamespace.OtherBaseClassForAssign" + + + +===== Multiple inputs ===== + +Query: Types that are "TypeNamespace.UnrelatedClassForAssign" or "TypeNamespace.OtherUnrelatedClassForAssign" should not be assignable to "TypeNamespace.BaseClassForAssign" +Result: True +Description: TypeNamespace.UnrelatedClassForAssign passed +Result: True +Description: TypeNamespace.OtherUnrelatedClassForAssign passed +Message: +All Evaluations passed + +Query: Types that are "TypeNamespace.DerivedClassForAssign" or "TypeNamespace.UnrelatedClassForAssign" should not be assignable to "TypeNamespace.BaseClassForAssign" +Result: False +Description: TypeNamespace.DerivedClassForAssign is assignable to "TypeNamespace.BaseClassForAssign" +Result: True +Description: TypeNamespace.UnrelatedClassForAssign passed +Message: +"Types that are "TypeNamespace.DerivedClassForAssign" or "TypeNamespace.UnrelatedClassForAssign" should not be assignable to "TypeNamespace.BaseClassForAssign"" failed: + TypeNamespace.DerivedClassForAssign is assignable to "TypeNamespace.BaseClassForAssign" + + + +===== Type not in architecture ===== + +----- Conditions ----- + +Query: Types that are "TypeNamespace.BaseClassForAssign" should not be assignable to "AttributeNamespace.ClassWithoutAttributes" +Exception: Type AttributeNamespace.ClassWithoutAttributes does not exist in provided architecture or is no class. + +----- Predicates ----- + +Query: Types that are "TypeNamespace.BaseClassForAssign" should be Types that are not assignable to "AttributeNamespace.ClassWithoutAttributes" +Exception: Type AttributeNamespace.ClassWithoutAttributes does not exist in provided architecture or is no class. + +===== Empty Arguments ===== + +----- Conditions ----- + +Query: Types that are "TypeNamespace.BaseClassForAssign" should not be assignable to no types (always true) +Result: True +Description: TypeNamespace.BaseClassForAssign passed +Message: +All Evaluations passed + +Query: Types that are "TypeNamespace.BaseClassForAssign" should not be assignable to no types (always true) +Result: True +Description: TypeNamespace.BaseClassForAssign passed +Message: +All Evaluations passed + +----- Predicates ----- + +Query: Types that are "TypeNamespace.BaseClassForAssign" should be Types that are not assignable to no types (always true) +Result: True +Description: TypeNamespace.BaseClassForAssign passed +Message: +All Evaluations passed + +Query: Types that are "TypeNamespace.BaseClassForAssign" should be Types that are not assignable to no types (always true) +Result: True +Description: TypeNamespace.BaseClassForAssign passed +Message: +All Evaluations passed + diff --git a/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/TypeSyntaxElementsTests.NotBeEnumsTest.verified.txt b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/TypeSyntaxElementsTests.NotBeEnumsTest.verified.txt new file mode 100644 index 000000000..8cad2d858 --- /dev/null +++ b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/TypeSyntaxElementsTests.NotBeEnumsTest.verified.txt @@ -0,0 +1,75 @@ +===== No Violations ===== + +----- Conditions ----- + +Query: Types that are "TypeNamespace.RegularClass" should not be enums +Result: True +Description: TypeNamespace.RegularClass passed +Message: +All Evaluations passed + +Query: Types that are "TypeNamespace.SimpleStruct" should not be enums +Result: True +Description: TypeNamespace.SimpleStruct passed +Message: +All Evaluations passed + +----- Predicates ----- + +Query: Types that are "TypeNamespace.RegularClass" should be Types that are not enums +Result: True +Description: TypeNamespace.RegularClass passed +Message: +All Evaluations passed + +Query: Types that are "TypeNamespace.SimpleStruct" should be Types that are not enums +Result: True +Description: TypeNamespace.SimpleStruct passed +Message: +All Evaluations passed + +===== Violations ===== + +----- Conditions ----- + +Query: Types that are "TypeNamespace.SimpleEnum" should not be enums +Result: False +Description: TypeNamespace.SimpleEnum is an enum +Message: +"Types that are "TypeNamespace.SimpleEnum" should not be enums" failed: + TypeNamespace.SimpleEnum is an enum + + + +----- Predicates ----- + +Query: Types that are "TypeNamespace.SimpleEnum" should be Types that are not enums +Result: False +Description: TypeNamespace.SimpleEnum is not Types that are not enums +Message: +"Types that are "TypeNamespace.SimpleEnum" should be Types that are not enums" failed: + TypeNamespace.SimpleEnum is not Types that are not enums + + + +===== Multiple inputs ===== + +Query: Types that are "TypeNamespace.RegularClass" or "TypeNamespace.SimpleStruct" should not be enums +Result: True +Description: TypeNamespace.SimpleStruct passed +Result: True +Description: TypeNamespace.RegularClass passed +Message: +All Evaluations passed + +Query: Types that are "TypeNamespace.RegularClass" or "TypeNamespace.SimpleEnum" should not be enums +Result: False +Description: TypeNamespace.SimpleEnum is an enum +Result: True +Description: TypeNamespace.RegularClass passed +Message: +"Types that are "TypeNamespace.RegularClass" or "TypeNamespace.SimpleEnum" should not be enums" failed: + TypeNamespace.SimpleEnum is an enum + + + diff --git a/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/TypeSyntaxElementsTests.NotBeNestedTest.verified.txt b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/TypeSyntaxElementsTests.NotBeNestedTest.verified.txt new file mode 100644 index 000000000..58e5435df --- /dev/null +++ b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/TypeSyntaxElementsTests.NotBeNestedTest.verified.txt @@ -0,0 +1,63 @@ +===== No Violations ===== + +----- Conditions ----- + +Query: Types that are "TypeNamespace.NonNestedClass" should not be nested +Result: True +Description: TypeNamespace.NonNestedClass passed +Message: +All Evaluations passed + +----- Predicates ----- + +Query: Types that are "TypeNamespace.NonNestedClass" should be Types that are not nested +Result: True +Description: TypeNamespace.NonNestedClass passed +Message: +All Evaluations passed + +===== Violations ===== + +----- Conditions ----- + +Query: Types that are "TypeNamespace.OuterClassA+InnerClassA" should not be nested +Result: False +Description: TypeNamespace.OuterClassA+InnerClassA is nested +Message: +"Types that are "TypeNamespace.OuterClassA+InnerClassA" should not be nested" failed: + TypeNamespace.OuterClassA+InnerClassA is nested + + + +----- Predicates ----- + +Query: Types that are "TypeNamespace.OuterClassA+InnerClassA" should be Types that are not nested +Result: False +Description: TypeNamespace.OuterClassA+InnerClassA is not Types that are not nested +Message: +"Types that are "TypeNamespace.OuterClassA+InnerClassA" should be Types that are not nested" failed: + TypeNamespace.OuterClassA+InnerClassA is not Types that are not nested + + + +===== Multiple inputs ===== + +Query: Types that are "TypeNamespace.NonNestedClass" or "TypeNamespace.RegularClass" should not be nested +Result: True +Description: TypeNamespace.RegularClass passed +Result: True +Description: TypeNamespace.NonNestedClass passed +Message: +All Evaluations passed + +Query: Types that are "TypeNamespace.NonNestedClass" or "TypeNamespace.OuterClassA+InnerClassA" should not be nested +Result: True +Description: TypeNamespace.NonNestedClass passed +Result: False +Description: TypeNamespace.OuterClassA+InnerClassA is nested +Message: +"Types that are "TypeNamespace.NonNestedClass" or "TypeNamespace.OuterClassA+InnerClassA" should not be nested" failed: + TypeNamespace.OuterClassA+InnerClassA is nested + + + diff --git a/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/TypeSyntaxElementsTests.NotBeStructsTest.verified.txt b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/TypeSyntaxElementsTests.NotBeStructsTest.verified.txt new file mode 100644 index 000000000..ba1904186 --- /dev/null +++ b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/TypeSyntaxElementsTests.NotBeStructsTest.verified.txt @@ -0,0 +1,75 @@ +===== No Violations ===== + +----- Conditions ----- + +Query: Types that are "TypeNamespace.RegularClass" should not be structs +Result: True +Description: TypeNamespace.RegularClass passed +Message: +All Evaluations passed + +Query: Types that are "TypeNamespace.SimpleEnum" should not be structs +Result: True +Description: TypeNamespace.SimpleEnum passed +Message: +All Evaluations passed + +----- Predicates ----- + +Query: Types that are "TypeNamespace.RegularClass" should be Types that are not structs +Result: True +Description: TypeNamespace.RegularClass passed +Message: +All Evaluations passed + +Query: Types that are "TypeNamespace.SimpleEnum" should be Types that are not structs +Result: True +Description: TypeNamespace.SimpleEnum passed +Message: +All Evaluations passed + +===== Violations ===== + +----- Conditions ----- + +Query: Types that are "TypeNamespace.SimpleStruct" should not be structs +Result: False +Description: TypeNamespace.SimpleStruct is a struct +Message: +"Types that are "TypeNamespace.SimpleStruct" should not be structs" failed: + TypeNamespace.SimpleStruct is a struct + + + +----- Predicates ----- + +Query: Types that are "TypeNamespace.SimpleStruct" should be Types that are not structs +Result: False +Description: TypeNamespace.SimpleStruct is not Types that are not structs +Message: +"Types that are "TypeNamespace.SimpleStruct" should be Types that are not structs" failed: + TypeNamespace.SimpleStruct is not Types that are not structs + + + +===== Multiple inputs ===== + +Query: Types that are "TypeNamespace.RegularClass" or "TypeNamespace.SimpleEnum" should not be structs +Result: True +Description: TypeNamespace.SimpleEnum passed +Result: True +Description: TypeNamespace.RegularClass passed +Message: +All Evaluations passed + +Query: Types that are "TypeNamespace.RegularClass" or "TypeNamespace.SimpleStruct" should not be structs +Result: False +Description: TypeNamespace.SimpleStruct is a struct +Result: True +Description: TypeNamespace.RegularClass passed +Message: +"Types that are "TypeNamespace.RegularClass" or "TypeNamespace.SimpleStruct" should not be structs" failed: + TypeNamespace.SimpleStruct is a struct + + + diff --git a/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/TypeSyntaxElementsTests.NotBeSystemTypeTest.verified.txt b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/TypeSyntaxElementsTests.NotBeSystemTypeTest.verified.txt new file mode 100644 index 000000000..c1935ffa8 --- /dev/null +++ b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/TypeSyntaxElementsTests.NotBeSystemTypeTest.verified.txt @@ -0,0 +1,151 @@ +===== No Violations ===== + +----- Conditions ----- + +Query: Types that are "TypeNamespace.OtherRegularClass" should not be "TypeNamespace.RegularClass" +Result: True +Description: TypeNamespace.OtherRegularClass passed +Message: +All Evaluations passed + +Query: Types that are "TypeNamespace.OtherRegularClass" should not be "TypeNamespace.RegularClass" +Result: True +Description: TypeNamespace.OtherRegularClass passed +Message: +All Evaluations passed + +----- Predicates ----- + +Query: Types that are "TypeNamespace.OtherRegularClass" should be Types that are not "TypeNamespace.RegularClass" +Result: True +Description: TypeNamespace.OtherRegularClass passed +Message: +All Evaluations passed + +Query: Types that are "TypeNamespace.OtherRegularClass" should be Types that are not "TypeNamespace.RegularClass" +Result: True +Description: TypeNamespace.OtherRegularClass passed +Message: +All Evaluations passed + +===== Violations ===== + +----- Conditions ----- + +Query: Types that are "TypeNamespace.RegularClass" should not be "TypeNamespace.RegularClass" +Result: False +Description: TypeNamespace.RegularClass is "TypeNamespace.RegularClass" +Message: +"Types that are "TypeNamespace.RegularClass" should not be "TypeNamespace.RegularClass"" failed: + TypeNamespace.RegularClass is "TypeNamespace.RegularClass" + + + +Query: Types that are "TypeNamespace.RegularClass" should not be "TypeNamespace.RegularClass" +Result: False +Description: TypeNamespace.RegularClass is "TypeNamespace.RegularClass" +Message: +"Types that are "TypeNamespace.RegularClass" should not be "TypeNamespace.RegularClass"" failed: + TypeNamespace.RegularClass is "TypeNamespace.RegularClass" + + + +----- Predicates ----- + +Query: Types that are "TypeNamespace.RegularClass" should be Types that are not "TypeNamespace.RegularClass" +Result: False +Description: TypeNamespace.RegularClass is not Types that are not "TypeNamespace.RegularClass" +Message: +"Types that are "TypeNamespace.RegularClass" should be Types that are not "TypeNamespace.RegularClass"" failed: + TypeNamespace.RegularClass is not Types that are not "TypeNamespace.RegularClass" + + + +Query: Types that are "TypeNamespace.RegularClass" should be Types that are not "TypeNamespace.RegularClass" +Result: False +Description: TypeNamespace.RegularClass is not Types that are not "TypeNamespace.RegularClass" +Message: +"Types that are "TypeNamespace.RegularClass" should be Types that are not "TypeNamespace.RegularClass"" failed: + TypeNamespace.RegularClass is not Types that are not "TypeNamespace.RegularClass" + + + +===== Empty Arguments (No Violations) ===== + +----- Conditions ----- + +Query: Types that are "TypeNamespace.RegularClass" should exist +Result: True +Description: TypeNamespace.RegularClass passed +Message: +All Evaluations passed + +----- Predicates ----- + +Query: Types that are "TypeNamespace.RegularClass" should be Types that are all types +Result: True +Description: TypeNamespace.RegularClass passed +Message: +All Evaluations passed + +===== Type not in architecture ===== + +----- Conditions ----- + +Query: Types that are "TypeNamespace.RegularClass" should not be "AttributeNamespace.ClassWithoutAttributes" +Exception: Type AttributeNamespace.ClassWithoutAttributes does not exist in provided architecture or is no class. + +Query: Types that are "TypeNamespace.RegularClass" should not be "AttributeNamespace.ClassWithoutAttributes" +Exception: Type AttributeNamespace.ClassWithoutAttributes does not exist in provided architecture or is no class. + +----- Predicates ----- + +Query: Types that are "TypeNamespace.RegularClass" should be Types that are not "AttributeNamespace.ClassWithoutAttributes" +Exception: Type AttributeNamespace.ClassWithoutAttributes does not exist in provided architecture or is no class. + +Query: Types that are "TypeNamespace.RegularClass" should be Types that are not "AttributeNamespace.ClassWithoutAttributes" +Exception: Type AttributeNamespace.ClassWithoutAttributes does not exist in provided architecture or is no class. + +===== Multiple arguments ===== + +----- Conditions ----- + +Query: Types that are "TypeNamespace.OtherRegularClass" should not be "TypeNamespace.RegularClass" or "TypeNamespace.ClassWithProperty" +Result: True +Description: TypeNamespace.OtherRegularClass passed +Message: +All Evaluations passed + +Query: Types that are "TypeNamespace.OtherRegularClass" should not be "TypeNamespace.RegularClass" or "TypeNamespace.ClassWithProperty" +Result: True +Description: TypeNamespace.OtherRegularClass passed +Message: +All Evaluations passed + +----- Predicates ----- + +Query: Types that are "TypeNamespace.OtherRegularClass" should be Types that are not "TypeNamespace.RegularClass" or "TypeNamespace.ClassWithProperty" +Result: True +Description: TypeNamespace.OtherRegularClass passed +Message: +All Evaluations passed + +Query: Types that are "TypeNamespace.OtherRegularClass" should be Types that are not "TypeNamespace.RegularClass" or "TypeNamespace.ClassWithProperty" +Result: True +Description: TypeNamespace.OtherRegularClass passed +Message: +All Evaluations passed + +===== Multiple inputs ===== + +Query: Types that are "TypeNamespace.RegularClass" or "TypeNamespace.OtherRegularClass" should not be "TypeNamespace.RegularClass" +Result: False +Description: TypeNamespace.RegularClass is "TypeNamespace.RegularClass" +Result: True +Description: TypeNamespace.OtherRegularClass passed +Message: +"Types that are "TypeNamespace.RegularClass" or "TypeNamespace.OtherRegularClass" should not be "TypeNamespace.RegularClass"" failed: + TypeNamespace.RegularClass is "TypeNamespace.RegularClass" + + + diff --git a/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/TypeSyntaxElementsTests.NotBeValueTypesTest.verified.txt b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/TypeSyntaxElementsTests.NotBeValueTypesTest.verified.txt new file mode 100644 index 000000000..a900a7617 --- /dev/null +++ b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/TypeSyntaxElementsTests.NotBeValueTypesTest.verified.txt @@ -0,0 +1,81 @@ +===== No Violations ===== + +----- Conditions ----- + +Query: Types that are "TypeNamespace.RegularClass" should not be value types +Result: True +Description: TypeNamespace.RegularClass passed +Message: +All Evaluations passed + +----- Predicates ----- + +Query: Types that are "TypeNamespace.RegularClass" should be Types that are not value types +Result: True +Description: TypeNamespace.RegularClass passed +Message: +All Evaluations passed + +===== Violations ===== + +----- Conditions ----- + +Query: Types that are "TypeNamespace.SimpleEnum" should not be value types +Result: False +Description: TypeNamespace.SimpleEnum is a value type +Message: +"Types that are "TypeNamespace.SimpleEnum" should not be value types" failed: + TypeNamespace.SimpleEnum is a value type + + + +Query: Types that are "TypeNamespace.SimpleStruct" should not be value types +Result: False +Description: TypeNamespace.SimpleStruct is a value type +Message: +"Types that are "TypeNamespace.SimpleStruct" should not be value types" failed: + TypeNamespace.SimpleStruct is a value type + + + +----- Predicates ----- + +Query: Types that are "TypeNamespace.SimpleEnum" should be Types that are not value types +Result: False +Description: TypeNamespace.SimpleEnum is not Types that are not value types +Message: +"Types that are "TypeNamespace.SimpleEnum" should be Types that are not value types" failed: + TypeNamespace.SimpleEnum is not Types that are not value types + + + +Query: Types that are "TypeNamespace.SimpleStruct" should be Types that are not value types +Result: False +Description: TypeNamespace.SimpleStruct is not Types that are not value types +Message: +"Types that are "TypeNamespace.SimpleStruct" should be Types that are not value types" failed: + TypeNamespace.SimpleStruct is not Types that are not value types + + + +===== Multiple inputs ===== + +Query: Types that are "TypeNamespace.RegularClass" or "TypeNamespace.OtherRegularClass" should not be value types +Result: True +Description: TypeNamespace.RegularClass passed +Result: True +Description: TypeNamespace.OtherRegularClass passed +Message: +All Evaluations passed + +Query: Types that are "TypeNamespace.RegularClass" or "TypeNamespace.SimpleEnum" should not be value types +Result: False +Description: TypeNamespace.SimpleEnum is a value type +Result: True +Description: TypeNamespace.RegularClass passed +Message: +"Types that are "TypeNamespace.RegularClass" or "TypeNamespace.SimpleEnum" should not be value types" failed: + TypeNamespace.SimpleEnum is a value type + + + diff --git a/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/TypeSyntaxElementsTests.NotHaveFieldMemberWithNameTest.verified.txt b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/TypeSyntaxElementsTests.NotHaveFieldMemberWithNameTest.verified.txt new file mode 100644 index 000000000..a223a1315 --- /dev/null +++ b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/TypeSyntaxElementsTests.NotHaveFieldMemberWithNameTest.verified.txt @@ -0,0 +1,55 @@ +===== No Violations ===== + +----- Conditions ----- + +Query: Types that are "TypeNamespace.ClassWithoutMembers" should not have field member with name "FieldA" +Result: True +Description: TypeNamespace.ClassWithoutMembers passed +Message: +All Evaluations passed + +----- Predicates ----- + +Query: Types that are "TypeNamespace.ClassWithoutMembers" should be Types that do not have field member with name "FieldA" +Result: True +Description: TypeNamespace.ClassWithoutMembers passed +Message: +All Evaluations passed + +===== Violations ===== + +----- Conditions ----- + +Query: Types that are "TypeNamespace.ClassWithField" should not have field member with name "FieldA" +Result: False +Description: TypeNamespace.ClassWithField does have field member with name "FieldA" +Message: +"Types that are "TypeNamespace.ClassWithField" should not have field member with name "FieldA"" failed: + TypeNamespace.ClassWithField does have field member with name "FieldA" + + + +----- Predicates ----- + +Query: Types that are "TypeNamespace.ClassWithField" should be Types that do not have field member with name "FieldA" +Result: False +Description: TypeNamespace.ClassWithField is not Types that do not have field member with name "FieldA" +Message: +"Types that are "TypeNamespace.ClassWithField" should be Types that do not have field member with name "FieldA"" failed: + TypeNamespace.ClassWithField is not Types that do not have field member with name "FieldA" + + + +===== Multiple inputs ===== + +Query: Types that are "TypeNamespace.ClassWithoutMembers" or "TypeNamespace.ClassWithField" should not have field member with name "FieldA" +Result: False +Description: TypeNamespace.ClassWithField does have field member with name "FieldA" +Result: True +Description: TypeNamespace.ClassWithoutMembers passed +Message: +"Types that are "TypeNamespace.ClassWithoutMembers" or "TypeNamespace.ClassWithField" should not have field member with name "FieldA"" failed: + TypeNamespace.ClassWithField does have field member with name "FieldA" + + + diff --git a/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/TypeSyntaxElementsTests.NotHaveMemberWithNameTest.verified.txt b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/TypeSyntaxElementsTests.NotHaveMemberWithNameTest.verified.txt new file mode 100644 index 000000000..dd0baadfc --- /dev/null +++ b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/TypeSyntaxElementsTests.NotHaveMemberWithNameTest.verified.txt @@ -0,0 +1,55 @@ +===== No Violations ===== + +----- Conditions ----- + +Query: Types that are "TypeNamespace.ClassWithoutMembers" should not have member with name "PropertyB" +Result: True +Description: TypeNamespace.ClassWithoutMembers passed +Message: +All Evaluations passed + +----- Predicates ----- + +Query: Types that are "TypeNamespace.ClassWithoutMembers" should be Types that do not have member with name "PropertyB" +Result: True +Description: TypeNamespace.ClassWithoutMembers passed +Message: +All Evaluations passed + +===== Violations ===== + +----- Conditions ----- + +Query: Types that are "TypeNamespace.ClassWithAllMembers" should not have member with name "PropertyB" +Result: False +Description: TypeNamespace.ClassWithAllMembers does have member with name "PropertyB" +Message: +"Types that are "TypeNamespace.ClassWithAllMembers" should not have member with name "PropertyB"" failed: + TypeNamespace.ClassWithAllMembers does have member with name "PropertyB" + + + +----- Predicates ----- + +Query: Types that are "TypeNamespace.ClassWithAllMembers" should be Types that do not have member with name "PropertyB" +Result: False +Description: TypeNamespace.ClassWithAllMembers is not Types that do not have member with name "PropertyB" +Message: +"Types that are "TypeNamespace.ClassWithAllMembers" should be Types that do not have member with name "PropertyB"" failed: + TypeNamespace.ClassWithAllMembers is not Types that do not have member with name "PropertyB" + + + +===== Multiple inputs ===== + +Query: Types that are "TypeNamespace.ClassWithoutMembers" or "TypeNamespace.ClassWithAllMembers" should not have member with name "PropertyB" +Result: False +Description: TypeNamespace.ClassWithAllMembers does have member with name "PropertyB" +Result: True +Description: TypeNamespace.ClassWithoutMembers passed +Message: +"Types that are "TypeNamespace.ClassWithoutMembers" or "TypeNamespace.ClassWithAllMembers" should not have member with name "PropertyB"" failed: + TypeNamespace.ClassWithAllMembers does have member with name "PropertyB" + + + diff --git a/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/TypeSyntaxElementsTests.NotHaveMethodMemberWithNameTest.verified.txt b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/TypeSyntaxElementsTests.NotHaveMethodMemberWithNameTest.verified.txt new file mode 100644 index 000000000..96cf9ee2e --- /dev/null +++ b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/TypeSyntaxElementsTests.NotHaveMethodMemberWithNameTest.verified.txt @@ -0,0 +1,55 @@ +===== No Violations ===== + +----- Conditions ----- + +Query: Types that are "TypeNamespace.ClassWithoutMembers" should not have method member with name "MethodA()" +Result: True +Description: TypeNamespace.ClassWithoutMembers passed +Message: +All Evaluations passed + +----- Predicates ----- + +Query: Types that are "TypeNamespace.ClassWithoutMembers" should be Types that do not have method member with name "MethodA()" +Result: True +Description: TypeNamespace.ClassWithoutMembers passed +Message: +All Evaluations passed + +===== Violations ===== + +----- Conditions ----- + +Query: Types that are "TypeNamespace.ClassWithMethod" should not have method member with name "MethodA()" +Result: False +Description: TypeNamespace.ClassWithMethod does have method member with name "MethodA()" +Message: +"Types that are "TypeNamespace.ClassWithMethod" should not have method member with name "MethodA()"" failed: + TypeNamespace.ClassWithMethod does have method member with name "MethodA()" + + + +----- Predicates ----- + +Query: Types that are "TypeNamespace.ClassWithMethod" should be Types that do not have method member with name "MethodA()" +Result: False +Description: TypeNamespace.ClassWithMethod is not Types that do not have method member with name "MethodA()" +Message: +"Types that are "TypeNamespace.ClassWithMethod" should be Types that do not have method member with name "MethodA()"" failed: + TypeNamespace.ClassWithMethod is not Types that do not have method member with name "MethodA()" + + + +===== Multiple inputs ===== + +Query: Types that are "TypeNamespace.ClassWithoutMembers" or "TypeNamespace.ClassWithMethod" should not have method member with name "MethodA()" +Result: False +Description: TypeNamespace.ClassWithMethod does have method member with name "MethodA()" +Result: True +Description: TypeNamespace.ClassWithoutMembers passed +Message: +"Types that are "TypeNamespace.ClassWithoutMembers" or "TypeNamespace.ClassWithMethod" should not have method member with name "MethodA()"" failed: + TypeNamespace.ClassWithMethod does have method member with name "MethodA()" + + + diff --git a/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/TypeSyntaxElementsTests.NotHavePropertyMemberWithNameTest.verified.txt b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/TypeSyntaxElementsTests.NotHavePropertyMemberWithNameTest.verified.txt new file mode 100644 index 000000000..63c2a0284 --- /dev/null +++ b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/TypeSyntaxElementsTests.NotHavePropertyMemberWithNameTest.verified.txt @@ -0,0 +1,55 @@ +===== No Violations ===== + +----- Conditions ----- + +Query: Types that are "TypeNamespace.ClassWithoutMembers" should not have property member with name "PropertyA" +Result: True +Description: TypeNamespace.ClassWithoutMembers passed +Message: +All Evaluations passed + +----- Predicates ----- + +Query: Types that are "TypeNamespace.ClassWithoutMembers" should be Types that do not have property member with name "PropertyA" +Result: True +Description: TypeNamespace.ClassWithoutMembers passed +Message: +All Evaluations passed + +===== Violations ===== + +----- Conditions ----- + +Query: Types that are "TypeNamespace.ClassWithProperty" should not have property member with name "PropertyA" +Result: False +Description: TypeNamespace.ClassWithProperty does have property member with name "PropertyA" +Message: +"Types that are "TypeNamespace.ClassWithProperty" should not have property member with name "PropertyA"" failed: + TypeNamespace.ClassWithProperty does have property member with name "PropertyA" + + + +----- Predicates ----- + +Query: Types that are "TypeNamespace.ClassWithProperty" should be Types that do not have property member with name "PropertyA" +Result: False +Description: TypeNamespace.ClassWithProperty is not Types that do not have property member with name "PropertyA" +Message: +"Types that are "TypeNamespace.ClassWithProperty" should be Types that do not have property member with name "PropertyA"" failed: + TypeNamespace.ClassWithProperty is not Types that do not have property member with name "PropertyA" + + + +===== Multiple inputs ===== + +Query: Types that are "TypeNamespace.ClassWithoutMembers" or "TypeNamespace.ClassWithProperty" should not have property member with name "PropertyA" +Result: False +Description: TypeNamespace.ClassWithProperty does have property member with name "PropertyA" +Result: True +Description: TypeNamespace.ClassWithoutMembers passed +Message: +"Types that are "TypeNamespace.ClassWithoutMembers" or "TypeNamespace.ClassWithProperty" should not have property member with name "PropertyA"" failed: + TypeNamespace.ClassWithProperty does have property member with name "PropertyA" + + + diff --git a/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/TypeSyntaxElementsTests.NotImplementAnyInterfacesTest.verified.txt b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/TypeSyntaxElementsTests.NotImplementAnyInterfacesTest.verified.txt index 63d706e82..fcbb8a5c9 100644 --- a/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/TypeSyntaxElementsTests.NotImplementAnyInterfacesTest.verified.txt +++ b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/TypeSyntaxElementsTests.NotImplementAnyInterfacesTest.verified.txt @@ -2,105 +2,73 @@ ----- Conditions ----- -Query: Interfaces that are "InterfaceAssembly.IChildInterface" should not implement "InterfaceAssembly.IOtherBaseInterface" +Query: Interfaces that are "TypeNamespace.IChildTestInterface" should not implement "TypeNamespace.IOtherTestInterface" Result: True -Description: InterfaceAssembly.IChildInterface passed +Description: TypeNamespace.IChildTestInterface passed Message: All Evaluations passed -Query: Interfaces that are "InterfaceAssembly.IChildInterface" should not implement "InterfaceAssembly.IOtherBaseInterface" +Query: Interfaces that are "TypeNamespace.IChildTestInterface" should not implement "TypeNamespace.IOtherTestInterface" Result: True -Description: InterfaceAssembly.IChildInterface passed +Description: TypeNamespace.IChildTestInterface passed Message: All Evaluations passed -Query: Interfaces that are "InterfaceAssembly.IChildInterface" should not implement "InterfaceAssembly.IOtherBaseInterface" +Query: Interfaces that are "TypeNamespace.IChildTestInterface" should not implement "TypeNamespace.IOtherTestInterface" Result: True -Description: InterfaceAssembly.IChildInterface passed +Description: TypeNamespace.IChildTestInterface passed Message: All Evaluations passed -Query: Interfaces that are "InterfaceAssembly.IChildInterface" should not implement "InterfaceAssembly.IOtherBaseInterface" +Query: Interfaces that are "TypeNamespace.IChildTestInterface" should not implement "TypeNamespace.IOtherTestInterface" Result: True -Description: InterfaceAssembly.IChildInterface passed +Description: TypeNamespace.IChildTestInterface passed Message: All Evaluations passed -Query: Interfaces that are "InterfaceAssembly.IChildInterface" should not implement any Interfaces that are "InterfaceAssembly.IOtherBaseInterface" +Query: Interfaces that are "TypeNamespace.IChildTestInterface" should not implement any Interfaces that are "TypeNamespace.IOtherTestInterface" Result: True -Description: InterfaceAssembly.IChildInterface passed +Description: TypeNamespace.IChildTestInterface passed Message: All Evaluations passed ----- Predicates ----- -Query: Interfaces that are "InterfaceAssembly.IChildInterface" should be Interfaces that do not implement "InterfaceAssembly.IOtherBaseInterface" +Query: Interfaces that are "TypeNamespace.IChildTestInterface" should be Interfaces that do not implement "TypeNamespace.IOtherTestInterface" Result: True -Description: InterfaceAssembly.IChildInterface passed +Description: TypeNamespace.IChildTestInterface passed Message: All Evaluations passed -Query: Interfaces that are "InterfaceAssembly.IChildInterface" should be Interfaces that do not implement "InterfaceAssembly.IOtherBaseInterface" +Query: Interfaces that are "TypeNamespace.IChildTestInterface" should be Interfaces that do not implement "TypeNamespace.IOtherTestInterface" Result: True -Description: InterfaceAssembly.IChildInterface passed +Description: TypeNamespace.IChildTestInterface passed Message: All Evaluations passed -Query: Interfaces that are "InterfaceAssembly.IChildInterface" should be Interfaces that do not implement "InterfaceAssembly.IOtherBaseInterface" +Query: Interfaces that are "TypeNamespace.IChildTestInterface" should be Interfaces that do not implement "TypeNamespace.IOtherTestInterface" Result: True -Description: InterfaceAssembly.IChildInterface passed +Description: TypeNamespace.IChildTestInterface passed Message: All Evaluations passed -Query: Interfaces that are "InterfaceAssembly.IChildInterface" should be Interfaces that do not implement "InterfaceAssembly.IOtherBaseInterface" +Query: Interfaces that are "TypeNamespace.IChildTestInterface" should be Interfaces that do not implement "TypeNamespace.IOtherTestInterface" Result: True -Description: InterfaceAssembly.IChildInterface passed +Description: TypeNamespace.IChildTestInterface passed Message: All Evaluations passed -Query: Interfaces that are "InterfaceAssembly.IChildInterface" should be Interfaces that do not implement any Interfaces that are "InterfaceAssembly.IOtherBaseInterface" +Query: Interfaces that are "TypeNamespace.IChildTestInterface" should be Interfaces that do not implement any Interfaces that are "TypeNamespace.IOtherTestInterface" Result: True -Description: InterfaceAssembly.IChildInterface passed -Message: -All Evaluations passed - ------ Predicates as conditions ----- - -Query: Interfaces that are "InterfaceAssembly.IChildInterface" should be types that do not implement "InterfaceAssembly.IOtherBaseInterface" -Result: True -Description: InterfaceAssembly.IChildInterface passed -Message: -All Evaluations passed - -Query: Interfaces that are "InterfaceAssembly.IChildInterface" should be types that do not implement "InterfaceAssembly.IOtherBaseInterface" -Result: True -Description: InterfaceAssembly.IChildInterface passed -Message: -All Evaluations passed - -Query: Interfaces that are "InterfaceAssembly.IChildInterface" should be types that do not implement "InterfaceAssembly.IOtherBaseInterface" -Result: True -Description: InterfaceAssembly.IChildInterface passed -Message: -All Evaluations passed - -Query: Interfaces that are "InterfaceAssembly.IChildInterface" should be types that do not implement "InterfaceAssembly.IOtherBaseInterface" -Result: True -Description: InterfaceAssembly.IChildInterface passed -Message: -All Evaluations passed - -Query: Interfaces that are "InterfaceAssembly.IChildInterface" should be types that do not implement any Interfaces that are "InterfaceAssembly.IOtherBaseInterface" -Result: True -Description: InterfaceAssembly.IChildInterface passed +Description: TypeNamespace.IChildTestInterface passed Message: All Evaluations passed ----- Complex conditions ----- -Query: Interfaces that are "InterfaceAssembly.IChildInterface" should not implement any interfaces that are "InterfaceAssembly.IOtherBaseInterface" +Query: Interfaces that are "TypeNamespace.IChildTestInterface" should not implement any interfaces that are "TypeNamespace.IOtherTestInterface" Result: True -Description: InterfaceAssembly.IChildInterface passed +Description: TypeNamespace.IChildTestInterface passed Message: All Evaluations passed @@ -108,153 +76,106 @@ All Evaluations passed ----- Conditions ----- -Query: Interfaces that are "InterfaceAssembly.IChildInterface" should not implement "InterfaceAssembly.IBaseInterface" +Query: Interfaces that are "TypeNamespace.IChildTestInterface" should not implement "TypeNamespace.ITestInterface" Result: False -Description: InterfaceAssembly.IChildInterface does implement InterfaceAssembly.IBaseInterface +Description: TypeNamespace.IChildTestInterface does implement TypeNamespace.ITestInterface Message: -"Interfaces that are "InterfaceAssembly.IChildInterface" should not implement "InterfaceAssembly.IBaseInterface"" failed: - InterfaceAssembly.IChildInterface does implement InterfaceAssembly.IBaseInterface +"Interfaces that are "TypeNamespace.IChildTestInterface" should not implement "TypeNamespace.ITestInterface"" failed: + TypeNamespace.IChildTestInterface does implement TypeNamespace.ITestInterface -Query: Interfaces that are "InterfaceAssembly.IChildInterface" should not implement "InterfaceAssembly.IBaseInterface" +Query: Interfaces that are "TypeNamespace.IChildTestInterface" should not implement "TypeNamespace.ITestInterface" Result: False -Description: InterfaceAssembly.IChildInterface does implement InterfaceAssembly.IBaseInterface +Description: TypeNamespace.IChildTestInterface does implement TypeNamespace.ITestInterface Message: -"Interfaces that are "InterfaceAssembly.IChildInterface" should not implement "InterfaceAssembly.IBaseInterface"" failed: - InterfaceAssembly.IChildInterface does implement InterfaceAssembly.IBaseInterface +"Interfaces that are "TypeNamespace.IChildTestInterface" should not implement "TypeNamespace.ITestInterface"" failed: + TypeNamespace.IChildTestInterface does implement TypeNamespace.ITestInterface -Query: Interfaces that are "InterfaceAssembly.IChildInterface" should not implement "InterfaceAssembly.IBaseInterface" +Query: Interfaces that are "TypeNamespace.IChildTestInterface" should not implement "TypeNamespace.ITestInterface" Result: False -Description: InterfaceAssembly.IChildInterface does implement InterfaceAssembly.IBaseInterface +Description: TypeNamespace.IChildTestInterface does implement TypeNamespace.ITestInterface Message: -"Interfaces that are "InterfaceAssembly.IChildInterface" should not implement "InterfaceAssembly.IBaseInterface"" failed: - InterfaceAssembly.IChildInterface does implement InterfaceAssembly.IBaseInterface +"Interfaces that are "TypeNamespace.IChildTestInterface" should not implement "TypeNamespace.ITestInterface"" failed: + TypeNamespace.IChildTestInterface does implement TypeNamespace.ITestInterface -Query: Interfaces that are "InterfaceAssembly.IChildInterface" should not implement "InterfaceAssembly.IBaseInterface" +Query: Interfaces that are "TypeNamespace.IChildTestInterface" should not implement "TypeNamespace.ITestInterface" Result: False -Description: InterfaceAssembly.IChildInterface does implement InterfaceAssembly.IBaseInterface +Description: TypeNamespace.IChildTestInterface does implement TypeNamespace.ITestInterface Message: -"Interfaces that are "InterfaceAssembly.IChildInterface" should not implement "InterfaceAssembly.IBaseInterface"" failed: - InterfaceAssembly.IChildInterface does implement InterfaceAssembly.IBaseInterface +"Interfaces that are "TypeNamespace.IChildTestInterface" should not implement "TypeNamespace.ITestInterface"" failed: + TypeNamespace.IChildTestInterface does implement TypeNamespace.ITestInterface -Query: Interfaces that are "InterfaceAssembly.IChildInterface" should not implement any Interfaces that are "InterfaceAssembly.IBaseInterface" +Query: Interfaces that are "TypeNamespace.IChildTestInterface" should not implement any Interfaces that are "TypeNamespace.ITestInterface" Result: False -Description: InterfaceAssembly.IChildInterface does implement InterfaceAssembly.IBaseInterface +Description: TypeNamespace.IChildTestInterface does implement TypeNamespace.ITestInterface Message: -"Interfaces that are "InterfaceAssembly.IChildInterface" should not implement any Interfaces that are "InterfaceAssembly.IBaseInterface"" failed: - InterfaceAssembly.IChildInterface does implement InterfaceAssembly.IBaseInterface +"Interfaces that are "TypeNamespace.IChildTestInterface" should not implement any Interfaces that are "TypeNamespace.ITestInterface"" failed: + TypeNamespace.IChildTestInterface does implement TypeNamespace.ITestInterface ----- Predicates ----- -Query: Interfaces that are "InterfaceAssembly.IChildInterface" should be Interfaces that do not implement "InterfaceAssembly.IBaseInterface" -Result: False -Description: InterfaceAssembly.IChildInterface is not Interfaces that do not implement "InterfaceAssembly.IBaseInterface" -Message: -"Interfaces that are "InterfaceAssembly.IChildInterface" should be Interfaces that do not implement "InterfaceAssembly.IBaseInterface"" failed: - InterfaceAssembly.IChildInterface is not Interfaces that do not implement "InterfaceAssembly.IBaseInterface" - - - -Query: Interfaces that are "InterfaceAssembly.IChildInterface" should be Interfaces that do not implement "InterfaceAssembly.IBaseInterface" -Result: False -Description: InterfaceAssembly.IChildInterface is not Interfaces that do not implement "InterfaceAssembly.IBaseInterface" -Message: -"Interfaces that are "InterfaceAssembly.IChildInterface" should be Interfaces that do not implement "InterfaceAssembly.IBaseInterface"" failed: - InterfaceAssembly.IChildInterface is not Interfaces that do not implement "InterfaceAssembly.IBaseInterface" - - - -Query: Interfaces that are "InterfaceAssembly.IChildInterface" should be Interfaces that do not implement "InterfaceAssembly.IBaseInterface" -Result: False -Description: InterfaceAssembly.IChildInterface is not Interfaces that do not implement "InterfaceAssembly.IBaseInterface" -Message: -"Interfaces that are "InterfaceAssembly.IChildInterface" should be Interfaces that do not implement "InterfaceAssembly.IBaseInterface"" failed: - InterfaceAssembly.IChildInterface is not Interfaces that do not implement "InterfaceAssembly.IBaseInterface" - - - -Query: Interfaces that are "InterfaceAssembly.IChildInterface" should be Interfaces that do not implement "InterfaceAssembly.IBaseInterface" -Result: False -Description: InterfaceAssembly.IChildInterface is not Interfaces that do not implement "InterfaceAssembly.IBaseInterface" -Message: -"Interfaces that are "InterfaceAssembly.IChildInterface" should be Interfaces that do not implement "InterfaceAssembly.IBaseInterface"" failed: - InterfaceAssembly.IChildInterface is not Interfaces that do not implement "InterfaceAssembly.IBaseInterface" - - - -Query: Interfaces that are "InterfaceAssembly.IChildInterface" should be Interfaces that do not implement any Interfaces that are "InterfaceAssembly.IBaseInterface" -Result: False -Description: InterfaceAssembly.IChildInterface is not Interfaces that do not implement any Interfaces that are "InterfaceAssembly.IBaseInterface" -Message: -"Interfaces that are "InterfaceAssembly.IChildInterface" should be Interfaces that do not implement any Interfaces that are "InterfaceAssembly.IBaseInterface"" failed: - InterfaceAssembly.IChildInterface is not Interfaces that do not implement any Interfaces that are "InterfaceAssembly.IBaseInterface" - - - ------ Predicates as conditions ----- - -Query: Interfaces that are "InterfaceAssembly.IChildInterface" should be types that do not implement "InterfaceAssembly.IBaseInterface" +Query: Interfaces that are "TypeNamespace.IChildTestInterface" should be Interfaces that do not implement "TypeNamespace.ITestInterface" Result: False -Description: InterfaceAssembly.IChildInterface is not "InterfaceAssembly.IBaseInterface" or "InterfaceAssembly.IOtherBaseInterface" or "InterfaceAssembly.IOtherChildInterface" or "InterfaceAssembly.IInterfaceWithoutDependencies" 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.String" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" +Description: TypeNamespace.IChildTestInterface is not Interfaces that do not implement "TypeNamespace.ITestInterface" Message: -"Interfaces that are "InterfaceAssembly.IChildInterface" should be types that do not implement "InterfaceAssembly.IBaseInterface"" failed: - InterfaceAssembly.IChildInterface is not "InterfaceAssembly.IBaseInterface" or "InterfaceAssembly.IOtherBaseInterface" or "InterfaceAssembly.IOtherChildInterface" or "InterfaceAssembly.IInterfaceWithoutDependencies" 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.String" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" +"Interfaces that are "TypeNamespace.IChildTestInterface" should be Interfaces that do not implement "TypeNamespace.ITestInterface"" failed: + TypeNamespace.IChildTestInterface is not Interfaces that do not implement "TypeNamespace.ITestInterface" -Query: Interfaces that are "InterfaceAssembly.IChildInterface" should be types that do not implement "InterfaceAssembly.IBaseInterface" +Query: Interfaces that are "TypeNamespace.IChildTestInterface" should be Interfaces that do not implement "TypeNamespace.ITestInterface" Result: False -Description: InterfaceAssembly.IChildInterface is not "InterfaceAssembly.IBaseInterface" or "InterfaceAssembly.IOtherBaseInterface" or "InterfaceAssembly.IOtherChildInterface" or "InterfaceAssembly.IInterfaceWithoutDependencies" 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.String" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" +Description: TypeNamespace.IChildTestInterface is not Interfaces that do not implement "TypeNamespace.ITestInterface" Message: -"Interfaces that are "InterfaceAssembly.IChildInterface" should be types that do not implement "InterfaceAssembly.IBaseInterface"" failed: - InterfaceAssembly.IChildInterface is not "InterfaceAssembly.IBaseInterface" or "InterfaceAssembly.IOtherBaseInterface" or "InterfaceAssembly.IOtherChildInterface" or "InterfaceAssembly.IInterfaceWithoutDependencies" 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.String" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" +"Interfaces that are "TypeNamespace.IChildTestInterface" should be Interfaces that do not implement "TypeNamespace.ITestInterface"" failed: + TypeNamespace.IChildTestInterface is not Interfaces that do not implement "TypeNamespace.ITestInterface" -Query: Interfaces that are "InterfaceAssembly.IChildInterface" should be types that do not implement "InterfaceAssembly.IBaseInterface" +Query: Interfaces that are "TypeNamespace.IChildTestInterface" should be Interfaces that do not implement "TypeNamespace.ITestInterface" Result: False -Description: InterfaceAssembly.IChildInterface is not "InterfaceAssembly.IBaseInterface" or "InterfaceAssembly.IOtherBaseInterface" or "InterfaceAssembly.IOtherChildInterface" or "InterfaceAssembly.IInterfaceWithoutDependencies" 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.String" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" +Description: TypeNamespace.IChildTestInterface is not Interfaces that do not implement "TypeNamespace.ITestInterface" Message: -"Interfaces that are "InterfaceAssembly.IChildInterface" should be types that do not implement "InterfaceAssembly.IBaseInterface"" failed: - InterfaceAssembly.IChildInterface is not "InterfaceAssembly.IBaseInterface" or "InterfaceAssembly.IOtherBaseInterface" or "InterfaceAssembly.IOtherChildInterface" or "InterfaceAssembly.IInterfaceWithoutDependencies" 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.String" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" +"Interfaces that are "TypeNamespace.IChildTestInterface" should be Interfaces that do not implement "TypeNamespace.ITestInterface"" failed: + TypeNamespace.IChildTestInterface is not Interfaces that do not implement "TypeNamespace.ITestInterface" -Query: Interfaces that are "InterfaceAssembly.IChildInterface" should be types that do not implement "InterfaceAssembly.IBaseInterface" +Query: Interfaces that are "TypeNamespace.IChildTestInterface" should be Interfaces that do not implement "TypeNamespace.ITestInterface" Result: False -Description: InterfaceAssembly.IChildInterface is not "InterfaceAssembly.IBaseInterface" or "InterfaceAssembly.IOtherBaseInterface" or "InterfaceAssembly.IOtherChildInterface" or "InterfaceAssembly.IInterfaceWithoutDependencies" 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.String" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" +Description: TypeNamespace.IChildTestInterface is not Interfaces that do not implement "TypeNamespace.ITestInterface" Message: -"Interfaces that are "InterfaceAssembly.IChildInterface" should be types that do not implement "InterfaceAssembly.IBaseInterface"" failed: - InterfaceAssembly.IChildInterface is not "InterfaceAssembly.IBaseInterface" or "InterfaceAssembly.IOtherBaseInterface" or "InterfaceAssembly.IOtherChildInterface" or "InterfaceAssembly.IInterfaceWithoutDependencies" 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.String" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" +"Interfaces that are "TypeNamespace.IChildTestInterface" should be Interfaces that do not implement "TypeNamespace.ITestInterface"" failed: + TypeNamespace.IChildTestInterface is not Interfaces that do not implement "TypeNamespace.ITestInterface" -Query: Interfaces that are "InterfaceAssembly.IChildInterface" should be types that do not implement any Interfaces that are "InterfaceAssembly.IBaseInterface" +Query: Interfaces that are "TypeNamespace.IChildTestInterface" should be Interfaces that do not implement any Interfaces that are "TypeNamespace.ITestInterface" Result: False -Description: InterfaceAssembly.IChildInterface is not "InterfaceAssembly.IBaseInterface" or "InterfaceAssembly.IOtherBaseInterface" or "InterfaceAssembly.IOtherChildInterface" or "InterfaceAssembly.IInterfaceWithoutDependencies" 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.String" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" +Description: TypeNamespace.IChildTestInterface is not Interfaces that do not implement any Interfaces that are "TypeNamespace.ITestInterface" Message: -"Interfaces that are "InterfaceAssembly.IChildInterface" should be types that do not implement any Interfaces that are "InterfaceAssembly.IBaseInterface"" failed: - InterfaceAssembly.IChildInterface is not "InterfaceAssembly.IBaseInterface" or "InterfaceAssembly.IOtherBaseInterface" or "InterfaceAssembly.IOtherChildInterface" or "InterfaceAssembly.IInterfaceWithoutDependencies" 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.String" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" +"Interfaces that are "TypeNamespace.IChildTestInterface" should be Interfaces that do not implement any Interfaces that are "TypeNamespace.ITestInterface"" failed: + TypeNamespace.IChildTestInterface is not Interfaces that do not implement any Interfaces that are "TypeNamespace.ITestInterface" ----- Complex conditions ----- -Query: Interfaces that are "InterfaceAssembly.IChildInterface" should not implement any interfaces that are "InterfaceAssembly.IBaseInterface" +Query: Interfaces that are "TypeNamespace.IChildTestInterface" should not implement any interfaces that are "TypeNamespace.ITestInterface" Result: False -Description: InterfaceAssembly.IChildInterface does implement InterfaceAssembly.IBaseInterface +Description: TypeNamespace.IChildTestInterface does implement TypeNamespace.ITestInterface Message: -"Interfaces that are "InterfaceAssembly.IChildInterface" should not implement any interfaces that are "InterfaceAssembly.IBaseInterface"" failed: - InterfaceAssembly.IChildInterface does implement InterfaceAssembly.IBaseInterface +"Interfaces that are "TypeNamespace.IChildTestInterface" should not implement any interfaces that are "TypeNamespace.ITestInterface"" failed: + TypeNamespace.IChildTestInterface does implement TypeNamespace.ITestInterface @@ -262,113 +183,79 @@ Message: ----- Conditions ----- -Query: Interfaces that are "InterfaceAssembly.IBaseInterface" or "InterfaceAssembly.IChildInterface" should not implement any of no interfaces (always true) +Query: Interfaces that are "TypeNamespace.ITestInterface" or "TypeNamespace.IChildTestInterface" should not implement any of no interfaces (always true) Result: True -Description: InterfaceAssembly.IBaseInterface passed +Description: TypeNamespace.ITestInterface passed Result: True -Description: InterfaceAssembly.IChildInterface passed +Description: TypeNamespace.IChildTestInterface passed Message: All Evaluations passed -Query: Interfaces that are "InterfaceAssembly.IBaseInterface" or "InterfaceAssembly.IChildInterface" should not implement any of no interfaces (always true) +Query: Interfaces that are "TypeNamespace.ITestInterface" or "TypeNamespace.IChildTestInterface" should not implement any of no interfaces (always true) Result: True -Description: InterfaceAssembly.IBaseInterface passed +Description: TypeNamespace.ITestInterface passed Result: True -Description: InterfaceAssembly.IChildInterface passed +Description: TypeNamespace.IChildTestInterface passed Message: All Evaluations passed -Query: Interfaces that are "InterfaceAssembly.IBaseInterface" or "InterfaceAssembly.IChildInterface" should not implement any of no interfaces (always true) +Query: Interfaces that are "TypeNamespace.ITestInterface" or "TypeNamespace.IChildTestInterface" should not implement any of no interfaces (always true) Result: True -Description: InterfaceAssembly.IBaseInterface passed +Description: TypeNamespace.ITestInterface passed Result: True -Description: InterfaceAssembly.IChildInterface passed +Description: TypeNamespace.IChildTestInterface passed Message: All Evaluations passed -Query: Interfaces that are "InterfaceAssembly.IBaseInterface" or "InterfaceAssembly.IChildInterface" should not implement any Interfaces that have name "NotTheNameOfAnyObject" +Query: Interfaces that are "TypeNamespace.ITestInterface" or "TypeNamespace.IChildTestInterface" should not implement any Interfaces that have name "NotTheNameOfAnyObject" Result: True -Description: InterfaceAssembly.IBaseInterface passed +Description: TypeNamespace.ITestInterface passed Result: True -Description: InterfaceAssembly.IChildInterface passed +Description: TypeNamespace.IChildTestInterface passed Message: All Evaluations passed ----- Predicates ----- -Query: Interfaces that are "InterfaceAssembly.IBaseInterface" or "InterfaceAssembly.IChildInterface" should be Interfaces that do not implement any of no interfaces (always true) +Query: Interfaces that are "TypeNamespace.ITestInterface" or "TypeNamespace.IChildTestInterface" should be Interfaces that do not implement any of no interfaces (always true) Result: True -Description: InterfaceAssembly.IBaseInterface passed +Description: TypeNamespace.ITestInterface passed Result: True -Description: InterfaceAssembly.IChildInterface passed +Description: TypeNamespace.IChildTestInterface passed Message: All Evaluations passed -Query: Interfaces that are "InterfaceAssembly.IBaseInterface" or "InterfaceAssembly.IChildInterface" should be Interfaces that do not implement any of no interfaces (always true) +Query: Interfaces that are "TypeNamespace.ITestInterface" or "TypeNamespace.IChildTestInterface" should be Interfaces that do not implement any of no interfaces (always true) Result: True -Description: InterfaceAssembly.IBaseInterface passed +Description: TypeNamespace.ITestInterface passed Result: True -Description: InterfaceAssembly.IChildInterface passed +Description: TypeNamespace.IChildTestInterface passed Message: All Evaluations passed -Query: Interfaces that are "InterfaceAssembly.IBaseInterface" or "InterfaceAssembly.IChildInterface" should be Interfaces that do not implement any of no interfaces (always true) +Query: Interfaces that are "TypeNamespace.ITestInterface" or "TypeNamespace.IChildTestInterface" should be Interfaces that do not implement any of no interfaces (always true) Result: True -Description: InterfaceAssembly.IBaseInterface passed +Description: TypeNamespace.ITestInterface passed Result: True -Description: InterfaceAssembly.IChildInterface passed +Description: TypeNamespace.IChildTestInterface passed Message: All Evaluations passed -Query: Interfaces that are "InterfaceAssembly.IBaseInterface" or "InterfaceAssembly.IChildInterface" should be Interfaces that do not implement any Interfaces that have name "NotTheNameOfAnyObject" +Query: Interfaces that are "TypeNamespace.ITestInterface" or "TypeNamespace.IChildTestInterface" should be Interfaces that do not implement any Interfaces that have name "NotTheNameOfAnyObject" Result: True -Description: InterfaceAssembly.IBaseInterface passed +Description: TypeNamespace.ITestInterface passed Result: True -Description: InterfaceAssembly.IChildInterface passed -Message: -All Evaluations passed - ------ Predicates as conditions ----- - -Query: Interfaces that are "InterfaceAssembly.IBaseInterface" or "InterfaceAssembly.IChildInterface" should be types that do not implement any of no interfaces (always true) -Result: True -Description: InterfaceAssembly.IBaseInterface passed -Result: True -Description: InterfaceAssembly.IChildInterface passed -Message: -All Evaluations passed - -Query: Interfaces that are "InterfaceAssembly.IBaseInterface" or "InterfaceAssembly.IChildInterface" should be types that do not implement any of no interfaces (always true) -Result: True -Description: InterfaceAssembly.IBaseInterface passed -Result: True -Description: InterfaceAssembly.IChildInterface passed -Message: -All Evaluations passed - -Query: Interfaces that are "InterfaceAssembly.IBaseInterface" or "InterfaceAssembly.IChildInterface" should be types that do not implement any of no interfaces (always true) -Result: True -Description: InterfaceAssembly.IBaseInterface passed -Result: True -Description: InterfaceAssembly.IChildInterface passed -Message: -All Evaluations passed - -Query: Interfaces that are "InterfaceAssembly.IBaseInterface" or "InterfaceAssembly.IChildInterface" should be types that do not implement any Interfaces that have name "NotTheNameOfAnyObject" -Result: True -Description: InterfaceAssembly.IBaseInterface passed -Result: True -Description: InterfaceAssembly.IChildInterface passed +Description: TypeNamespace.IChildTestInterface passed Message: All Evaluations passed ----- Complex conditions ----- -Query: Interfaces that are "InterfaceAssembly.IBaseInterface" or "InterfaceAssembly.IChildInterface" should not implement any interfaces that are any of no objects (always empty) +Query: Interfaces that are "TypeNamespace.ITestInterface" or "TypeNamespace.IChildTestInterface" should not implement any interfaces that are any of no objects (always empty) Result: True -Description: InterfaceAssembly.IBaseInterface passed +Description: TypeNamespace.ITestInterface passed Result: True -Description: InterfaceAssembly.IChildInterface passed +Description: TypeNamespace.IChildTestInterface passed Message: All Evaluations passed @@ -376,153 +263,106 @@ All Evaluations passed ----- Conditions ----- -Query: Interfaces that are "InterfaceAssembly.IChildInterface" should not implement any "InterfaceAssembly.IBaseInterface" or "InterfaceAssembly.IOtherBaseInterface" +Query: Interfaces that are "TypeNamespace.IChildTestInterface" should not implement any "TypeNamespace.ITestInterface" or "TypeNamespace.IOtherTestInterface" Result: False -Description: InterfaceAssembly.IChildInterface does implement InterfaceAssembly.IBaseInterface +Description: TypeNamespace.IChildTestInterface does implement TypeNamespace.ITestInterface Message: -"Interfaces that are "InterfaceAssembly.IChildInterface" should not implement any "InterfaceAssembly.IBaseInterface" or "InterfaceAssembly.IOtherBaseInterface"" failed: - InterfaceAssembly.IChildInterface does implement InterfaceAssembly.IBaseInterface +"Interfaces that are "TypeNamespace.IChildTestInterface" should not implement any "TypeNamespace.ITestInterface" or "TypeNamespace.IOtherTestInterface"" failed: + TypeNamespace.IChildTestInterface does implement TypeNamespace.ITestInterface -Query: Interfaces that are "InterfaceAssembly.IChildInterface" should not implement any "InterfaceAssembly.IBaseInterface" or "InterfaceAssembly.IOtherBaseInterface" +Query: Interfaces that are "TypeNamespace.IChildTestInterface" should not implement any "TypeNamespace.ITestInterface" or "TypeNamespace.IOtherTestInterface" Result: False -Description: InterfaceAssembly.IChildInterface does implement InterfaceAssembly.IBaseInterface +Description: TypeNamespace.IChildTestInterface does implement TypeNamespace.ITestInterface Message: -"Interfaces that are "InterfaceAssembly.IChildInterface" should not implement any "InterfaceAssembly.IBaseInterface" or "InterfaceAssembly.IOtherBaseInterface"" failed: - InterfaceAssembly.IChildInterface does implement InterfaceAssembly.IBaseInterface +"Interfaces that are "TypeNamespace.IChildTestInterface" should not implement any "TypeNamespace.ITestInterface" or "TypeNamespace.IOtherTestInterface"" failed: + TypeNamespace.IChildTestInterface does implement TypeNamespace.ITestInterface -Query: Interfaces that are "InterfaceAssembly.IChildInterface" should not implement any "InterfaceAssembly.IBaseInterface" or "InterfaceAssembly.IOtherBaseInterface" +Query: Interfaces that are "TypeNamespace.IChildTestInterface" should not implement any "TypeNamespace.ITestInterface" or "TypeNamespace.IOtherTestInterface" Result: False -Description: InterfaceAssembly.IChildInterface does implement InterfaceAssembly.IBaseInterface +Description: TypeNamespace.IChildTestInterface does implement TypeNamespace.ITestInterface Message: -"Interfaces that are "InterfaceAssembly.IChildInterface" should not implement any "InterfaceAssembly.IBaseInterface" or "InterfaceAssembly.IOtherBaseInterface"" failed: - InterfaceAssembly.IChildInterface does implement InterfaceAssembly.IBaseInterface +"Interfaces that are "TypeNamespace.IChildTestInterface" should not implement any "TypeNamespace.ITestInterface" or "TypeNamespace.IOtherTestInterface"" failed: + TypeNamespace.IChildTestInterface does implement TypeNamespace.ITestInterface -Query: Interfaces that are "InterfaceAssembly.IChildInterface" should not implement any "InterfaceAssembly.IBaseInterface" or "InterfaceAssembly.IOtherBaseInterface" +Query: Interfaces that are "TypeNamespace.IChildTestInterface" should not implement any "TypeNamespace.ITestInterface" or "TypeNamespace.IOtherTestInterface" Result: False -Description: InterfaceAssembly.IChildInterface does implement InterfaceAssembly.IBaseInterface +Description: TypeNamespace.IChildTestInterface does implement TypeNamespace.ITestInterface Message: -"Interfaces that are "InterfaceAssembly.IChildInterface" should not implement any "InterfaceAssembly.IBaseInterface" or "InterfaceAssembly.IOtherBaseInterface"" failed: - InterfaceAssembly.IChildInterface does implement InterfaceAssembly.IBaseInterface +"Interfaces that are "TypeNamespace.IChildTestInterface" should not implement any "TypeNamespace.ITestInterface" or "TypeNamespace.IOtherTestInterface"" failed: + TypeNamespace.IChildTestInterface does implement TypeNamespace.ITestInterface -Query: Interfaces that are "InterfaceAssembly.IChildInterface" should not implement any Interfaces that are "InterfaceAssembly.IBaseInterface" or "InterfaceAssembly.IOtherBaseInterface" +Query: Interfaces that are "TypeNamespace.IChildTestInterface" should not implement any Interfaces that are "TypeNamespace.ITestInterface" or "TypeNamespace.IOtherTestInterface" Result: False -Description: InterfaceAssembly.IChildInterface does implement InterfaceAssembly.IBaseInterface +Description: TypeNamespace.IChildTestInterface does implement TypeNamespace.ITestInterface Message: -"Interfaces that are "InterfaceAssembly.IChildInterface" should not implement any Interfaces that are "InterfaceAssembly.IBaseInterface" or "InterfaceAssembly.IOtherBaseInterface"" failed: - InterfaceAssembly.IChildInterface does implement InterfaceAssembly.IBaseInterface +"Interfaces that are "TypeNamespace.IChildTestInterface" should not implement any Interfaces that are "TypeNamespace.ITestInterface" or "TypeNamespace.IOtherTestInterface"" failed: + TypeNamespace.IChildTestInterface does implement TypeNamespace.ITestInterface ----- Predicates ----- -Query: Interfaces that are "InterfaceAssembly.IChildInterface" should be Interfaces that do not implement any "InterfaceAssembly.IBaseInterface" or "InterfaceAssembly.IOtherBaseInterface" -Result: False -Description: InterfaceAssembly.IChildInterface is not Interfaces that do not implement any "InterfaceAssembly.IBaseInterface" or "InterfaceAssembly.IOtherBaseInterface" -Message: -"Interfaces that are "InterfaceAssembly.IChildInterface" should be Interfaces that do not implement any "InterfaceAssembly.IBaseInterface" or "InterfaceAssembly.IOtherBaseInterface"" failed: - InterfaceAssembly.IChildInterface is not Interfaces that do not implement any "InterfaceAssembly.IBaseInterface" or "InterfaceAssembly.IOtherBaseInterface" - - - -Query: Interfaces that are "InterfaceAssembly.IChildInterface" should be Interfaces that do not implement any "InterfaceAssembly.IBaseInterface" or "InterfaceAssembly.IOtherBaseInterface" -Result: False -Description: InterfaceAssembly.IChildInterface is not Interfaces that do not implement any "InterfaceAssembly.IBaseInterface" or "InterfaceAssembly.IOtherBaseInterface" -Message: -"Interfaces that are "InterfaceAssembly.IChildInterface" should be Interfaces that do not implement any "InterfaceAssembly.IBaseInterface" or "InterfaceAssembly.IOtherBaseInterface"" failed: - InterfaceAssembly.IChildInterface is not Interfaces that do not implement any "InterfaceAssembly.IBaseInterface" or "InterfaceAssembly.IOtherBaseInterface" - - - -Query: Interfaces that are "InterfaceAssembly.IChildInterface" should be Interfaces that do not implement any "InterfaceAssembly.IBaseInterface" or "InterfaceAssembly.IOtherBaseInterface" -Result: False -Description: InterfaceAssembly.IChildInterface is not Interfaces that do not implement any "InterfaceAssembly.IBaseInterface" or "InterfaceAssembly.IOtherBaseInterface" -Message: -"Interfaces that are "InterfaceAssembly.IChildInterface" should be Interfaces that do not implement any "InterfaceAssembly.IBaseInterface" or "InterfaceAssembly.IOtherBaseInterface"" failed: - InterfaceAssembly.IChildInterface is not Interfaces that do not implement any "InterfaceAssembly.IBaseInterface" or "InterfaceAssembly.IOtherBaseInterface" - - - -Query: Interfaces that are "InterfaceAssembly.IChildInterface" should be Interfaces that do not implement any "InterfaceAssembly.IBaseInterface" or "InterfaceAssembly.IOtherBaseInterface" -Result: False -Description: InterfaceAssembly.IChildInterface is not Interfaces that do not implement any "InterfaceAssembly.IBaseInterface" or "InterfaceAssembly.IOtherBaseInterface" -Message: -"Interfaces that are "InterfaceAssembly.IChildInterface" should be Interfaces that do not implement any "InterfaceAssembly.IBaseInterface" or "InterfaceAssembly.IOtherBaseInterface"" failed: - InterfaceAssembly.IChildInterface is not Interfaces that do not implement any "InterfaceAssembly.IBaseInterface" or "InterfaceAssembly.IOtherBaseInterface" - - - -Query: Interfaces that are "InterfaceAssembly.IChildInterface" should be Interfaces that do not implement any Interfaces that are "InterfaceAssembly.IBaseInterface" or "InterfaceAssembly.IOtherBaseInterface" -Result: False -Description: InterfaceAssembly.IChildInterface is not Interfaces that do not implement any Interfaces that are "InterfaceAssembly.IBaseInterface" or "InterfaceAssembly.IOtherBaseInterface" -Message: -"Interfaces that are "InterfaceAssembly.IChildInterface" should be Interfaces that do not implement any Interfaces that are "InterfaceAssembly.IBaseInterface" or "InterfaceAssembly.IOtherBaseInterface"" failed: - InterfaceAssembly.IChildInterface is not Interfaces that do not implement any Interfaces that are "InterfaceAssembly.IBaseInterface" or "InterfaceAssembly.IOtherBaseInterface" - - - ------ Predicates as conditions ----- - -Query: Interfaces that are "InterfaceAssembly.IChildInterface" should be types that do not implement any "InterfaceAssembly.IBaseInterface" or "InterfaceAssembly.IOtherBaseInterface" +Query: Interfaces that are "TypeNamespace.IChildTestInterface" should be Interfaces that do not implement any "TypeNamespace.ITestInterface" or "TypeNamespace.IOtherTestInterface" Result: False -Description: InterfaceAssembly.IChildInterface is not "InterfaceAssembly.IBaseInterface" or "InterfaceAssembly.IOtherBaseInterface" or "InterfaceAssembly.IInterfaceWithoutDependencies" 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.String" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" +Description: TypeNamespace.IChildTestInterface is not Interfaces that do not implement any "TypeNamespace.ITestInterface" or "TypeNamespace.IOtherTestInterface" Message: -"Interfaces that are "InterfaceAssembly.IChildInterface" should be types that do not implement any "InterfaceAssembly.IBaseInterface" or "InterfaceAssembly.IOtherBaseInterface"" failed: - InterfaceAssembly.IChildInterface is not "InterfaceAssembly.IBaseInterface" or "InterfaceAssembly.IOtherBaseInterface" or "InterfaceAssembly.IInterfaceWithoutDependencies" 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.String" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" +"Interfaces that are "TypeNamespace.IChildTestInterface" should be Interfaces that do not implement any "TypeNamespace.ITestInterface" or "TypeNamespace.IOtherTestInterface"" failed: + TypeNamespace.IChildTestInterface is not Interfaces that do not implement any "TypeNamespace.ITestInterface" or "TypeNamespace.IOtherTestInterface" -Query: Interfaces that are "InterfaceAssembly.IChildInterface" should be types that do not implement any "InterfaceAssembly.IBaseInterface" or "InterfaceAssembly.IOtherBaseInterface" +Query: Interfaces that are "TypeNamespace.IChildTestInterface" should be Interfaces that do not implement any "TypeNamespace.ITestInterface" or "TypeNamespace.IOtherTestInterface" Result: False -Description: InterfaceAssembly.IChildInterface is not "InterfaceAssembly.IBaseInterface" or "InterfaceAssembly.IOtherBaseInterface" or "InterfaceAssembly.IInterfaceWithoutDependencies" 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.String" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" +Description: TypeNamespace.IChildTestInterface is not Interfaces that do not implement any "TypeNamespace.ITestInterface" or "TypeNamespace.IOtherTestInterface" Message: -"Interfaces that are "InterfaceAssembly.IChildInterface" should be types that do not implement any "InterfaceAssembly.IBaseInterface" or "InterfaceAssembly.IOtherBaseInterface"" failed: - InterfaceAssembly.IChildInterface is not "InterfaceAssembly.IBaseInterface" or "InterfaceAssembly.IOtherBaseInterface" or "InterfaceAssembly.IInterfaceWithoutDependencies" 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.String" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" +"Interfaces that are "TypeNamespace.IChildTestInterface" should be Interfaces that do not implement any "TypeNamespace.ITestInterface" or "TypeNamespace.IOtherTestInterface"" failed: + TypeNamespace.IChildTestInterface is not Interfaces that do not implement any "TypeNamespace.ITestInterface" or "TypeNamespace.IOtherTestInterface" -Query: Interfaces that are "InterfaceAssembly.IChildInterface" should be types that do not implement any "InterfaceAssembly.IBaseInterface" or "InterfaceAssembly.IOtherBaseInterface" +Query: Interfaces that are "TypeNamespace.IChildTestInterface" should be Interfaces that do not implement any "TypeNamespace.ITestInterface" or "TypeNamespace.IOtherTestInterface" Result: False -Description: InterfaceAssembly.IChildInterface is not "InterfaceAssembly.IBaseInterface" or "InterfaceAssembly.IOtherBaseInterface" or "InterfaceAssembly.IInterfaceWithoutDependencies" 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.String" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" +Description: TypeNamespace.IChildTestInterface is not Interfaces that do not implement any "TypeNamespace.ITestInterface" or "TypeNamespace.IOtherTestInterface" Message: -"Interfaces that are "InterfaceAssembly.IChildInterface" should be types that do not implement any "InterfaceAssembly.IBaseInterface" or "InterfaceAssembly.IOtherBaseInterface"" failed: - InterfaceAssembly.IChildInterface is not "InterfaceAssembly.IBaseInterface" or "InterfaceAssembly.IOtherBaseInterface" or "InterfaceAssembly.IInterfaceWithoutDependencies" 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.String" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" +"Interfaces that are "TypeNamespace.IChildTestInterface" should be Interfaces that do not implement any "TypeNamespace.ITestInterface" or "TypeNamespace.IOtherTestInterface"" failed: + TypeNamespace.IChildTestInterface is not Interfaces that do not implement any "TypeNamespace.ITestInterface" or "TypeNamespace.IOtherTestInterface" -Query: Interfaces that are "InterfaceAssembly.IChildInterface" should be types that do not implement any "InterfaceAssembly.IBaseInterface" or "InterfaceAssembly.IOtherBaseInterface" +Query: Interfaces that are "TypeNamespace.IChildTestInterface" should be Interfaces that do not implement any "TypeNamespace.ITestInterface" or "TypeNamespace.IOtherTestInterface" Result: False -Description: InterfaceAssembly.IChildInterface is not "InterfaceAssembly.IBaseInterface" or "InterfaceAssembly.IOtherBaseInterface" or "InterfaceAssembly.IInterfaceWithoutDependencies" 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.String" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" +Description: TypeNamespace.IChildTestInterface is not Interfaces that do not implement any "TypeNamespace.ITestInterface" or "TypeNamespace.IOtherTestInterface" Message: -"Interfaces that are "InterfaceAssembly.IChildInterface" should be types that do not implement any "InterfaceAssembly.IBaseInterface" or "InterfaceAssembly.IOtherBaseInterface"" failed: - InterfaceAssembly.IChildInterface is not "InterfaceAssembly.IBaseInterface" or "InterfaceAssembly.IOtherBaseInterface" or "InterfaceAssembly.IInterfaceWithoutDependencies" 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.String" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" +"Interfaces that are "TypeNamespace.IChildTestInterface" should be Interfaces that do not implement any "TypeNamespace.ITestInterface" or "TypeNamespace.IOtherTestInterface"" failed: + TypeNamespace.IChildTestInterface is not Interfaces that do not implement any "TypeNamespace.ITestInterface" or "TypeNamespace.IOtherTestInterface" -Query: Interfaces that are "InterfaceAssembly.IChildInterface" should be types that do not implement any Interfaces that are "InterfaceAssembly.IBaseInterface" or "InterfaceAssembly.IOtherBaseInterface" +Query: Interfaces that are "TypeNamespace.IChildTestInterface" should be Interfaces that do not implement any Interfaces that are "TypeNamespace.ITestInterface" or "TypeNamespace.IOtherTestInterface" Result: False -Description: InterfaceAssembly.IChildInterface is not "InterfaceAssembly.IBaseInterface" or "InterfaceAssembly.IOtherBaseInterface" or "InterfaceAssembly.IInterfaceWithoutDependencies" 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.String" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" +Description: TypeNamespace.IChildTestInterface is not Interfaces that do not implement any Interfaces that are "TypeNamespace.ITestInterface" or "TypeNamespace.IOtherTestInterface" Message: -"Interfaces that are "InterfaceAssembly.IChildInterface" should be types that do not implement any Interfaces that are "InterfaceAssembly.IBaseInterface" or "InterfaceAssembly.IOtherBaseInterface"" failed: - InterfaceAssembly.IChildInterface is not "InterfaceAssembly.IBaseInterface" or "InterfaceAssembly.IOtherBaseInterface" or "InterfaceAssembly.IInterfaceWithoutDependencies" 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.String" or "System.Reflection.AssemblyCompanyAttribute" or "System.Reflection.AssemblyConfigurationAttribute" or "System.Reflection.AssemblyFileVersionAttribute" or "System.Reflection.AssemblyInformationalVersionAttribute" or "System.Reflection.AssemblyProductAttribute" or "System.Reflection.AssemblyTitleAttribute" +"Interfaces that are "TypeNamespace.IChildTestInterface" should be Interfaces that do not implement any Interfaces that are "TypeNamespace.ITestInterface" or "TypeNamespace.IOtherTestInterface"" failed: + TypeNamespace.IChildTestInterface is not Interfaces that do not implement any Interfaces that are "TypeNamespace.ITestInterface" or "TypeNamespace.IOtherTestInterface" ----- Complex conditions ----- -Query: Interfaces that are "InterfaceAssembly.IChildInterface" should not implement any interfaces that are "InterfaceAssembly.IBaseInterface" or "InterfaceAssembly.IOtherBaseInterface" +Query: Interfaces that are "TypeNamespace.IChildTestInterface" should not implement any interfaces that are "TypeNamespace.ITestInterface" or "TypeNamespace.IOtherTestInterface" Result: False -Description: InterfaceAssembly.IChildInterface does implement InterfaceAssembly.IBaseInterface +Description: TypeNamespace.IChildTestInterface does implement TypeNamespace.ITestInterface Message: -"Interfaces that are "InterfaceAssembly.IChildInterface" should not implement any interfaces that are "InterfaceAssembly.IBaseInterface" or "InterfaceAssembly.IOtherBaseInterface"" failed: - InterfaceAssembly.IChildInterface does implement InterfaceAssembly.IBaseInterface +"Interfaces that are "TypeNamespace.IChildTestInterface" should not implement any interfaces that are "TypeNamespace.ITestInterface" or "TypeNamespace.IOtherTestInterface"" failed: + TypeNamespace.IChildTestInterface does implement TypeNamespace.ITestInterface diff --git a/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/TypeSyntaxElementsTests.NotImplementInterfaceTest.verified.txt b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/TypeSyntaxElementsTests.NotImplementInterfaceTest.verified.txt new file mode 100644 index 000000000..cf9fc63ed --- /dev/null +++ b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/TypeSyntaxElementsTests.NotImplementInterfaceTest.verified.txt @@ -0,0 +1,103 @@ +===== No Violations ===== + +----- Conditions ----- + +Query: Types that are "TypeNamespace.ClassNotImplementingInterface" should not implement interface "TypeNamespace.ITestInterface" +Result: True +Description: TypeNamespace.ClassNotImplementingInterface passed +Message: +All Evaluations passed + +Query: Types that are "TypeNamespace.ClassNotImplementingInterface" should not implement interface "TypeNamespace.ITestInterface" +Result: True +Description: TypeNamespace.ClassNotImplementingInterface passed +Message: +All Evaluations passed + +----- Predicates ----- + +Query: Types that are "TypeNamespace.ClassNotImplementingInterface" should be Types that do not implement interface "TypeNamespace.ITestInterface" +Result: True +Description: TypeNamespace.ClassNotImplementingInterface passed +Message: +All Evaluations passed + +Query: Types that are "TypeNamespace.ClassNotImplementingInterface" should be Types that do not implement interface "TypeNamespace.ITestInterface" +Result: True +Description: TypeNamespace.ClassNotImplementingInterface passed +Message: +All Evaluations passed + +===== Violations ===== + +----- Conditions ----- + +Query: Types that are "TypeNamespace.ClassImplementingInterface" should not implement interface "TypeNamespace.ITestInterface" +Result: False +Description: TypeNamespace.ClassImplementingInterface does implement interface "TypeNamespace.ITestInterface" +Message: +"Types that are "TypeNamespace.ClassImplementingInterface" should not implement interface "TypeNamespace.ITestInterface"" failed: + TypeNamespace.ClassImplementingInterface does implement interface "TypeNamespace.ITestInterface" + + + +Query: Types that are "TypeNamespace.ClassImplementingInterface" should not implement interface "TypeNamespace.ITestInterface" +Result: False +Description: TypeNamespace.ClassImplementingInterface does implement interface "TypeNamespace.ITestInterface" +Message: +"Types that are "TypeNamespace.ClassImplementingInterface" should not implement interface "TypeNamespace.ITestInterface"" failed: + TypeNamespace.ClassImplementingInterface does implement interface "TypeNamespace.ITestInterface" + + + +----- Predicates ----- + +Query: Types that are "TypeNamespace.ClassImplementingInterface" should be Types that do not implement interface "TypeNamespace.ITestInterface" +Result: False +Description: TypeNamespace.ClassImplementingInterface is not Types that do not implement interface "TypeNamespace.ITestInterface" +Message: +"Types that are "TypeNamespace.ClassImplementingInterface" should be Types that do not implement interface "TypeNamespace.ITestInterface"" failed: + TypeNamespace.ClassImplementingInterface is not Types that do not implement interface "TypeNamespace.ITestInterface" + + + +Query: Types that are "TypeNamespace.ClassImplementingInterface" should be Types that do not implement interface "TypeNamespace.ITestInterface" +Result: False +Description: TypeNamespace.ClassImplementingInterface is not Types that do not implement interface "TypeNamespace.ITestInterface" +Message: +"Types that are "TypeNamespace.ClassImplementingInterface" should be Types that do not implement interface "TypeNamespace.ITestInterface"" failed: + TypeNamespace.ClassImplementingInterface is not Types that do not implement interface "TypeNamespace.ITestInterface" + + + +===== Multiple inputs ===== + +Query: Types that are "TypeNamespace.ClassNotImplementingInterface" or "TypeNamespace.ClassImplementingInterface" should not implement interface "TypeNamespace.ITestInterface" +Result: False +Description: TypeNamespace.ClassImplementingInterface does implement interface "TypeNamespace.ITestInterface" +Result: True +Description: TypeNamespace.ClassNotImplementingInterface passed +Message: +"Types that are "TypeNamespace.ClassNotImplementingInterface" or "TypeNamespace.ClassImplementingInterface" should not implement interface "TypeNamespace.ITestInterface"" failed: + TypeNamespace.ClassImplementingInterface does implement interface "TypeNamespace.ITestInterface" + + + +===== Type not in architecture ===== + +----- Conditions ----- + +Query: Types that are "TypeNamespace.ClassImplementingInterface" should not implement interface "System.IDisposable" +Result: True +Description: TypeNamespace.ClassImplementingInterface passed +Message: +All Evaluations passed + +----- Predicates ----- + +Query: Types that are "TypeNamespace.ClassImplementingInterface" should be Types that do not implement interface "System.IDisposable" +Result: True +Description: TypeNamespace.ClassImplementingInterface passed +Message: +All Evaluations passed + diff --git a/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/TypeSyntaxElementsTests.NotResideInAssemblyTest.verified.txt b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/TypeSyntaxElementsTests.NotResideInAssemblyTest.verified.txt new file mode 100644 index 000000000..a5bb432bf --- /dev/null +++ b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/TypeSyntaxElementsTests.NotResideInAssemblyTest.verified.txt @@ -0,0 +1,160 @@ +===== No Violations ===== + +----- Conditions ----- + +Query: Types that are "TypeNamespace.RegularClass" should not reside in assembly with full name "NonExistentAssembly" +Result: True +Description: TypeNamespace.RegularClass passed +Message: +All Evaluations passed + +Query: Types that are "TypeNamespace.RegularClass" should not reside in assembly with full name matching "NonExistent.*" +Result: True +Description: TypeNamespace.RegularClass passed +Message: +All Evaluations passed + +----- Predicates ----- + +Query: Types that are "TypeNamespace.RegularClass" should be Types that do not reside in assembly with full name "NonExistentAssembly" +Result: True +Description: TypeNamespace.RegularClass passed +Message: +All Evaluations passed + +Query: Types that are "TypeNamespace.RegularClass" should be Types that do not reside in assembly with full name matching "NonExistent.*" +Result: True +Description: TypeNamespace.RegularClass passed +Message: +All Evaluations passed + +===== Violations ===== + +----- Conditions ----- + +Query: Types that are "TypeNamespace.RegularClass" should not reside in assembly "TypeAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=015ff5fd0dc0bfa4" +Result: False +Description: TypeNamespace.RegularClass does reside in TypeAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=015ff5fd0dc0bfa4 +Message: +"Types that are "TypeNamespace.RegularClass" should not reside in assembly "TypeAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=015ff5fd0dc0bfa4"" failed: + TypeNamespace.RegularClass does reside in TypeAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=015ff5fd0dc0bfa4 + + + +Query: Types that are "TypeNamespace.RegularClass" should not reside in assembly "TypeAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=015ff5fd0dc0bfa4" +Result: False +Description: TypeNamespace.RegularClass does reside in TypeAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=015ff5fd0dc0bfa4 +Message: +"Types that are "TypeNamespace.RegularClass" should not reside in assembly "TypeAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=015ff5fd0dc0bfa4"" failed: + TypeNamespace.RegularClass does reside in TypeAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=015ff5fd0dc0bfa4 + + + +Query: Types that are "TypeNamespace.RegularClass" should not reside in assembly with full name "TypeAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=015ff5fd0dc0bfa4" +Result: False +Description: TypeNamespace.RegularClass does reside in TypeAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=015ff5fd0dc0bfa4 +Message: +"Types that are "TypeNamespace.RegularClass" should not reside in assembly with full name "TypeAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=015ff5fd0dc0bfa4"" failed: + TypeNamespace.RegularClass does reside in TypeAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=015ff5fd0dc0bfa4 + + + +Query: Types that are "TypeNamespace.RegularClass" should not reside in assembly with full name matching "TypeAssembly.*" +Result: False +Description: TypeNamespace.RegularClass does reside in TypeAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=015ff5fd0dc0bfa4 +Message: +"Types that are "TypeNamespace.RegularClass" should not reside in assembly with full name matching "TypeAssembly.*"" failed: + TypeNamespace.RegularClass does reside in TypeAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=015ff5fd0dc0bfa4 + + + +----- Predicates ----- + +Query: Types that are "TypeNamespace.RegularClass" should be Types that do not reside in assembly "TypeAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=015ff5fd0dc0bfa4" +Result: False +Description: TypeNamespace.RegularClass is not Types that do not reside in assembly "TypeAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=015ff5fd0dc0bfa4" +Message: +"Types that are "TypeNamespace.RegularClass" should be Types that do not reside in assembly "TypeAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=015ff5fd0dc0bfa4"" failed: + TypeNamespace.RegularClass is not Types that do not reside in assembly "TypeAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=015ff5fd0dc0bfa4" + + + +Query: Types that are "TypeNamespace.RegularClass" should be Types that do not reside in assembly "TypeAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=015ff5fd0dc0bfa4" +Result: False +Description: TypeNamespace.RegularClass is not Types that do not reside in assembly "TypeAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=015ff5fd0dc0bfa4" +Message: +"Types that are "TypeNamespace.RegularClass" should be Types that do not reside in assembly "TypeAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=015ff5fd0dc0bfa4"" failed: + TypeNamespace.RegularClass is not Types that do not reside in assembly "TypeAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=015ff5fd0dc0bfa4" + + + +Query: Types that are "TypeNamespace.RegularClass" should be Types that do not reside in assembly with full name "TypeAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=015ff5fd0dc0bfa4" +Result: False +Description: TypeNamespace.RegularClass is not Types that do not reside in assembly with full name "TypeAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=015ff5fd0dc0bfa4" +Message: +"Types that are "TypeNamespace.RegularClass" should be Types that do not reside in assembly with full name "TypeAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=015ff5fd0dc0bfa4"" failed: + TypeNamespace.RegularClass is not Types that do not reside in assembly with full name "TypeAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=015ff5fd0dc0bfa4" + + + +Query: Types that are "TypeNamespace.RegularClass" should be Types that do not reside in assembly with full name matching "TypeAssembly.*" +Result: False +Description: TypeNamespace.RegularClass is not Types that do not reside in assembly with full name matching "TypeAssembly.*" +Message: +"Types that are "TypeNamespace.RegularClass" should be Types that do not reside in assembly with full name matching "TypeAssembly.*"" failed: + TypeNamespace.RegularClass is not Types that do not reside in assembly with full name matching "TypeAssembly.*" + + + +===== Multiple inputs ===== + +Query: Types that are "TypeNamespace.RegularClass" or "TypeNamespace.OtherRegularClass" should not reside in assembly with full name "NonExistentAssembly" +Result: True +Description: TypeNamespace.RegularClass passed +Result: True +Description: TypeNamespace.OtherRegularClass passed +Message: +All Evaluations passed + +===== Multiple assemblies ===== + +----- Conditions ----- + +Query: Types that are "TypeNamespace.RegularClass" should not reside in assembly "TypeAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=015ff5fd0dc0bfa4" or "TypeAssembly, Version=1.0.0.0, Culture... +Result: False +Description: TypeNamespace.RegularClass does reside in TypeAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=015ff5fd0dc0bfa4 +Message: +"Types that are "TypeNamespace.RegularClass" should not reside in assembly "TypeAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=015ff5fd0dc0bfa4" or "TypeAssembly, Version=1.0.0.0, Culture..." failed: + TypeNamespace.RegularClass does reside in TypeAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=015ff5fd0dc0bfa4 + + + +Query: Types that are "TypeNamespace.RegularClass" should not reside in assembly "TypeAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=015ff5fd0dc0bfa4" or "TypeAssembly, Version=1.0.0.0, Culture... +Result: False +Description: TypeNamespace.RegularClass does reside in TypeAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=015ff5fd0dc0bfa4 +Message: +"Types that are "TypeNamespace.RegularClass" should not reside in assembly "TypeAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=015ff5fd0dc0bfa4" or "TypeAssembly, Version=1.0.0.0, Culture..." failed: + TypeNamespace.RegularClass does reside in TypeAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=015ff5fd0dc0bfa4 + + + +----- Predicates ----- + +Query: Types that are "TypeNamespace.RegularClass" should be Types that do not reside in assembly "TypeAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=015ff5fd0dc0bfa4" or "TypeAssembly, Version... +Result: False +Description: TypeNamespace.RegularClass is not Types that do not reside in assembly "TypeAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=015ff5fd0dc0bfa4" or "TypeAssembly, Version=1.0.0.0, Cult... +Message: +"Types that are "TypeNamespace.RegularClass" should be Types that do not reside in assembly "TypeAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=015ff5fd0dc0bfa4" or "TypeAssembly, Version..." failed: + TypeNamespace.RegularClass is not Types that do not reside in assembly "TypeAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=015ff5fd0dc0bfa4" or "TypeAssembly, Version=1.0.0.0, Cult... + + + +Query: Types that are "TypeNamespace.RegularClass" should be Types that do not reside in assembly "TypeAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=015ff5fd0dc0bfa4" or "TypeAssembly, Version... +Result: False +Description: TypeNamespace.RegularClass is not Types that do not reside in assembly "TypeAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=015ff5fd0dc0bfa4" or "TypeAssembly, Version=1.0.0.0, Cult... +Message: +"Types that are "TypeNamespace.RegularClass" should be Types that do not reside in assembly "TypeAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=015ff5fd0dc0bfa4" or "TypeAssembly, Version..." failed: + TypeNamespace.RegularClass is not Types that do not reside in assembly "TypeAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=015ff5fd0dc0bfa4" or "TypeAssembly, Version=1.0.0.0, Cult... + + + diff --git a/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/TypeSyntaxElementsTests.NotResideInNamespaceMatchingTest.verified.txt b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/TypeSyntaxElementsTests.NotResideInNamespaceMatchingTest.verified.txt new file mode 100644 index 000000000..16f53712d --- /dev/null +++ b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/TypeSyntaxElementsTests.NotResideInNamespaceMatchingTest.verified.txt @@ -0,0 +1,52 @@ +===== No Violations ===== + +----- Conditions ----- + +Query: Types that are "TypeNamespace.RegularClass" should not reside in namespace with full name matching "NonExistent.*" +Result: True +Description: TypeNamespace.RegularClass passed +Message: +All Evaluations passed + +----- Predicates ----- + +Query: Types that are "TypeNamespace.RegularClass" should be Types that do not reside in namespace with full name matching "NonExistent.*" +Result: True +Description: TypeNamespace.RegularClass passed +Message: +All Evaluations passed + +===== Violations ===== + +----- Conditions ----- + +Query: Types that are "TypeNamespace.RegularClass" should not reside in namespace with full name matching "TypeName.*" +Result: False +Description: TypeNamespace.RegularClass does reside in TypeNamespace +Message: +"Types that are "TypeNamespace.RegularClass" should not reside in namespace with full name matching "TypeName.*"" failed: + TypeNamespace.RegularClass does reside in TypeNamespace + + + +----- Predicates ----- + +Query: Types that are "TypeNamespace.RegularClass" should be Types that do not reside in namespace with full name matching "TypeName.*" +Result: False +Description: TypeNamespace.RegularClass is not Types that do not reside in namespace with full name matching "TypeName.*" +Message: +"Types that are "TypeNamespace.RegularClass" should be Types that do not reside in namespace with full name matching "TypeName.*"" failed: + TypeNamespace.RegularClass is not Types that do not reside in namespace with full name matching "TypeName.*" + + + +===== Multiple inputs ===== + +Query: Types that are "TypeNamespace.RegularClass" or "TypeNamespace.OtherRegularClass" should not reside in namespace with full name matching "NonExistent.*" +Result: True +Description: TypeNamespace.RegularClass passed +Result: True +Description: TypeNamespace.OtherRegularClass passed +Message: +All Evaluations passed + diff --git a/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/TypeSyntaxElementsTests.NotResideInNamespaceTest.verified.txt b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/TypeSyntaxElementsTests.NotResideInNamespaceTest.verified.txt new file mode 100644 index 000000000..62ddb2836 --- /dev/null +++ b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/TypeSyntaxElementsTests.NotResideInNamespaceTest.verified.txt @@ -0,0 +1,52 @@ +===== No Violations ===== + +----- Conditions ----- + +Query: Types that are "TypeNamespace.RegularClass" should not reside in namespace with full name "NonExistentNamespace" +Result: True +Description: TypeNamespace.RegularClass passed +Message: +All Evaluations passed + +----- Predicates ----- + +Query: Types that are "TypeNamespace.RegularClass" should be Types that do not reside in namespace with full name "NonExistentNamespace" +Result: True +Description: TypeNamespace.RegularClass passed +Message: +All Evaluations passed + +===== Violations ===== + +----- Conditions ----- + +Query: Types that are "TypeNamespace.RegularClass" should not reside in namespace with full name "TypeNamespace" +Result: False +Description: TypeNamespace.RegularClass does reside in TypeNamespace +Message: +"Types that are "TypeNamespace.RegularClass" should not reside in namespace with full name "TypeNamespace"" failed: + TypeNamespace.RegularClass does reside in TypeNamespace + + + +----- Predicates ----- + +Query: Types that are "TypeNamespace.RegularClass" should be Types that do not reside in namespace with full name "TypeNamespace" +Result: False +Description: TypeNamespace.RegularClass is not Types that do not reside in namespace with full name "TypeNamespace" +Message: +"Types that are "TypeNamespace.RegularClass" should be Types that do not reside in namespace with full name "TypeNamespace"" failed: + TypeNamespace.RegularClass is not Types that do not reside in namespace with full name "TypeNamespace" + + + +===== Multiple inputs ===== + +Query: Types that are "TypeNamespace.RegularClass" or "TypeNamespace.OtherRegularClass" should not reside in namespace with full name "NonExistentNamespace" +Result: True +Description: TypeNamespace.RegularClass passed +Result: True +Description: TypeNamespace.OtherRegularClass passed +Message: +All Evaluations passed + diff --git a/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/TypeSyntaxElementsTests.ResideInAssemblyTest.verified.txt b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/TypeSyntaxElementsTests.ResideInAssemblyTest.verified.txt new file mode 100644 index 000000000..6681633fb --- /dev/null +++ b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/TypeSyntaxElementsTests.ResideInAssemblyTest.verified.txt @@ -0,0 +1,136 @@ +===== No Violations ===== + +----- Conditions ----- + +Query: Types that are "TypeNamespace.RegularClass" should reside in assembly "TypeAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=015ff5fd0dc0bfa4" +Result: True +Description: TypeNamespace.RegularClass passed +Message: +All Evaluations passed + +Query: Types that are "TypeNamespace.RegularClass" should reside in assembly "TypeAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=015ff5fd0dc0bfa4" +Result: True +Description: TypeNamespace.RegularClass passed +Message: +All Evaluations passed + +Query: Types that are "TypeNamespace.RegularClass" should reside in assembly with full name "TypeAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=015ff5fd0dc0bfa4" +Result: True +Description: TypeNamespace.RegularClass passed +Message: +All Evaluations passed + +Query: Types that are "TypeNamespace.RegularClass" should reside in assembly with full name matching "TypeAssembly.*" +Result: True +Description: TypeNamespace.RegularClass passed +Message: +All Evaluations passed + +----- Predicates ----- + +Query: Types that are "TypeNamespace.RegularClass" should be Types that reside in assembly "TypeAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=015ff5fd0dc0bfa4" +Result: True +Description: TypeNamespace.RegularClass passed +Message: +All Evaluations passed + +Query: Types that are "TypeNamespace.RegularClass" should be Types that reside in assembly "TypeAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=015ff5fd0dc0bfa4" +Result: True +Description: TypeNamespace.RegularClass passed +Message: +All Evaluations passed + +Query: Types that are "TypeNamespace.RegularClass" should be Types that reside in assembly with full name "TypeAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=015ff5fd0dc0bfa4" +Result: True +Description: TypeNamespace.RegularClass passed +Message: +All Evaluations passed + +Query: Types that are "TypeNamespace.RegularClass" should be Types that reside in assembly with full name matching "TypeAssembly.*" +Result: True +Description: TypeNamespace.RegularClass passed +Message: +All Evaluations passed + +===== Violations ===== + +----- Conditions ----- + +Query: Types that are "TypeNamespace.RegularClass" should reside in assembly with full name "NonExistentAssembly" +Result: False +Description: TypeNamespace.RegularClass does reside in TypeAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=015ff5fd0dc0bfa4 +Message: +"Types that are "TypeNamespace.RegularClass" should reside in assembly with full name "NonExistentAssembly"" failed: + TypeNamespace.RegularClass does reside in TypeAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=015ff5fd0dc0bfa4 + + + +Query: Types that are "TypeNamespace.RegularClass" should reside in assembly with full name matching "NonExistent.*" +Result: False +Description: TypeNamespace.RegularClass does reside in TypeAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=015ff5fd0dc0bfa4 +Message: +"Types that are "TypeNamespace.RegularClass" should reside in assembly with full name matching "NonExistent.*"" failed: + TypeNamespace.RegularClass does reside in TypeAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=015ff5fd0dc0bfa4 + + + +----- Predicates ----- + +Query: Types that are "TypeNamespace.RegularClass" should be Types that reside in assembly with full name "NonExistentAssembly" +Result: False +Description: TypeNamespace.RegularClass is not Types that reside in assembly with full name "NonExistentAssembly" +Message: +"Types that are "TypeNamespace.RegularClass" should be Types that reside in assembly with full name "NonExistentAssembly"" failed: + TypeNamespace.RegularClass is not Types that reside in assembly with full name "NonExistentAssembly" + + + +Query: Types that are "TypeNamespace.RegularClass" should be Types that reside in assembly with full name matching "NonExistent.*" +Result: False +Description: TypeNamespace.RegularClass is not Types that reside in assembly with full name matching "NonExistent.*" +Message: +"Types that are "TypeNamespace.RegularClass" should be Types that reside in assembly with full name matching "NonExistent.*"" failed: + TypeNamespace.RegularClass is not Types that reside in assembly with full name matching "NonExistent.*" + + + +===== Multiple inputs ===== + +Query: Types that are "TypeNamespace.RegularClass" or "TypeNamespace.OtherRegularClass" should reside in assembly with full name "TypeAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=015ff5fd0dc0bfa4" +Result: True +Description: TypeNamespace.RegularClass passed +Result: True +Description: TypeNamespace.OtherRegularClass passed +Message: +All Evaluations passed + +===== Multiple assemblies ===== + +----- Conditions ----- + +Query: Types that are "TypeNamespace.RegularClass" should reside in assembly "TypeAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=015ff5fd0dc0bfa4" or "TypeAssembly, Version=1.0.0.0, Culture=neu... +Result: True +Description: TypeNamespace.RegularClass passed +Message: +All Evaluations passed + +Query: Types that are "TypeNamespace.RegularClass" should reside in assembly "TypeAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=015ff5fd0dc0bfa4" or "TypeAssembly, Version=1.0.0.0, Culture=neu... +Result: True +Description: TypeNamespace.RegularClass passed +Message: +All Evaluations passed + +----- Predicates ----- + +Query: Types that are "TypeNamespace.RegularClass" should be Types that reside in assembly "TypeAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=015ff5fd0dc0bfa4" or "TypeAssembly, Version=1.0.0.... +Result: True +Description: TypeNamespace.RegularClass passed +Message: +All Evaluations passed + +Query: Types that are "TypeNamespace.RegularClass" should be Types that reside in assembly "TypeAssembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=015ff5fd0dc0bfa4" or "TypeAssembly, Version=1.0.0.... +Result: True +Description: TypeNamespace.RegularClass passed +Message: +All Evaluations passed + diff --git a/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/TypeSyntaxElementsTests.ResideInNamespaceMatchingTest.verified.txt b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/TypeSyntaxElementsTests.ResideInNamespaceMatchingTest.verified.txt new file mode 100644 index 000000000..7cf5be35f --- /dev/null +++ b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/TypeSyntaxElementsTests.ResideInNamespaceMatchingTest.verified.txt @@ -0,0 +1,52 @@ +===== No Violations ===== + +----- Conditions ----- + +Query: Types that are "TypeNamespace.RegularClass" should reside in namespace with full name matching "TypeName.*" +Result: True +Description: TypeNamespace.RegularClass passed +Message: +All Evaluations passed + +----- Predicates ----- + +Query: Types that are "TypeNamespace.RegularClass" should be Types that reside in namespace with full name matching "TypeName.*" +Result: True +Description: TypeNamespace.RegularClass passed +Message: +All Evaluations passed + +===== Violations ===== + +----- Conditions ----- + +Query: Types that are "TypeNamespace.RegularClass" should reside in namespace with full name matching "NonExistent.*" +Result: False +Description: TypeNamespace.RegularClass does reside in TypeNamespace +Message: +"Types that are "TypeNamespace.RegularClass" should reside in namespace with full name matching "NonExistent.*"" failed: + TypeNamespace.RegularClass does reside in TypeNamespace + + + +----- Predicates ----- + +Query: Types that are "TypeNamespace.RegularClass" should be Types that reside in namespace with full name matching "NonExistent.*" +Result: False +Description: TypeNamespace.RegularClass is not Types that reside in namespace with full name matching "NonExistent.*" +Message: +"Types that are "TypeNamespace.RegularClass" should be Types that reside in namespace with full name matching "NonExistent.*"" failed: + TypeNamespace.RegularClass is not Types that reside in namespace with full name matching "NonExistent.*" + + + +===== Multiple inputs ===== + +Query: Types that are "TypeNamespace.RegularClass" or "TypeNamespace.OtherRegularClass" should reside in namespace with full name matching "TypeName.*" +Result: True +Description: TypeNamespace.RegularClass passed +Result: True +Description: TypeNamespace.OtherRegularClass passed +Message: +All Evaluations passed + diff --git a/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/TypeSyntaxElementsTests.ResideInNamespaceTest.verified.txt b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/TypeSyntaxElementsTests.ResideInNamespaceTest.verified.txt new file mode 100644 index 000000000..68d88e775 --- /dev/null +++ b/ArchUnitNETTests/Fluent/Syntax/Elements/Snapshots/TypeSyntaxElementsTests.ResideInNamespaceTest.verified.txt @@ -0,0 +1,52 @@ +===== No Violations ===== + +----- Conditions ----- + +Query: Types that are "TypeNamespace.RegularClass" should reside in namespace with full name "TypeNamespace" +Result: True +Description: TypeNamespace.RegularClass passed +Message: +All Evaluations passed + +----- Predicates ----- + +Query: Types that are "TypeNamespace.RegularClass" should be Types that reside in namespace with full name "TypeNamespace" +Result: True +Description: TypeNamespace.RegularClass passed +Message: +All Evaluations passed + +===== Violations ===== + +----- Conditions ----- + +Query: Types that are "TypeNamespace.RegularClass" should reside in namespace with full name "NonExistentNamespace" +Result: False +Description: TypeNamespace.RegularClass does reside in TypeNamespace +Message: +"Types that are "TypeNamespace.RegularClass" should reside in namespace with full name "NonExistentNamespace"" failed: + TypeNamespace.RegularClass does reside in TypeNamespace + + + +----- Predicates ----- + +Query: Types that are "TypeNamespace.RegularClass" should be Types that reside in namespace with full name "NonExistentNamespace" +Result: False +Description: TypeNamespace.RegularClass is not Types that reside in namespace with full name "NonExistentNamespace" +Message: +"Types that are "TypeNamespace.RegularClass" should be Types that reside in namespace with full name "NonExistentNamespace"" failed: + TypeNamespace.RegularClass is not Types that reside in namespace with full name "NonExistentNamespace" + + + +===== Multiple inputs ===== + +Query: Types that are "TypeNamespace.RegularClass" or "TypeNamespace.OtherRegularClass" should reside in namespace with full name "TypeNamespace" +Result: True +Description: TypeNamespace.RegularClass passed +Result: True +Description: TypeNamespace.OtherRegularClass passed +Message: +All Evaluations passed + diff --git a/ArchUnitNETTests/Fluent/Syntax/Elements/TypeSyntaxElementsTests.cs b/ArchUnitNETTests/Fluent/Syntax/Elements/TypeSyntaxElementsTests.cs index fbc3499b6..a7563eec6 100644 --- a/ArchUnitNETTests/Fluent/Syntax/Elements/TypeSyntaxElementsTests.cs +++ b/ArchUnitNETTests/Fluent/Syntax/Elements/TypeSyntaxElementsTests.cs @@ -1,1170 +1,1449 @@ -using System; +using System; using System.Collections.Generic; +using System.IO; using System.Linq; using System.Threading.Tasks; using ArchUnitNET.Domain; -using ArchUnitNET.Domain.Extensions; -using ArchUnitNET.xUnit; +using ArchUnitNET.Domain.Exceptions; +using ArchUnitNET.Loader; using ArchUnitNETTests.AssemblyTestHelper; -using ArchUnitNETTests.Domain; +using ArchUnitNETTests.Domain.PlantUml; +using TestAssembly.Diagram.NoDependencies.Independent; using Xunit; using static ArchUnitNET.Fluent.ArchRuleDefinition; -using static ArchUnitNETTests.Domain.StaticTestTypes; -using Enum = ArchUnitNET.Domain.Enum; namespace ArchUnitNETTests.Fluent.Syntax.Elements { + // csharpier-ignore public class TypeSyntaxElementsTests { - public TypeSyntaxElementsTests() + [Fact] + public async Task BeSystemTypeTest() + { + var helper = new TypeAssemblyTestHelper(); + + helper.AddSnapshotHeader("No Violations"); + var should = Types().That().Are(helper.RegularClass).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should.Be(helper.RegularClassSystemType).AssertNoViolations(helper); + should.Be(new List { helper.RegularClassSystemType }).AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Complex conditions"); + should.BeTypesThat().Are(helper.RegularClass).AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().Are(helper.RegularClassSystemType)).AssertNoViolations(helper); + should.Be(Types().That().Are(new List { helper.RegularClassSystemType })).AssertNoViolations(helper); + + helper.AddSnapshotHeader("Violations"); + should = Types().That().Are(helper.OtherRegularClass).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should.Be(helper.RegularClassSystemType).AssertOnlyViolations(helper); + should.Be(new List { helper.RegularClassSystemType }).AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().Are(helper.RegularClassSystemType)).AssertOnlyViolations(helper); + should.Be(Types().That().Are(new List { helper.RegularClassSystemType })).AssertOnlyViolations(helper); + + helper.AddSnapshotHeader("Empty Arguments (Only Violations)"); + should = Types().That().Are(helper.RegularClass).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should.Be(new List()).AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().Are(new List())).AssertOnlyViolations(helper); + + helper.AddSnapshotHeader("Type not in architecture"); + should = Types().That().Are(helper.RegularClass).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should.Be(typeof(AttributeNamespace.ClassWithoutAttributes)).AssertException(helper); + should.Be(new List { typeof(AttributeNamespace.ClassWithoutAttributes) }).AssertException(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().Are(typeof(AttributeNamespace.ClassWithoutAttributes))).AssertException(helper); + should.Be(Types().That().Are(new List { typeof(AttributeNamespace.ClassWithoutAttributes) })).AssertException(helper); + + helper.AddSnapshotHeader("Multiple arguments"); + should = Types().That().Are(helper.RegularClass).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should.Be(helper.RegularClassSystemType, helper.OtherRegularClassSystemType).AssertNoViolations(helper); + should.Be(new List { helper.RegularClassSystemType, helper.OtherRegularClassSystemType }).AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().Are(helper.RegularClassSystemType, helper.OtherRegularClassSystemType)).AssertNoViolations(helper); + should.Be(Types().That().Are(new List { helper.RegularClassSystemType, helper.OtherRegularClassSystemType })).AssertNoViolations(helper); + + helper.AddSnapshotHeader("Multiple inputs"); + Types().That().Are(helper.RegularClass, helper.OtherRegularClass).Should().Be(helper.RegularClassSystemType).AssertAnyViolations(helper); + + await helper.AssertSnapshotMatches(); + } + + [Fact] + public async Task NotBeSystemTypeTest() + { + var helper = new TypeAssemblyTestHelper(); + + helper.AddSnapshotHeader("No Violations"); + var should = Types().That().Are(helper.OtherRegularClass).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should.NotBe(helper.RegularClassSystemType).AssertNoViolations(helper); + should.NotBe(new List { helper.RegularClassSystemType }).AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().AreNot(helper.RegularClassSystemType)).AssertNoViolations(helper); + should.Be(Types().That().AreNot(new List { helper.RegularClassSystemType })).AssertNoViolations(helper); + + helper.AddSnapshotHeader("Violations"); + should = Types().That().Are(helper.RegularClass).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should.NotBe(helper.RegularClassSystemType).AssertOnlyViolations(helper); + should.NotBe(new List { helper.RegularClassSystemType }).AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().AreNot(helper.RegularClassSystemType)).AssertOnlyViolations(helper); + should.Be(Types().That().AreNot(new List { helper.RegularClassSystemType })).AssertOnlyViolations(helper); + + helper.AddSnapshotHeader("Empty Arguments (No Violations)"); + should = Types().That().Are(helper.RegularClass).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should.NotBe(new List()).AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().AreNot(new List())).AssertNoViolations(helper); + + helper.AddSnapshotHeader("Type not in architecture"); + should = Types().That().Are(helper.RegularClass).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should.NotBe(typeof(AttributeNamespace.ClassWithoutAttributes)).AssertException(helper); + should.NotBe(new List { typeof(AttributeNamespace.ClassWithoutAttributes) }).AssertException(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().AreNot(typeof(AttributeNamespace.ClassWithoutAttributes))).AssertException(helper); + should.Be(Types().That().AreNot(new List { typeof(AttributeNamespace.ClassWithoutAttributes) })).AssertException(helper); + + helper.AddSnapshotHeader("Multiple arguments"); + should = Types().That().Are(helper.OtherRegularClass).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should.NotBe(helper.RegularClassSystemType, helper.ClassWithPropertySystemType).AssertNoViolations(helper); + should.NotBe(new List { helper.RegularClassSystemType, helper.ClassWithPropertySystemType }).AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().AreNot(helper.RegularClassSystemType, helper.ClassWithPropertySystemType)).AssertNoViolations(helper); + should.Be(Types().That().AreNot(new List { helper.RegularClassSystemType, helper.ClassWithPropertySystemType })).AssertNoViolations(helper); + + helper.AddSnapshotHeader("Multiple inputs"); + Types().That().Are(helper.RegularClass, helper.OtherRegularClass).Should().NotBe(helper.RegularClassSystemType).AssertAnyViolations(helper); + + await helper.AssertSnapshotMatches(); + } + + [Fact] + public async Task BeAssignableToTest() + { + var helper = new TypeAssemblyTestHelper(); + + helper.AddSnapshotHeader("No Violations"); + var should = Types().That().Are(helper.DerivedClassForAssign).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should.BeAssignableTo(helper.BaseClassForAssign).AssertNoViolations(helper); + should.BeAssignableTo(helper.BaseClassForAssignSystemType).AssertNoViolations(helper); + should.BeAssignableTo(Types().That().Are(helper.BaseClassForAssign)).AssertNoViolations(helper); + should.BeAssignableTo(new List { helper.BaseClassForAssign }).AssertNoViolations(helper); + should.BeAssignableTo(new List { helper.BaseClassForAssignSystemType }).AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().AreAssignableTo(helper.BaseClassForAssign)).AssertNoViolations(helper); + should.Be(Types().That().AreAssignableTo(helper.BaseClassForAssignSystemType)).AssertNoViolations(helper); + should.Be(Types().That().AreAssignableTo(Types().That().Are(helper.BaseClassForAssign))).AssertNoViolations(helper); + should.Be(Types().That().AreAssignableTo(new List { helper.BaseClassForAssign })).AssertNoViolations(helper); + should.Be(Types().That().AreAssignableTo(new List { helper.BaseClassForAssignSystemType })).AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Complex conditions"); + should.BeAssignableToTypesThat().Are(helper.BaseClassForAssign).AssertNoViolations(helper); + + helper.AddSnapshotHeader("Violations"); + should = Types().That().Are(helper.UnrelatedClassForAssign).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should.BeAssignableTo(helper.BaseClassForAssign).AssertOnlyViolations(helper); + should.BeAssignableTo(helper.BaseClassForAssignSystemType).AssertOnlyViolations(helper); + should.BeAssignableTo(Types().That().Are(helper.BaseClassForAssign)).AssertOnlyViolations(helper); + should.BeAssignableTo(new List { helper.BaseClassForAssign }).AssertOnlyViolations(helper); + should.BeAssignableTo(new List { helper.BaseClassForAssignSystemType }).AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().AreAssignableTo(helper.BaseClassForAssign)).AssertOnlyViolations(helper); + should.Be(Types().That().AreAssignableTo(helper.BaseClassForAssignSystemType)).AssertOnlyViolations(helper); + should.Be(Types().That().AreAssignableTo(Types().That().Are(helper.BaseClassForAssign))).AssertOnlyViolations(helper); + should.Be(Types().That().AreAssignableTo(new List { helper.BaseClassForAssign })).AssertOnlyViolations(helper); + should.Be(Types().That().AreAssignableTo(new List { helper.BaseClassForAssignSystemType })).AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Complex conditions"); + should.BeAssignableToTypesThat().Are(helper.BaseClassForAssign).AssertOnlyViolations(helper); + + helper.AddSnapshotHeader("Multiple arguments"); + should = Types().That().Are(helper.UnrelatedClassForAssign).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should.BeAssignableTo(helper.BaseClassForAssign, helper.OtherBaseClassForAssign).AssertOnlyViolations(helper); + should.BeAssignableTo(helper.BaseClassForAssignSystemType, helper.OtherBaseClassForAssignSystemType).AssertOnlyViolations(helper); + should.BeAssignableTo(Types().That().Are(helper.BaseClassForAssign, helper.OtherBaseClassForAssign)).AssertOnlyViolations(helper); + should.BeAssignableTo(new List { helper.BaseClassForAssign, helper.OtherBaseClassForAssign }).AssertOnlyViolations(helper); + should.BeAssignableTo(new List { helper.BaseClassForAssignSystemType, helper.OtherBaseClassForAssignSystemType }).AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().AreAssignableTo(helper.BaseClassForAssign, helper.OtherBaseClassForAssign)).AssertOnlyViolations(helper); + should.Be(Types().That().AreAssignableTo(helper.BaseClassForAssignSystemType, helper.OtherBaseClassForAssignSystemType)).AssertOnlyViolations(helper); + should.Be(Types().That().AreAssignableTo(Types().That().Are(helper.BaseClassForAssign, helper.OtherBaseClassForAssign))).AssertOnlyViolations(helper); + should.Be(Types().That().AreAssignableTo(new List { helper.BaseClassForAssign, helper.OtherBaseClassForAssign })).AssertOnlyViolations(helper); + should.Be(Types().That().AreAssignableTo(new List { helper.BaseClassForAssignSystemType, helper.OtherBaseClassForAssignSystemType })).AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Complex conditions"); + should.BeAssignableToTypesThat().Are(helper.BaseClassForAssign, helper.OtherBaseClassForAssign).AssertOnlyViolations(helper); + + helper.AddSnapshotHeader("Multiple inputs"); + Types().That().Are(helper.DerivedClassForAssign, helper.OtherDerivedClassForAssign).Should().BeAssignableTo(helper.BaseClassForAssign).AssertNoViolations(helper); + Types().That().Are(helper.DerivedClassForAssign, helper.UnrelatedClassForAssign).Should().BeAssignableTo(helper.BaseClassForAssign).AssertAnyViolations(helper); + + helper.AddSnapshotHeader("Type not in architecture"); + should = Types().That().Are(helper.BaseClassForAssign).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should.BeAssignableTo(new List { typeof(AttributeNamespace.ClassWithoutAttributes) }).AssertException(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().AreAssignableTo(new List { typeof(AttributeNamespace.ClassWithoutAttributes) })).AssertException(helper); + + helper.AddSnapshotHeader("Empty Arguments (Predicates only)"); + should = Types().That().Are(helper.BaseClassForAssign).Should(); + should.Be(Types().That().AreAssignableTo(new List())).AssertOnlyViolations(helper); + should.Be(Types().That().AreAssignableTo(new List())).AssertOnlyViolations(helper); + + await helper.AssertSnapshotMatches(); + } + + [Fact] + public async Task NotBeAssignableToTest() + { + var helper = new TypeAssemblyTestHelper(); + + helper.AddSnapshotHeader("No Violations"); + var should = Types().That().Are(helper.UnrelatedClassForAssign).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should.NotBeAssignableTo(helper.BaseClassForAssign).AssertNoViolations(helper); + should.NotBeAssignableTo(helper.BaseClassForAssignSystemType).AssertNoViolations(helper); + should.NotBeAssignableTo(Types().That().Are(helper.BaseClassForAssign)).AssertNoViolations(helper); + should.NotBeAssignableTo(new List { helper.BaseClassForAssign }).AssertNoViolations(helper); + should.NotBeAssignableTo(new List { helper.BaseClassForAssignSystemType }).AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().AreNotAssignableTo(helper.BaseClassForAssign)).AssertNoViolations(helper); + should.Be(Types().That().AreNotAssignableTo(helper.BaseClassForAssignSystemType)).AssertNoViolations(helper); + should.Be(Types().That().AreNotAssignableTo(Types().That().Are(helper.BaseClassForAssign))).AssertNoViolations(helper); + should.Be(Types().That().AreNotAssignableTo(new List { helper.BaseClassForAssign })).AssertNoViolations(helper); + should.Be(Types().That().AreNotAssignableTo(new List { helper.BaseClassForAssignSystemType })).AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Complex conditions"); + should.NotBeAssignableToTypesThat().Are(helper.BaseClassForAssign).AssertNoViolations(helper); + + helper.AddSnapshotHeader("Violations"); + should = Types().That().Are(helper.DerivedClassForAssign).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should.NotBeAssignableTo(helper.BaseClassForAssign).AssertOnlyViolations(helper); + should.NotBeAssignableTo(helper.BaseClassForAssignSystemType).AssertOnlyViolations(helper); + should.NotBeAssignableTo(Types().That().Are(helper.BaseClassForAssign)).AssertOnlyViolations(helper); + should.NotBeAssignableTo(new List { helper.BaseClassForAssign }).AssertOnlyViolations(helper); + should.NotBeAssignableTo(new List { helper.BaseClassForAssignSystemType }).AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().AreNotAssignableTo(helper.BaseClassForAssign)).AssertOnlyViolations(helper); + should.Be(Types().That().AreNotAssignableTo(helper.BaseClassForAssignSystemType)).AssertOnlyViolations(helper); + should.Be(Types().That().AreNotAssignableTo(Types().That().Are(helper.BaseClassForAssign))).AssertOnlyViolations(helper); + should.Be(Types().That().AreNotAssignableTo(new List { helper.BaseClassForAssign })).AssertOnlyViolations(helper); + should.Be(Types().That().AreNotAssignableTo(new List { helper.BaseClassForAssignSystemType })).AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Complex conditions"); + should.NotBeAssignableToTypesThat().Are(helper.BaseClassForAssign).AssertOnlyViolations(helper); + + helper.AddSnapshotHeader("Multiple arguments"); + should = Types().That().Are(helper.DerivedClassForAssign).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should.NotBeAssignableTo(helper.BaseClassForAssign, helper.OtherBaseClassForAssign).AssertOnlyViolations(helper); + should.NotBeAssignableTo(helper.BaseClassForAssignSystemType, helper.OtherBaseClassForAssignSystemType).AssertOnlyViolations(helper); + should.NotBeAssignableTo(Types().That().Are(helper.BaseClassForAssign, helper.OtherBaseClassForAssign)).AssertOnlyViolations(helper); + should.NotBeAssignableTo(new List { helper.BaseClassForAssign, helper.OtherBaseClassForAssign }).AssertOnlyViolations(helper); + should.NotBeAssignableTo(new List { helper.BaseClassForAssignSystemType, helper.OtherBaseClassForAssignSystemType }).AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().AreNotAssignableTo(helper.BaseClassForAssign, helper.OtherBaseClassForAssign)).AssertOnlyViolations(helper); + should.Be(Types().That().AreNotAssignableTo(helper.BaseClassForAssignSystemType, helper.OtherBaseClassForAssignSystemType)).AssertOnlyViolations(helper); + should.Be(Types().That().AreNotAssignableTo(Types().That().Are(helper.BaseClassForAssign, helper.OtherBaseClassForAssign))).AssertOnlyViolations(helper); + should.Be(Types().That().AreNotAssignableTo(new List { helper.BaseClassForAssign, helper.OtherBaseClassForAssign })).AssertOnlyViolations(helper); + should.Be(Types().That().AreNotAssignableTo(new List { helper.BaseClassForAssignSystemType, helper.OtherBaseClassForAssignSystemType })).AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Complex conditions"); + should.NotBeAssignableToTypesThat().Are(helper.BaseClassForAssign, helper.OtherBaseClassForAssign).AssertOnlyViolations(helper); + + helper.AddSnapshotHeader("Multiple inputs"); + Types().That().Are(helper.UnrelatedClassForAssign, helper.OtherUnrelatedClassForAssign).Should().NotBeAssignableTo(helper.BaseClassForAssign).AssertNoViolations(helper); + Types().That().Are(helper.DerivedClassForAssign, helper.UnrelatedClassForAssign).Should().NotBeAssignableTo(helper.BaseClassForAssign).AssertAnyViolations(helper); + + helper.AddSnapshotHeader("Type not in architecture"); + should = Types().That().Are(helper.BaseClassForAssign).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should.NotBeAssignableTo(new List { typeof(AttributeNamespace.ClassWithoutAttributes) }).AssertException(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().AreNotAssignableTo(new List { typeof(AttributeNamespace.ClassWithoutAttributes) })).AssertException(helper); + + helper.AddSnapshotHeader("Empty Arguments"); + should = Types().That().Are(helper.BaseClassForAssign).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should.NotBeAssignableTo(new List()).AssertNoViolations(helper); + should.NotBeAssignableTo(new List()).AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().AreNotAssignableTo(new List())).AssertNoViolations(helper); + should.Be(Types().That().AreNotAssignableTo(new List())).AssertNoViolations(helper); + + await helper.AssertSnapshotMatches(); + } + + [Fact] + public async Task BeNestedInTest() + { + var helper = new TypeAssemblyTestHelper(); + + helper.AddSnapshotHeader("No Violations"); + var should = Types().That().Are(helper.InnerClassA).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should.BeNestedIn(helper.OuterClassA).AssertNoViolations(helper); + should.BeNestedIn(helper.OuterClassASystemType).AssertNoViolations(helper); + should.BeNestedIn(Types().That().Are(helper.OuterClassA)).AssertNoViolations(helper); + should.BeNestedIn(new List { helper.OuterClassA }).AssertNoViolations(helper); + should.BeNestedIn(new List { helper.OuterClassASystemType }).AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().AreNestedIn(helper.OuterClassA)).AssertNoViolations(helper); + should.Be(Types().That().AreNestedIn(helper.OuterClassASystemType)).AssertNoViolations(helper); + should.Be(Types().That().AreNestedIn(Types().That().Are(helper.OuterClassA))).AssertNoViolations(helper); + should.Be(Types().That().AreNestedIn(new List { helper.OuterClassA })).AssertNoViolations(helper); + should.Be(Types().That().AreNestedIn(new List { helper.OuterClassASystemType })).AssertNoViolations(helper); + + helper.AddSnapshotHeader("Violations"); + should = Types().That().Are(helper.NonNestedClass).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should.BeNestedIn(helper.OuterClassA).AssertOnlyViolations(helper); + should.BeNestedIn(helper.OuterClassASystemType).AssertOnlyViolations(helper); + should.BeNestedIn(Types().That().Are(helper.OuterClassA)).AssertOnlyViolations(helper); + should.BeNestedIn(new List { helper.OuterClassA }).AssertOnlyViolations(helper); + should.BeNestedIn(new List { helper.OuterClassASystemType }).AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().AreNestedIn(helper.OuterClassA)).AssertOnlyViolations(helper); + should.Be(Types().That().AreNestedIn(helper.OuterClassASystemType)).AssertOnlyViolations(helper); + should.Be(Types().That().AreNestedIn(Types().That().Are(helper.OuterClassA))).AssertOnlyViolations(helper); + should.Be(Types().That().AreNestedIn(new List { helper.OuterClassA })).AssertOnlyViolations(helper); + should.Be(Types().That().AreNestedIn(new List { helper.OuterClassASystemType })).AssertOnlyViolations(helper); + + helper.AddSnapshotHeader("Multiple inputs"); + Types().That().Are(helper.InnerClassA, helper.OtherInnerClassA).Should().BeNestedIn(helper.OuterClassA).AssertNoViolations(helper); + Types().That().Are(helper.InnerClassA, helper.NonNestedClass).Should().BeNestedIn(helper.OuterClassA).AssertAnyViolations(helper); + + helper.AddSnapshotHeader("Multiple arguments"); + should = Types().That().Are(helper.InnerClassA).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should.BeNestedIn(helper.OuterClassA, helper.NonNestedClass).AssertNoViolations(helper); + should.BeNestedIn(new List { helper.OuterClassA, helper.NonNestedClass }).AssertNoViolations(helper); + should.BeNestedIn(helper.OuterClassASystemType, helper.NonNestedClassSystemType).AssertNoViolations(helper); + should.BeNestedIn(new List { helper.OuterClassASystemType, helper.NonNestedClassSystemType }).AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().AreNestedIn(helper.OuterClassA, helper.NonNestedClass)).AssertNoViolations(helper); + should.Be(Types().That().AreNestedIn(new List { helper.OuterClassA, helper.NonNestedClass })).AssertNoViolations(helper); + should.Be(Types().That().AreNestedIn(helper.OuterClassASystemType, helper.NonNestedClassSystemType)).AssertNoViolations(helper); + should.Be(Types().That().AreNestedIn(new List { helper.OuterClassASystemType, helper.NonNestedClassSystemType })).AssertNoViolations(helper); + + helper.AddSnapshotHeader("Empty Arguments"); + should = Types().That().Are(helper.InnerClassA).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should.BeNestedIn(new List()).AssertOnlyViolations(helper); + should.BeNestedIn(new List()).AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().AreNestedIn(new List())).AssertOnlyViolations(helper); + should.Be(Types().That().AreNestedIn(new List())).AssertOnlyViolations(helper); + + await helper.AssertSnapshotMatches(); + } + + [Fact] + public async Task BeValueTypesTest() + { + var helper = new TypeAssemblyTestHelper(); + + helper.AddSnapshotHeader("No Violations"); + helper.AddSnapshotSubHeader("Conditions"); + Types().That().Are(helper.SimpleEnum).Should().BeValueTypes().AssertNoViolations(helper); + Types().That().Are(helper.SimpleStruct).Should().BeValueTypes().AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + Types().That().Are(helper.SimpleEnum).Should().Be(Types().That().AreValueTypes()).AssertNoViolations(helper); + Types().That().Are(helper.SimpleStruct).Should().Be(Types().That().AreValueTypes()).AssertNoViolations(helper); + + helper.AddSnapshotHeader("Violations"); + helper.AddSnapshotSubHeader("Conditions"); + Types().That().Are(helper.RegularClass).Should().BeValueTypes().AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + Types().That().Are(helper.RegularClass).Should().Be(Types().That().AreValueTypes()).AssertOnlyViolations(helper); + + helper.AddSnapshotHeader("Multiple inputs"); + Types().That().Are(helper.SimpleEnum, helper.SimpleStruct).Should().BeValueTypes().AssertNoViolations(helper); + Types().That().Are(helper.SimpleEnum, helper.RegularClass).Should().BeValueTypes().AssertAnyViolations(helper); + + await helper.AssertSnapshotMatches(); + } + + [Fact] + public async Task NotBeValueTypesTest() + { + var helper = new TypeAssemblyTestHelper(); + + helper.AddSnapshotHeader("No Violations"); + helper.AddSnapshotSubHeader("Conditions"); + Types().That().Are(helper.RegularClass).Should().NotBeValueTypes().AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + Types().That().Are(helper.RegularClass).Should().Be(Types().That().AreNotValueTypes()).AssertNoViolations(helper); + + helper.AddSnapshotHeader("Violations"); + helper.AddSnapshotSubHeader("Conditions"); + Types().That().Are(helper.SimpleEnum).Should().NotBeValueTypes().AssertOnlyViolations(helper); + Types().That().Are(helper.SimpleStruct).Should().NotBeValueTypes().AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + Types().That().Are(helper.SimpleEnum).Should().Be(Types().That().AreNotValueTypes()).AssertOnlyViolations(helper); + Types().That().Are(helper.SimpleStruct).Should().Be(Types().That().AreNotValueTypes()).AssertOnlyViolations(helper); + + helper.AddSnapshotHeader("Multiple inputs"); + Types().That().Are(helper.RegularClass, helper.OtherRegularClass).Should().NotBeValueTypes().AssertNoViolations(helper); + Types().That().Are(helper.RegularClass, helper.SimpleEnum).Should().NotBeValueTypes().AssertAnyViolations(helper); + + await helper.AssertSnapshotMatches(); + } + + [Fact] + public async Task BeEnumsTest() + { + var helper = new TypeAssemblyTestHelper(); + + helper.AddSnapshotHeader("No Violations"); + helper.AddSnapshotSubHeader("Conditions"); + Types().That().Are(helper.SimpleEnum).Should().BeEnums().AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + Types().That().Are(helper.SimpleEnum).Should().Be(Types().That().AreEnums()).AssertNoViolations(helper); + + helper.AddSnapshotHeader("Violations"); + helper.AddSnapshotSubHeader("Conditions"); + Types().That().Are(helper.RegularClass).Should().BeEnums().AssertOnlyViolations(helper); + Types().That().Are(helper.SimpleStruct).Should().BeEnums().AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + Types().That().Are(helper.RegularClass).Should().Be(Types().That().AreEnums()).AssertOnlyViolations(helper); + Types().That().Are(helper.SimpleStruct).Should().Be(Types().That().AreEnums()).AssertOnlyViolations(helper); + + helper.AddSnapshotHeader("Multiple inputs"); + Types().That().Are(helper.SimpleEnum, helper.OtherEnum).Should().BeEnums().AssertNoViolations(helper); + Types().That().Are(helper.SimpleEnum, helper.RegularClass).Should().BeEnums().AssertAnyViolations(helper); + + await helper.AssertSnapshotMatches(); + } + + [Fact] + public async Task NotBeEnumsTest() + { + var helper = new TypeAssemblyTestHelper(); + + helper.AddSnapshotHeader("No Violations"); + helper.AddSnapshotSubHeader("Conditions"); + Types().That().Are(helper.RegularClass).Should().NotBeEnums().AssertNoViolations(helper); + Types().That().Are(helper.SimpleStruct).Should().NotBeEnums().AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + Types().That().Are(helper.RegularClass).Should().Be(Types().That().AreNotEnums()).AssertNoViolations(helper); + Types().That().Are(helper.SimpleStruct).Should().Be(Types().That().AreNotEnums()).AssertNoViolations(helper); + + helper.AddSnapshotHeader("Violations"); + helper.AddSnapshotSubHeader("Conditions"); + Types().That().Are(helper.SimpleEnum).Should().NotBeEnums().AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + Types().That().Are(helper.SimpleEnum).Should().Be(Types().That().AreNotEnums()).AssertOnlyViolations(helper); + + helper.AddSnapshotHeader("Multiple inputs"); + Types().That().Are(helper.RegularClass, helper.SimpleStruct).Should().NotBeEnums().AssertNoViolations(helper); + Types().That().Are(helper.RegularClass, helper.SimpleEnum).Should().NotBeEnums().AssertAnyViolations(helper); + + await helper.AssertSnapshotMatches(); + } + + [Fact] + public async Task BeStructsTest() + { + var helper = new TypeAssemblyTestHelper(); + + helper.AddSnapshotHeader("No Violations"); + helper.AddSnapshotSubHeader("Conditions"); + Types().That().Are(helper.SimpleStruct).Should().BeStructs().AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + Types().That().Are(helper.SimpleStruct).Should().Be(Types().That().AreStructs()).AssertNoViolations(helper); + + helper.AddSnapshotHeader("Violations"); + helper.AddSnapshotSubHeader("Conditions"); + Types().That().Are(helper.RegularClass).Should().BeStructs().AssertOnlyViolations(helper); + Types().That().Are(helper.SimpleEnum).Should().BeStructs().AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + Types().That().Are(helper.RegularClass).Should().Be(Types().That().AreStructs()).AssertOnlyViolations(helper); + Types().That().Are(helper.SimpleEnum).Should().Be(Types().That().AreStructs()).AssertOnlyViolations(helper); + + helper.AddSnapshotHeader("Multiple inputs"); + Types().That().Are(helper.SimpleStruct, helper.OtherStruct).Should().BeStructs().AssertNoViolations(helper); + Types().That().Are(helper.SimpleStruct, helper.RegularClass).Should().BeStructs().AssertAnyViolations(helper); + + await helper.AssertSnapshotMatches(); + } + + [Fact] + public async Task NotBeStructsTest() + { + var helper = new TypeAssemblyTestHelper(); + + helper.AddSnapshotHeader("No Violations"); + helper.AddSnapshotSubHeader("Conditions"); + Types().That().Are(helper.RegularClass).Should().NotBeStructs().AssertNoViolations(helper); + Types().That().Are(helper.SimpleEnum).Should().NotBeStructs().AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + Types().That().Are(helper.RegularClass).Should().Be(Types().That().AreNotStructs()).AssertNoViolations(helper); + Types().That().Are(helper.SimpleEnum).Should().Be(Types().That().AreNotStructs()).AssertNoViolations(helper); + + helper.AddSnapshotHeader("Violations"); + helper.AddSnapshotSubHeader("Conditions"); + Types().That().Are(helper.SimpleStruct).Should().NotBeStructs().AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + Types().That().Are(helper.SimpleStruct).Should().Be(Types().That().AreNotStructs()).AssertOnlyViolations(helper); + + helper.AddSnapshotHeader("Multiple inputs"); + Types().That().Are(helper.RegularClass, helper.SimpleEnum).Should().NotBeStructs().AssertNoViolations(helper); + Types().That().Are(helper.RegularClass, helper.SimpleStruct).Should().NotBeStructs().AssertAnyViolations(helper); + + await helper.AssertSnapshotMatches(); + } + + [Fact] + public async Task ImplementInterfaceTest() + { + var helper = new TypeAssemblyTestHelper(); + + helper.AddSnapshotHeader("No Violations"); + var should = Types().That().Are(helper.ClassImplementingInterface).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should.ImplementInterface(helper.TestInterface).AssertNoViolations(helper); + should.ImplementInterface(helper.TestInterfaceSystemType).AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().ImplementInterface(helper.TestInterface)).AssertNoViolations(helper); + should.Be(Types().That().ImplementInterface(helper.TestInterfaceSystemType)).AssertNoViolations(helper); + + helper.AddSnapshotHeader("Violations"); + should = Types().That().Are(helper.ClassNotImplementingInterface).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should.ImplementInterface(helper.TestInterface).AssertOnlyViolations(helper); + should.ImplementInterface(helper.TestInterfaceSystemType).AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().ImplementInterface(helper.TestInterface)).AssertOnlyViolations(helper); + should.Be(Types().That().ImplementInterface(helper.TestInterfaceSystemType)).AssertOnlyViolations(helper); + + helper.AddSnapshotHeader("Multiple inputs"); + Types().That().Are(helper.ClassImplementingInterface, helper.ClassNotImplementingInterface).Should().ImplementInterface(helper.TestInterface).AssertAnyViolations(helper); + + helper.AddSnapshotHeader("Type not in architecture"); + should = Types().That().Are(helper.ClassImplementingInterface).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should.ImplementInterface(typeof(System.IDisposable)).AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().ImplementInterface(typeof(System.IDisposable))).AssertOnlyViolations(helper); + + await helper.AssertSnapshotMatches(); + } + + [Fact] + public async Task NotImplementInterfaceTest() + { + var helper = new TypeAssemblyTestHelper(); + + helper.AddSnapshotHeader("No Violations"); + var should = Types().That().Are(helper.ClassNotImplementingInterface).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should.NotImplementInterface(helper.TestInterface).AssertNoViolations(helper); + should.NotImplementInterface(helper.TestInterfaceSystemType).AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().DoNotImplementInterface(helper.TestInterface)).AssertNoViolations(helper); + should.Be(Types().That().DoNotImplementInterface(helper.TestInterfaceSystemType)).AssertNoViolations(helper); + + helper.AddSnapshotHeader("Violations"); + should = Types().That().Are(helper.ClassImplementingInterface).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should.NotImplementInterface(helper.TestInterface).AssertOnlyViolations(helper); + should.NotImplementInterface(helper.TestInterfaceSystemType).AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().DoNotImplementInterface(helper.TestInterface)).AssertOnlyViolations(helper); + should.Be(Types().That().DoNotImplementInterface(helper.TestInterfaceSystemType)).AssertOnlyViolations(helper); + + helper.AddSnapshotHeader("Multiple inputs"); + Types().That().Are(helper.ClassNotImplementingInterface, helper.ClassImplementingInterface).Should().NotImplementInterface(helper.TestInterface).AssertAnyViolations(helper); + + helper.AddSnapshotHeader("Type not in architecture"); + should = Types().That().Are(helper.ClassImplementingInterface).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should.NotImplementInterface(typeof(System.IDisposable)).AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().DoNotImplementInterface(typeof(System.IDisposable))).AssertNoViolations(helper); + + await helper.AssertSnapshotMatches(); + } + + [Fact] + public async Task ImplementAnyInterfacesTest() + { + var helper = new TypeAssemblyTestHelper(); + + helper.AddSnapshotHeader("No Violations"); + var should = Interfaces().That().Are(helper.ChildTestInterface).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should.ImplementAnyInterfaces(helper.TestInterface).AssertNoViolations(helper); + should.ImplementAnyInterfaces([helper.TestInterface]).AssertNoViolations(helper); + should.ImplementAnyInterfaces(helper.TestInterfaceSystemType).AssertNoViolations(helper); + should.ImplementAnyInterfaces([helper.TestInterfaceSystemType]).AssertNoViolations(helper); + should.ImplementAnyInterfaces(Interfaces().That().Are(helper.TestInterface)).AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Interfaces().That().ImplementAnyInterfaces(helper.TestInterface)).AssertNoViolations(helper); + should.Be(Interfaces().That().ImplementAnyInterfaces([helper.TestInterface])).AssertNoViolations(helper); + should.Be(Interfaces().That().ImplementAnyInterfaces(helper.TestInterfaceSystemType)).AssertNoViolations(helper); + should.Be(Interfaces().That().ImplementAnyInterfaces([helper.TestInterfaceSystemType])).AssertNoViolations(helper); + should.Be(Interfaces().That().ImplementAnyInterfaces(Interfaces().That().Are(helper.TestInterface))).AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Complex conditions"); + should.ImplementAnyInterfacesThat().Are(helper.TestInterface).AssertNoViolations(helper); + + helper.AddSnapshotHeader("Violations"); + should = Interfaces().That().Are(helper.ChildTestInterface).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should.ImplementAnyInterfaces(helper.OtherTestInterface).AssertOnlyViolations(helper); + should.ImplementAnyInterfaces([helper.OtherTestInterface]).AssertOnlyViolations(helper); + should.ImplementAnyInterfaces(helper.OtherTestInterfaceSystemType).AssertOnlyViolations(helper); + should.ImplementAnyInterfaces([helper.OtherTestInterfaceSystemType]).AssertOnlyViolations(helper); + should.ImplementAnyInterfaces(Interfaces().That().Are(helper.OtherTestInterface)).AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Interfaces().That().ImplementAnyInterfaces(helper.OtherTestInterface)).AssertOnlyViolations(helper); + should.Be(Interfaces().That().ImplementAnyInterfaces([helper.OtherTestInterface])).AssertOnlyViolations(helper); + should.Be(Interfaces().That().ImplementAnyInterfaces(helper.OtherTestInterfaceSystemType)).AssertOnlyViolations(helper); + should.Be(Interfaces().That().ImplementAnyInterfaces([helper.OtherTestInterfaceSystemType])).AssertOnlyViolations(helper); + should.Be(Interfaces().That().ImplementAnyInterfaces(Interfaces().That().Are(helper.OtherTestInterface))).AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Complex conditions"); + should.ImplementAnyInterfacesThat().Are(helper.OtherTestInterface).AssertOnlyViolations(helper); + + helper.AddSnapshotHeader("Empty Arguments (Only Violations)"); + should = Interfaces().That().Are(helper.TestInterface, helper.ChildTestInterface).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should.ImplementAnyInterfaces().AssertOnlyViolations(helper); + should.ImplementAnyInterfaces(new List()).AssertOnlyViolations(helper); + should.ImplementAnyInterfaces(new List()).AssertOnlyViolations(helper); + should.ImplementAnyInterfaces(Interfaces().That().HaveName(helper.NonExistentObjectName)).AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Interfaces().That().ImplementAnyInterfaces()).AssertOnlyViolations(helper); + should.Be(Interfaces().That().ImplementAnyInterfaces(new List())).AssertOnlyViolations(helper); + should.Be(Interfaces().That().ImplementAnyInterfaces(new List())).AssertOnlyViolations(helper); + should.Be(Interfaces().That().ImplementAnyInterfaces(Interfaces().That().HaveName(helper.NonExistentObjectName))).AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Complex conditions"); + should.ImplementAnyInterfacesThat().Are(new List()).AssertOnlyViolations(helper); + + helper.AddSnapshotHeader("Multiple arguments"); + should = Interfaces().That().Are(helper.ChildTestInterface).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should.ImplementAnyInterfaces(helper.OtherTestInterface, helper.OtherChildTestInterface).AssertOnlyViolations(helper); + should.ImplementAnyInterfaces([helper.OtherTestInterface, helper.OtherChildTestInterface]).AssertOnlyViolations(helper); + should.ImplementAnyInterfaces(helper.OtherTestInterfaceSystemType, helper.OtherChildTestInterfaceSystemType).AssertOnlyViolations(helper); + should.ImplementAnyInterfaces([helper.OtherTestInterfaceSystemType, helper.OtherChildTestInterfaceSystemType]).AssertOnlyViolations(helper); + should.ImplementAnyInterfaces(Interfaces().That().Are(helper.OtherTestInterface, helper.OtherChildTestInterface)).AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Interfaces().That().ImplementAnyInterfaces(helper.OtherTestInterface, helper.OtherChildTestInterface)).AssertOnlyViolations(helper); + should.Be(Interfaces().That().ImplementAnyInterfaces([helper.OtherTestInterface, helper.OtherChildTestInterface])).AssertOnlyViolations(helper); + should.Be(Interfaces().That().ImplementAnyInterfaces(helper.OtherTestInterfaceSystemType, helper.OtherChildTestInterfaceSystemType)).AssertOnlyViolations(helper); + should.Be(Interfaces().That().ImplementAnyInterfaces([helper.OtherTestInterfaceSystemType, helper.OtherChildTestInterfaceSystemType])).AssertOnlyViolations(helper); + should.Be(Interfaces().That().ImplementAnyInterfaces(Interfaces().That().Are(helper.OtherTestInterface, helper.OtherChildTestInterface))).AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Complex conditions"); + should.ImplementAnyInterfacesThat().Are(helper.OtherTestInterface, helper.OtherChildTestInterface).AssertOnlyViolations(helper); + should.ImplementAnyInterfacesThat().Are([helper.OtherTestInterface, helper.OtherChildTestInterface]).AssertOnlyViolations(helper); + should.ImplementAnyInterfacesThat().Are(helper.OtherTestInterfaceSystemType, helper.OtherChildTestInterfaceSystemType).AssertOnlyViolations(helper); + should.ImplementAnyInterfacesThat().Are([helper.OtherTestInterfaceSystemType, helper.OtherChildTestInterfaceSystemType]).AssertOnlyViolations(helper); + should.ImplementAnyInterfacesThat().Are(Interfaces().That().Are(helper.OtherTestInterface, helper.OtherChildTestInterface)).AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Complex conditions"); + should.ImplementAnyInterfacesThat().Are(helper.OtherTestInterface, helper.OtherChildTestInterface).AssertOnlyViolations(helper); + + await helper.AssertSnapshotMatches(); + } + + [Fact] + public async Task NotImplementAnyInterfacesTest() + { + var helper = new TypeAssemblyTestHelper(); + + helper.AddSnapshotHeader("No Violations"); + var should = Interfaces().That().Are(helper.ChildTestInterface).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should.NotImplementAnyInterfaces(helper.OtherTestInterface).AssertNoViolations(helper); + should.NotImplementAnyInterfaces([helper.OtherTestInterface]).AssertNoViolations(helper); + should.NotImplementAnyInterfaces(helper.OtherTestInterfaceSystemType).AssertNoViolations(helper); + should.NotImplementAnyInterfaces([helper.OtherTestInterfaceSystemType]).AssertNoViolations(helper); + should.NotImplementAnyInterfaces(Interfaces().That().Are(helper.OtherTestInterface)).AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Interfaces().That().DoNotImplementAnyInterfaces(helper.OtherTestInterface)).AssertNoViolations(helper); + should.Be(Interfaces().That().DoNotImplementAnyInterfaces([helper.OtherTestInterface])).AssertNoViolations(helper); + should.Be(Interfaces().That().DoNotImplementAnyInterfaces(helper.OtherTestInterfaceSystemType)).AssertNoViolations(helper); + should.Be(Interfaces().That().DoNotImplementAnyInterfaces([helper.OtherTestInterfaceSystemType])).AssertNoViolations(helper); + should.Be(Interfaces().That().DoNotImplementAnyInterfaces(Interfaces().That().Are(helper.OtherTestInterface))).AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Complex conditions"); + should.NotImplementAnyInterfacesThat().Are(helper.OtherTestInterface).AssertNoViolations(helper); + + helper.AddSnapshotHeader("Violations"); + should = Interfaces().That().Are(helper.ChildTestInterface).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should.NotImplementAnyInterfaces(helper.TestInterface).AssertOnlyViolations(helper); + should.NotImplementAnyInterfaces([helper.TestInterface]).AssertOnlyViolations(helper); + should.NotImplementAnyInterfaces(helper.TestInterfaceSystemType).AssertOnlyViolations(helper); + should.NotImplementAnyInterfaces([helper.TestInterfaceSystemType]).AssertOnlyViolations(helper); + should.NotImplementAnyInterfaces(Interfaces().That().Are(helper.TestInterface)).AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Interfaces().That().DoNotImplementAnyInterfaces(helper.TestInterface)).AssertOnlyViolations(helper); + should.Be(Interfaces().That().DoNotImplementAnyInterfaces([helper.TestInterface])).AssertOnlyViolations(helper); + should.Be(Interfaces().That().DoNotImplementAnyInterfaces(helper.TestInterfaceSystemType)).AssertOnlyViolations(helper); + should.Be(Interfaces().That().DoNotImplementAnyInterfaces([helper.TestInterfaceSystemType])).AssertOnlyViolations(helper); + should.Be(Interfaces().That().DoNotImplementAnyInterfaces(Interfaces().That().Are(helper.TestInterface))).AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Complex conditions"); + should.NotImplementAnyInterfacesThat().Are(helper.TestInterface).AssertOnlyViolations(helper); + + helper.AddSnapshotHeader("Empty Arguments (No Violations)"); + should = Interfaces().That().Are(helper.TestInterface, helper.ChildTestInterface).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should.NotImplementAnyInterfaces().AssertNoViolations(helper); + should.NotImplementAnyInterfaces(new List()).AssertNoViolations(helper); + should.NotImplementAnyInterfaces(new List()).AssertNoViolations(helper); + should.NotImplementAnyInterfaces(Interfaces().That().HaveName(helper.NonExistentObjectName)).AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Interfaces().That().DoNotImplementAnyInterfaces()).AssertNoViolations(helper); + should.Be(Interfaces().That().DoNotImplementAnyInterfaces(new List())).AssertNoViolations(helper); + should.Be(Interfaces().That().DoNotImplementAnyInterfaces(new List())).AssertNoViolations(helper); + should.Be(Interfaces().That().DoNotImplementAnyInterfaces(Interfaces().That().HaveName(helper.NonExistentObjectName))).AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Complex conditions"); + should.NotImplementAnyInterfacesThat().Are(new List()).AssertNoViolations(helper); + + helper.AddSnapshotHeader("Multiple arguments"); + should = Interfaces().That().Are(helper.ChildTestInterface).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should.NotImplementAnyInterfaces(helper.TestInterface, helper.OtherTestInterface).AssertOnlyViolations(helper); + should.NotImplementAnyInterfaces([helper.TestInterface, helper.OtherTestInterface]).AssertOnlyViolations(helper); + should.NotImplementAnyInterfaces(helper.TestInterfaceSystemType, helper.OtherTestInterfaceSystemType).AssertOnlyViolations(helper); + should.NotImplementAnyInterfaces([helper.TestInterfaceSystemType, helper.OtherTestInterfaceSystemType]).AssertOnlyViolations(helper); + should.NotImplementAnyInterfaces(Interfaces().That().Are(helper.TestInterface, helper.OtherTestInterface)).AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Interfaces().That().DoNotImplementAnyInterfaces(helper.TestInterface, helper.OtherTestInterface)).AssertOnlyViolations(helper); + should.Be(Interfaces().That().DoNotImplementAnyInterfaces([helper.TestInterface, helper.OtherTestInterface])).AssertOnlyViolations(helper); + should.Be(Interfaces().That().DoNotImplementAnyInterfaces(helper.TestInterfaceSystemType, helper.OtherTestInterfaceSystemType)).AssertOnlyViolations(helper); + should.Be(Interfaces().That().DoNotImplementAnyInterfaces([helper.TestInterfaceSystemType, helper.OtherTestInterfaceSystemType])).AssertOnlyViolations(helper); + should.Be(Interfaces().That().DoNotImplementAnyInterfaces(Interfaces().That().Are(helper.TestInterface, helper.OtherTestInterface))).AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Complex conditions"); + should.NotImplementAnyInterfacesThat().Are(helper.TestInterface, helper.OtherTestInterface).AssertOnlyViolations(helper); + + await helper.AssertSnapshotMatches(); + } + + [Fact] + public async Task ResideInNamespaceTest() + { + var helper = new TypeAssemblyTestHelper(); + + helper.AddSnapshotHeader("No Violations"); + var should = Types().That().Are(helper.RegularClass).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should.ResideInNamespace("TypeNamespace").AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().ResideInNamespace("TypeNamespace")).AssertNoViolations(helper); + + helper.AddSnapshotHeader("Violations"); + should = Types().That().Are(helper.RegularClass).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should.ResideInNamespace("NonExistentNamespace").AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().ResideInNamespace("NonExistentNamespace")).AssertOnlyViolations(helper); + + helper.AddSnapshotHeader("Multiple inputs"); + Types().That().Are(helper.RegularClass, helper.OtherRegularClass).Should().ResideInNamespace("TypeNamespace").AssertNoViolations(helper); + + await helper.AssertSnapshotMatches(); + } + + [Fact] + public async Task NotResideInNamespaceTest() + { + var helper = new TypeAssemblyTestHelper(); + + helper.AddSnapshotHeader("No Violations"); + var should = Types().That().Are(helper.RegularClass).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should.NotResideInNamespace("NonExistentNamespace").AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().DoNotResideInNamespace("NonExistentNamespace")).AssertNoViolations(helper); + + helper.AddSnapshotHeader("Violations"); + should = Types().That().Are(helper.RegularClass).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should.NotResideInNamespace("TypeNamespace").AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().DoNotResideInNamespace("TypeNamespace")).AssertOnlyViolations(helper); + + helper.AddSnapshotHeader("Multiple inputs"); + Types().That().Are(helper.RegularClass, helper.OtherRegularClass).Should().NotResideInNamespace("NonExistentNamespace").AssertNoViolations(helper); + + await helper.AssertSnapshotMatches(); + } + + [Fact] + public async Task ResideInNamespaceMatchingTest() + { + var helper = new TypeAssemblyTestHelper(); + + helper.AddSnapshotHeader("No Violations"); + var should = Types().That().Are(helper.RegularClass).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should.ResideInNamespaceMatching("TypeName.*").AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().ResideInNamespaceMatching("TypeName.*")).AssertNoViolations(helper); + + helper.AddSnapshotHeader("Violations"); + should = Types().That().Are(helper.RegularClass).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should.ResideInNamespaceMatching("NonExistent.*").AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().ResideInNamespaceMatching("NonExistent.*")).AssertOnlyViolations(helper); + + helper.AddSnapshotHeader("Multiple inputs"); + Types().That().Are(helper.RegularClass, helper.OtherRegularClass).Should().ResideInNamespaceMatching("TypeName.*").AssertNoViolations(helper); + + await helper.AssertSnapshotMatches(); + } + + [Fact] + public async Task NotResideInNamespaceMatchingTest() + { + var helper = new TypeAssemblyTestHelper(); + + helper.AddSnapshotHeader("No Violations"); + var should = Types().That().Are(helper.RegularClass).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should.NotResideInNamespaceMatching("NonExistent.*").AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().DoNotResideInNamespaceMatching("NonExistent.*")).AssertNoViolations(helper); + + helper.AddSnapshotHeader("Violations"); + should = Types().That().Are(helper.RegularClass).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should.NotResideInNamespaceMatching("TypeName.*").AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().DoNotResideInNamespaceMatching("TypeName.*")).AssertOnlyViolations(helper); + + helper.AddSnapshotHeader("Multiple inputs"); + Types().That().Are(helper.RegularClass, helper.OtherRegularClass).Should().NotResideInNamespaceMatching("NonExistent.*").AssertNoViolations(helper); + + await helper.AssertSnapshotMatches(); + } + + [Fact] + public async Task ResideInAssemblyTest() + { + var helper = new TypeAssemblyTestHelper(); + var typeAssembly = typeof(TypeNamespace.RegularClass).Assembly; + var archAssembly = helper.Architecture.Assemblies.First(); + var assemblyFullName = archAssembly.FullName; + + helper.AddSnapshotHeader("No Violations"); + var should = Types().That().Are(helper.RegularClass).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should.ResideInAssembly(typeAssembly).AssertNoViolations(helper); + should.ResideInAssembly(archAssembly).AssertNoViolations(helper); + should.ResideInAssembly(assemblyFullName).AssertNoViolations(helper); + should.ResideInAssemblyMatching("TypeAssembly.*").AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().ResideInAssembly(typeAssembly)).AssertNoViolations(helper); + should.Be(Types().That().ResideInAssembly(archAssembly)).AssertNoViolations(helper); + should.Be(Types().That().ResideInAssembly(assemblyFullName)).AssertNoViolations(helper); + should.Be(Types().That().ResideInAssemblyMatching("TypeAssembly.*")).AssertNoViolations(helper); + + helper.AddSnapshotHeader("Violations"); + should = Types().That().Are(helper.RegularClass).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should.ResideInAssembly("NonExistentAssembly").AssertOnlyViolations(helper); + should.ResideInAssemblyMatching("NonExistent.*").AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().ResideInAssembly("NonExistentAssembly")).AssertOnlyViolations(helper); + should.Be(Types().That().ResideInAssemblyMatching("NonExistent.*")).AssertOnlyViolations(helper); + + helper.AddSnapshotHeader("Multiple inputs"); + Types().That().Are(helper.RegularClass, helper.OtherRegularClass).Should().ResideInAssembly(assemblyFullName).AssertNoViolations(helper); + + helper.AddSnapshotHeader("Multiple assemblies"); + should = Types().That().Are(helper.RegularClass).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should.ResideInAssembly(archAssembly, archAssembly).AssertNoViolations(helper); + should.ResideInAssembly(typeAssembly, typeAssembly).AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().ResideInAssembly(archAssembly, archAssembly)).AssertNoViolations(helper); + should.Be(Types().That().ResideInAssembly(typeAssembly, typeAssembly)).AssertNoViolations(helper); + + await helper.AssertSnapshotMatches(); + } + + [Fact] + public async Task NotResideInAssemblyTest() { - _types = Architecture.Types; + var helper = new TypeAssemblyTestHelper(); + var typeAssembly = typeof(TypeNamespace.RegularClass).Assembly; + var archAssembly = helper.Architecture.Assemblies.First(); + var assemblyFullName = archAssembly.FullName; + + helper.AddSnapshotHeader("No Violations"); + var should = Types().That().Are(helper.RegularClass).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should.NotResideInAssembly("NonExistentAssembly").AssertNoViolations(helper); + should.NotResideInAssemblyMatching("NonExistent.*").AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().DoNotResideInAssembly("NonExistentAssembly")).AssertNoViolations(helper); + should.Be(Types().That().DoNotResideInAssemblyMatching("NonExistent.*")).AssertNoViolations(helper); + + helper.AddSnapshotHeader("Violations"); + should = Types().That().Are(helper.RegularClass).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should.NotResideInAssembly(typeAssembly).AssertOnlyViolations(helper); + should.NotResideInAssembly(archAssembly).AssertOnlyViolations(helper); + should.NotResideInAssembly(assemblyFullName).AssertOnlyViolations(helper); + should.NotResideInAssemblyMatching("TypeAssembly.*").AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().DoNotResideInAssembly(typeAssembly)).AssertOnlyViolations(helper); + should.Be(Types().That().DoNotResideInAssembly(archAssembly)).AssertOnlyViolations(helper); + should.Be(Types().That().DoNotResideInAssembly(assemblyFullName)).AssertOnlyViolations(helper); + should.Be(Types().That().DoNotResideInAssemblyMatching("TypeAssembly.*")).AssertOnlyViolations(helper); + + helper.AddSnapshotHeader("Multiple inputs"); + Types().That().Are(helper.RegularClass, helper.OtherRegularClass).Should().NotResideInAssembly("NonExistentAssembly").AssertNoViolations(helper); + + helper.AddSnapshotHeader("Multiple assemblies"); + should = Types().That().Are(helper.RegularClass).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should.NotResideInAssembly(archAssembly, archAssembly).AssertOnlyViolations(helper); + should.NotResideInAssembly(typeAssembly, typeAssembly).AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().DoNotResideInAssembly(archAssembly, archAssembly)).AssertOnlyViolations(helper); + should.Be(Types().That().DoNotResideInAssembly(typeAssembly, typeAssembly)).AssertOnlyViolations(helper); + + await helper.AssertSnapshotMatches(); } - private static readonly Architecture Architecture = - StaticTestArchitectures.ArchUnitNETTestArchitecture; - private readonly IEnumerable _types; + [Fact] + public async Task HavePropertyMemberWithNameTest() + { + var helper = new TypeAssemblyTestHelper(); + + helper.AddSnapshotHeader("No Violations"); + var should = Types().That().Are(helper.ClassWithProperty).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should.HavePropertyMemberWithName("PropertyA").AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().HavePropertyMemberWithName("PropertyA")).AssertNoViolations(helper); + + helper.AddSnapshotHeader("Violations"); + should = Types().That().Are(helper.ClassWithoutMembers).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should.HavePropertyMemberWithName("PropertyA").AssertOnlyViolations(helper); - [Fact] - public void AreNestedTest() - { - foreach (var type in _types) - { - var typeIsNested = Types().That().Are(type).Should().BeNested(); - var typeIsNotNested = Types().That().Are(type).Should().NotBeNested(); - var nestedTypesDoNotIncludeType = Types().That().AreNested().Should().NotBe(type); - var notNestedTypesDoNotIncludeType = Types() - .That() - .AreNotNested() - .Should() - .NotBe(type); - - Assert.Equal(type.IsNested, typeIsNested.HasNoViolations(Architecture)); - Assert.Equal(!type.IsNested, typeIsNotNested.HasNoViolations(Architecture)); - Assert.Equal( - !type.IsNested, - nestedTypesDoNotIncludeType.HasNoViolations(Architecture) - ); - Assert.Equal( - type.IsNested, - notNestedTypesDoNotIncludeType.HasNoViolations(Architecture) - ); - } + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().HavePropertyMemberWithName("PropertyA")).AssertOnlyViolations(helper); - var nestedTypesAreNested = Types().That().AreNested().Should().BeNested(); - var nestedTypesAreNotNested = Types().That().AreNested().Should().NotBeNested(); - var notNestedTypesAreNested = Types().That().AreNotNested().Should().BeNested(); - var notNestedTypesAreNotNested = Types().That().AreNotNested().Should().NotBeNested(); + helper.AddSnapshotHeader("Multiple inputs"); + Types().That().Are(helper.ClassWithProperty, helper.ClassWithoutMembers).Should().HavePropertyMemberWithName("PropertyA").AssertAnyViolations(helper); - Assert.True(nestedTypesAreNested.HasNoViolations(Architecture)); - Assert.False(nestedTypesAreNotNested.HasNoViolations(Architecture)); - Assert.False(notNestedTypesAreNested.HasNoViolations(Architecture)); - Assert.True(notNestedTypesAreNotNested.HasNoViolations(Architecture)); + await helper.AssertSnapshotMatches(); } [Fact] - public void AreTest() + public async Task NotHavePropertyMemberWithNameTest() { - //Tests with one argument - - var publicTestClassIsPublic = Types() - .That() - .Are(typeof(PublicTestClass)) - .Should() - .BePublic(); - var publicTestClassIsNotPublic = Types() - .That() - .Are(typeof(PublicTestClass)) - .Should() - .NotBePublic(); - var notPublicTypesAreNotPublicTestClass = Types() - .That() - .AreNotPublic() - .Should() - .NotBe(typeof(PublicTestClass)); - var publicTypesAreNotPublicTestClass = Types() - .That() - .ArePublic() - .Should() - .NotBe(typeof(PublicTestClass)); - - Assert.True(publicTestClassIsPublic.HasNoViolations(Architecture)); - Assert.False(publicTestClassIsNotPublic.HasNoViolations(Architecture)); - Assert.True(notPublicTypesAreNotPublicTestClass.HasNoViolations(Architecture)); - Assert.False(publicTypesAreNotPublicTestClass.HasNoViolations(Architecture)); - - //Tests with multiple arguments - - var publicTestClassAndInternalTestClassIsPublicOrInternal = Types() - .That() - .Are(typeof(PublicTestClass), typeof(InternalTestClass)) - .Should() - .BePublic() - .OrShould() - .BeInternal(); - var publicTestClassAndInternalTestClassIsPublic = Types() - .That() - .Are(typeof(PublicTestClass), typeof(InternalTestClass)) - .Should() - .BePublic(); - var notPublicAndNotInternalClassesAreNotPublicTestClassOrInternalTestClass = Types() - .That() - .AreNotPublic() - .And() - .AreNotInternal() - .Should() - .NotBe(typeof(PublicTestClass), typeof(InternalTestClass)); - var internalTypesAreNotPublicTestClassOrInternalTestClass = Types() - .That() - .AreInternal() - .Should() - .NotBe(typeof(PublicTestClass), typeof(InternalTestClass)); - - Assert.True( - publicTestClassAndInternalTestClassIsPublicOrInternal.HasNoViolations(Architecture) - ); - Assert.False(publicTestClassAndInternalTestClassIsPublic.HasNoViolations(Architecture)); - Assert.True( - notPublicAndNotInternalClassesAreNotPublicTestClassOrInternalTestClass.HasNoViolations( - Architecture - ) - ); - Assert.False( - internalTypesAreNotPublicTestClassOrInternalTestClass.HasNoViolations(Architecture) - ); - } + var helper = new TypeAssemblyTestHelper(); - [Fact] - public void AssignableToTest() - { - var falseTypeList1 = new List - { - typeof(PublicTestClass), - typeof(InternalTestClass), - }; - var falseTypeList2 = new List - { - StaticTestTypes.PublicTestClass, - StaticTestTypes.InternalTestClass, - }; - var falseTypeListPattern = new List - { - StaticTestTypes.PublicTestClass.FullName, - StaticTestTypes.InternalTestClass.FullName, - }; - foreach (var type in _types) - { - //One Argument - - var typeIsAssignableToItself = Types() - .That() - .Are(type) - .Should() - .BeAssignableTo(type); - var typeIsNotAssignableToItself = Types() - .That() - .Are(type) - .Should() - .NotBeAssignableTo(type); - var typeIsNotAssignableToFalseType1 = Types() - .That() - .Are(type) - .Should() - .NotBeAssignableTo(typeof(PublicTestClass)) - .OrShould() - .Be(typeof(PublicTestClass)); - var typeIsNotAssignableToFalseType2 = Types() - .That() - .Are(type) - .Should() - .NotBeAssignableTo(StaticTestTypes.PublicTestClass) - .OrShould() - .Be(typeof(PublicTestClass)); - var typeIsAssignableToFalseType1 = Types() - .That() - .Are(type) - .Should() - .BeAssignableTo(typeof(PublicTestClass)) - .AndShould() - .NotBe(typeof(PublicTestClass)); - var typeIsAssignableToFalseType2 = Types() - .That() - .Are(type) - .Should() - .BeAssignableTo(StaticTestTypes.PublicTestClass) - .AndShould() - .NotBe(typeof(PublicTestClass)); - - Assert.True(typeIsAssignableToItself.HasNoViolations(Architecture)); - Assert.False(typeIsNotAssignableToItself.HasNoViolations(Architecture)); - Assert.True(typeIsNotAssignableToFalseType1.HasNoViolations(Architecture)); - Assert.True(typeIsNotAssignableToFalseType2.HasNoViolations(Architecture)); - Assert.False(typeIsAssignableToFalseType1.HasNoViolations(Architecture)); - Assert.False(typeIsAssignableToFalseType2.HasNoViolations(Architecture)); - //Multiple Arguments - - var typeIsAssignableToItselfFluent = Types() - .That() - .Are(type) - .Should() - .BeAssignableTo(Types().That().Are(type)); - var typeIsNotAssignableToItselfFluent = Types() - .That() - .Are(type) - .Should() - .NotBeAssignableTo(Types().That().Are(type)); - var typeIsNotAssignableToFalseTypeMultiple1 = Types() - .That() - .Are(type) - .Should() - .NotBeAssignableTo(falseTypeList1) - .OrShould() - .Be(falseTypeList1); - var typeIsNotAssignableToFalseTypeMultiple2 = Types() - .That() - .Are(type) - .Should() - .NotBeAssignableTo(falseTypeList2) - .OrShould() - .Be(falseTypeList1); - var typeIsAssignableToFalseTypeMultiple1 = Types() - .That() - .Are(type) - .Should() - .BeAssignableTo(falseTypeList1) - .AndShould() - .NotBe(falseTypeList1); - var typeIsAssignableToFalseTypeMultiple2 = Types() - .That() - .Are(type) - .Should() - .BeAssignableTo(falseTypeList2) - .AndShould() - .NotBe(falseTypeList1); - - Assert.True(typeIsAssignableToItselfFluent.HasNoViolations(Architecture)); - Assert.False(typeIsNotAssignableToItselfFluent.HasNoViolations(Architecture)); - Assert.True(typeIsNotAssignableToFalseTypeMultiple1.HasNoViolations(Architecture)); - Assert.True(typeIsNotAssignableToFalseTypeMultiple2.HasNoViolations(Architecture)); - Assert.False(typeIsAssignableToFalseTypeMultiple1.HasNoViolations(Architecture)); - Assert.False(typeIsAssignableToFalseTypeMultiple2.HasNoViolations(Architecture)); - } - } + helper.AddSnapshotHeader("No Violations"); + var should = Types().That().Are(helper.ClassWithoutMembers).Should(); - [Fact] - public void NestedInTest() - { - Classes() - .That() - .AreNestedIn(typeof(PublicTestClass)) - .Should() - .Be(typeof(PublicTestClass.ChildClass)) - .AndShould() - .Exist() - .Check(Architecture); - - Classes() - .That() - .AreNestedIn(typeof(PublicTestClass)) - .Should() - .NotBe(typeof(PublicTestClass)) - .AndShould() - .Exist() - .Check(Architecture); - - Classes() - .That() - .AreNestedIn(StaticTestTypes.PublicTestClass) - .Should() - .Be(typeof(PublicTestClass.ChildClass)) - .AndShould() - .Exist() - .Check(Architecture); - - Classes() - .That() - .AreNestedIn(typeof(PublicTestClass.ChildClass)) - .Should() - .NotExist() - .Check(Architecture); - - Classes() - .That() - .AreNestedIn(typeof(PublicTestClass), typeof(InternalTestClass)) - .Should() - .Be(typeof(PublicTestClass.ChildClass)) - .AndShould() - .Exist() - .Check(Architecture); - - var typeList1 = new List { typeof(PublicTestClass), typeof(InternalTestClass) }; - var typeList2 = new List - { - StaticTestTypes.PublicTestClass, - StaticTestTypes.InternalTestClass, - }; - - Classes() - .That() - .AreNestedIn(typeList1) - .Should() - .Be(typeof(PublicTestClass.ChildClass)) - .AndShould() - .Exist() - .Check(Architecture); - Classes() - .That() - .AreNestedIn(typeList2) - .Should() - .Be(typeof(PublicTestClass.ChildClass)) - .AndShould() - .Exist() - .Check(Architecture); - } + helper.AddSnapshotSubHeader("Conditions"); + should.NotHavePropertyMemberWithName("PropertyA").AssertNoViolations(helper); - [Fact] - public void HaveFieldMemberWithNameTest() - { - foreach (var type in _types) - { - foreach (var fieldMember in type.GetFieldMembers()) - { - var typeHasFieldMember = Types() - .That() - .Are(type) - .Should() - .HaveFieldMemberWithName(fieldMember.Name); - var typeDoesNotHaveFieldMember = Types() - .That() - .Are(type) - .Should() - .NotHaveFieldMemberWithName(fieldMember.Name); - var typesWithFieldMemberShouldExist = Types() - .That() - .HaveFieldMemberWithName(fieldMember.Name) - .Should() - .Exist(); - var typesWithFieldMemberShouldBeOtherTypes = Types() - .That() - .HaveFieldMemberWithName(fieldMember.Name) - .Should() - .NotBe(type); - - Assert.True(typeHasFieldMember.HasNoViolations(Architecture)); - Assert.False(typeDoesNotHaveFieldMember.HasNoViolations(Architecture)); - Assert.True(typesWithFieldMemberShouldExist.HasNoViolations(Architecture)); - Assert.False( - typesWithFieldMemberShouldBeOtherTypes.HasNoViolations(Architecture) - ); - } - } + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().DoNotHavePropertyMemberWithName("PropertyA")).AssertNoViolations(helper); - foreach (var fieldMember in Architecture.FieldMembers) - { - var typesWithFieldMemberShouldHaveFieldMember = Types() - .That() - .HaveFieldMemberWithName(fieldMember.Name) - .Should() - .HaveFieldMemberWithName(fieldMember.Name); - var typesWithFieldMemberExist = Types() - .That() - .HaveFieldMemberWithName(fieldMember.Name) - .Should() - .Exist(); - - Assert.True( - typesWithFieldMemberShouldHaveFieldMember.HasNoViolations(Architecture) - ); - Assert.True(typesWithFieldMemberExist.HasNoViolations(Architecture)); - } - } + helper.AddSnapshotHeader("Violations"); + should = Types().That().Are(helper.ClassWithProperty).Should(); - [Fact] - public void HaveMemberWithNameTest() - { - foreach (var type in _types) - { - foreach (var member in type.Members) - { - var typeHasMember = Types() - .That() - .Are(type) - .Should() - .HaveMemberWithName(member.Name); - var typeDoesNotHaveMember = Types() - .That() - .Are(type) - .Should() - .NotHaveMemberWithName(member.Name); - var typesWithMemberShouldExist = Types() - .That() - .HaveMemberWithName(member.Name) - .Should() - .Exist(); - var typesWithMemberShouldBeOtherTypes = Types() - .That() - .HaveMemberWithName(member.Name) - .Should() - .NotBe(type); - - Assert.True(typeHasMember.HasNoViolations(Architecture)); - Assert.False(typeDoesNotHaveMember.HasNoViolations(Architecture)); - Assert.True(typesWithMemberShouldExist.HasNoViolations(Architecture)); - Assert.False(typesWithMemberShouldBeOtherTypes.HasNoViolations(Architecture)); - } - } + helper.AddSnapshotSubHeader("Conditions"); + should.NotHavePropertyMemberWithName("PropertyA").AssertOnlyViolations(helper); - foreach (var member in Architecture.Members) - { - var typesWithMemberShouldHaveMember = Types() - .That() - .HaveMemberWithName(member.Name) - .Should() - .HaveMemberWithName(member.Name); - var typesWithMemberExist = Types() - .That() - .HaveMemberWithName(member.Name) - .Should() - .Exist(); - - Assert.True(typesWithMemberShouldHaveMember.HasNoViolations(Architecture)); - Assert.True(typesWithMemberExist.HasNoViolations(Architecture)); - } + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().DoNotHavePropertyMemberWithName("PropertyA")).AssertOnlyViolations(helper); + + helper.AddSnapshotHeader("Multiple inputs"); + Types().That().Are(helper.ClassWithoutMembers, helper.ClassWithProperty).Should().NotHavePropertyMemberWithName("PropertyA").AssertAnyViolations(helper); + + await helper.AssertSnapshotMatches(); } [Fact] - public void HaveMethodMemberWithNameTest() + public async Task HaveFieldMemberWithNameTest() { - foreach (var type in _types) - { - foreach (var methodMember in type.GetMethodMembers()) - { - var typeHasMethodMember = Types() - .That() - .Are(type) - .Should() - .HaveMethodMemberWithName(methodMember.Name); - var typeDoesNotHaveMethodMember = Types() - .That() - .Are(type) - .Should() - .NotHaveMethodMemberWithName(methodMember.Name); - var typesWithMethodMemberShouldExist = Types() - .That() - .HaveMethodMemberWithName(methodMember.Name) - .Should() - .Exist(); - var typesWithMethodMemberShouldBeOtherTypes = Types() - .That() - .HaveMethodMemberWithName(methodMember.Name) - .Should() - .NotBe(type); - - Assert.True(typeHasMethodMember.HasNoViolations(Architecture)); - Assert.False(typeDoesNotHaveMethodMember.HasNoViolations(Architecture)); - Assert.True(typesWithMethodMemberShouldExist.HasNoViolations(Architecture)); - Assert.False( - typesWithMethodMemberShouldBeOtherTypes.HasNoViolations(Architecture) - ); - } - } + var helper = new TypeAssemblyTestHelper(); - foreach (var methodMember in Architecture.MethodMembers) - { - var typesWithMethodMemberShouldHaveMethodMember = Types() - .That() - .HaveMethodMemberWithName(methodMember.Name) - .Should() - .HaveMethodMemberWithName(methodMember.Name); - var typesWithMethodMemberExist = Types() - .That() - .HaveMethodMemberWithName(methodMember.Name) - .Should() - .Exist(); - - Assert.True( - typesWithMethodMemberShouldHaveMethodMember.HasNoViolations(Architecture) - ); - Assert.True(typesWithMethodMemberExist.HasNoViolations(Architecture)); - } + helper.AddSnapshotHeader("No Violations"); + var should = Types().That().Are(helper.ClassWithField).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should.HaveFieldMemberWithName("FieldA").AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().HaveFieldMemberWithName("FieldA")).AssertNoViolations(helper); + + helper.AddSnapshotHeader("Violations"); + should = Types().That().Are(helper.ClassWithoutMembers).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should.HaveFieldMemberWithName("FieldA").AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().HaveFieldMemberWithName("FieldA")).AssertOnlyViolations(helper); + + helper.AddSnapshotHeader("Multiple inputs"); + Types().That().Are(helper.ClassWithField, helper.ClassWithoutMembers).Should().HaveFieldMemberWithName("FieldA").AssertAnyViolations(helper); + + await helper.AssertSnapshotMatches(); } [Fact] - public void HavePropertyMemberWithNameTest() + public async Task NotHaveFieldMemberWithNameTest() { - foreach (var type in _types) - { - foreach (var propertyMember in type.GetPropertyMembers()) - { - var typeHasPropertyMember = Types() - .That() - .Are(type) - .Should() - .HavePropertyMemberWithName(propertyMember.Name); - var typeDoesNotHavePropertyMember = Types() - .That() - .Are(type) - .Should() - .NotHavePropertyMemberWithName(propertyMember.Name); - var typesWithPropertyMemberShouldExist = Types() - .That() - .HavePropertyMemberWithName(propertyMember.Name) - .Should() - .Exist(); - var typesWithPropertyMemberShouldBeOtherTypes = Types() - .That() - .HavePropertyMemberWithName(propertyMember.Name) - .Should() - .NotBe(type); - - Assert.True(typeHasPropertyMember.HasNoViolations(Architecture)); - Assert.False(typeDoesNotHavePropertyMember.HasNoViolations(Architecture)); - Assert.True(typesWithPropertyMemberShouldExist.HasNoViolations(Architecture)); - Assert.False( - typesWithPropertyMemberShouldBeOtherTypes.HasNoViolations(Architecture) - ); - } - } + var helper = new TypeAssemblyTestHelper(); - foreach (var propertyMember in Architecture.PropertyMembers) - { - var typesWithPropertyMemberShouldHavePropertyMember = Types() - .That() - .HavePropertyMemberWithName(propertyMember.Name) - .Should() - .HavePropertyMemberWithName(propertyMember.Name); - var typesWithPropertyMemberExist = Types() - .That() - .HavePropertyMemberWithName(propertyMember.Name) - .Should() - .Exist(); - - Assert.True( - typesWithPropertyMemberShouldHavePropertyMember.HasNoViolations(Architecture) - ); - Assert.True(typesWithPropertyMemberExist.HasNoViolations(Architecture)); - } + helper.AddSnapshotHeader("No Violations"); + var should = Types().That().Are(helper.ClassWithoutMembers).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should.NotHaveFieldMemberWithName("FieldA").AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().DoNotHaveFieldMemberWithName("FieldA")).AssertNoViolations(helper); + + helper.AddSnapshotHeader("Violations"); + should = Types().That().Are(helper.ClassWithField).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should.NotHaveFieldMemberWithName("FieldA").AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().DoNotHaveFieldMemberWithName("FieldA")).AssertOnlyViolations(helper); + + helper.AddSnapshotHeader("Multiple inputs"); + Types().That().Are(helper.ClassWithoutMembers, helper.ClassWithField).Should().NotHaveFieldMemberWithName("FieldA").AssertAnyViolations(helper); + + await helper.AssertSnapshotMatches(); } [Fact] - public void ImplementInterfaceTest() + public async Task HaveMethodMemberWithNameTest() { - foreach (var intf in Architecture.Interfaces) - { - var typesThatImplementInterfaceImplementInterface = Types() - .That() - .ImplementInterface(intf) - .Should() - .ImplementInterface(intf) - .WithoutRequiringPositiveResults(); - var typesThatImplementInterfaceDoNotImplementInterface = Types() - .That() - .ImplementInterface(intf) - .Should() - .NotImplementInterface(intf) - .AndShould() - .Exist(); - var typesThatDoNotImplementInterfaceImplementInterface = Types() - .That() - .DoNotImplementInterface(intf) - .Should() - .ImplementInterface(intf) - .AndShould() - .Exist(); - var typesThatDoNotImplementInterfaceDoNotImplementInterface = Types() - .That() - .DoNotImplementInterface(intf) - .Should() - .NotImplementInterface(intf); - var implementInterfaceIsEqualToAssignableTo = Types() - .That() - .ImplementInterface(intf) - .Should() - .BeAssignableTo(intf) - .And() - .Types() - .That() - .AreAssignableTo(intf) - .Should() - .ImplementInterface(intf) - .OrShould() - .Be(intf); - - Assert.True( - typesThatImplementInterfaceImplementInterface.HasNoViolations(Architecture) - ); - Assert.False( - typesThatImplementInterfaceDoNotImplementInterface.HasNoViolations(Architecture) - ); - Assert.False( - typesThatDoNotImplementInterfaceImplementInterface.HasNoViolations(Architecture) - ); - Assert.True( - typesThatDoNotImplementInterfaceDoNotImplementInterface.HasNoViolations( - Architecture - ) - ); - Assert.True(implementInterfaceIsEqualToAssignableTo.HasNoViolations(Architecture)); - } + var helper = new TypeAssemblyTestHelper(); - var testClassThatImplementsInterfaceImplementsInterface = Classes() - .That() - .Are(StaticTestTypes.InheritedType) - .Should() - .ImplementInterface(InheritedTestInterface); - var testClassThatImplementsOtherInterfaceImplementsInterfaces = Types() - .That() - .Are(StaticTestTypes.InheritedType) - .Should() - .ImplementInterface(InheritedTestInterface) - .AndShould() - .ImplementInterface(InheritingInterface); - var testInterfaceThatImplementsInterfaceImplementsInterface = Interfaces() - .That() - .Are(InheritingInterface) - .Should() - .ImplementInterface(InheritedTestInterface); - var testClassThatImplementsNoInterfaceDoesNotImplementInterface = Interfaces() - .That() - .Are(StaticTestTypes.PublicTestClass) - .Should() - .NotImplementInterface(InheritedTestInterface) - .WithoutRequiringPositiveResults(); - var testClassThatImplementsNoInterfaceImplementsInterface = Interfaces() - .That() - .Are(StaticTestTypes.PublicTestClass) - .Should() - .ImplementInterface(InheritedTestInterface) - .AndShould() - .Exist(); - - Assert.True( - testClassThatImplementsInterfaceImplementsInterface.HasNoViolations(Architecture) - ); - Assert.True( - testClassThatImplementsOtherInterfaceImplementsInterfaces.HasNoViolations( - Architecture - ) - ); - Assert.True( - testInterfaceThatImplementsInterfaceImplementsInterface.HasNoViolations( - Architecture - ) - ); - Assert.True( - testClassThatImplementsNoInterfaceDoesNotImplementInterface.HasNoViolations( - Architecture - ) - ); - Assert.False( - testClassThatImplementsNoInterfaceImplementsInterface.HasNoViolations(Architecture) - ); + helper.AddSnapshotHeader("No Violations"); + var should = Types().That().Are(helper.ClassWithMethod).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should.HaveMethodMemberWithName("MethodA()").AssertNoViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().HaveMethodMemberWithName("MethodA()")).AssertNoViolations(helper); + + helper.AddSnapshotHeader("Violations"); + should = Types().That().Are(helper.ClassWithoutMembers).Should(); + + helper.AddSnapshotSubHeader("Conditions"); + should.HaveMethodMemberWithName("MethodA()").AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + should.Be(Types().That().HaveMethodMemberWithName("MethodA()")).AssertOnlyViolations(helper); + + helper.AddSnapshotHeader("Multiple inputs"); + Types().That().Are(helper.ClassWithMethod, helper.ClassWithoutMembers).Should().HaveMethodMemberWithName("MethodA()").AssertAnyViolations(helper); + + await helper.AssertSnapshotMatches(); } [Fact] - public async Task ImplementAnyInterfacesTest() + public async Task NotHaveMethodMemberWithNameTest() { - var helper = new InterfaceAssemblyTestHelper(); + var helper = new TypeAssemblyTestHelper(); helper.AddSnapshotHeader("No Violations"); - var should = Interfaces().That().Are(helper.ChildInterface).Should(); + var should = Types().That().Are(helper.ClassWithoutMembers).Should(); helper.AddSnapshotSubHeader("Conditions"); - should.ImplementAnyInterfaces(helper.BaseInterface).AssertNoViolations(helper); - should.ImplementAnyInterfaces([helper.BaseInterface]).AssertNoViolations(helper); - should.ImplementAnyInterfaces(helper.BaseInterfaceSystemType).AssertNoViolations(helper); - should.ImplementAnyInterfaces([helper.BaseInterfaceSystemType]).AssertNoViolations(helper); - should.ImplementAnyInterfaces(Interfaces().That().Are(helper.BaseInterface)).AssertNoViolations(helper); + should.NotHaveMethodMemberWithName("MethodA()").AssertNoViolations(helper); helper.AddSnapshotSubHeader("Predicates"); - should.Be(Interfaces().That().ImplementAnyInterfaces(helper.BaseInterface)).AssertNoViolations(helper); - should.Be(Interfaces().That().ImplementAnyInterfaces([helper.BaseInterface])).AssertNoViolations(helper); - should.Be(Interfaces().That().ImplementAnyInterfaces(helper.BaseInterfaceSystemType)).AssertNoViolations(helper); - should.Be(Interfaces().That().ImplementAnyInterfaces([helper.BaseInterfaceSystemType])).AssertNoViolations(helper); - should.Be(Interfaces().That().ImplementAnyInterfaces(Interfaces().That().Are(helper.BaseInterface))).AssertNoViolations(helper); - - helper.AddSnapshotSubHeader("Predicates as conditions"); - should.BeTypesThat().ImplementAnyInterfaces(helper.BaseInterface).AssertNoViolations(helper); - should.BeTypesThat().ImplementAnyInterfaces([helper.BaseInterface]).AssertNoViolations(helper); - should.BeTypesThat().ImplementAnyInterfaces(helper.BaseInterfaceSystemType).AssertNoViolations(helper); - should.BeTypesThat().ImplementAnyInterfaces([helper.BaseInterfaceSystemType]).AssertNoViolations(helper); - should.BeTypesThat().ImplementAnyInterfaces(Interfaces().That().Are(helper.BaseInterface)).AssertNoViolations(helper); - - helper.AddSnapshotSubHeader("Complex conditions"); - should.ImplementAnyInterfacesThat().Are(helper.BaseInterface).AssertNoViolations(helper); + should.Be(Types().That().DoNotHaveMethodMemberWithName("MethodA()")).AssertNoViolations(helper); helper.AddSnapshotHeader("Violations"); - should = Interfaces().That().Are(helper.ChildInterface).Should(); - + should = Types().That().Are(helper.ClassWithMethod).Should(); + helper.AddSnapshotSubHeader("Conditions"); - should.ImplementAnyInterfaces(helper.OtherBaseInterface).AssertOnlyViolations(helper); - should.ImplementAnyInterfaces([helper.OtherBaseInterface]).AssertOnlyViolations(helper); - should.ImplementAnyInterfaces(helper.OtherBaseInterfaceSystemType).AssertOnlyViolations(helper); - should.ImplementAnyInterfaces([helper.OtherBaseInterfaceSystemType]).AssertOnlyViolations(helper); - should.ImplementAnyInterfaces(Interfaces().That().Are(helper.OtherBaseInterface)).AssertOnlyViolations(helper); - + should.NotHaveMethodMemberWithName("MethodA()").AssertOnlyViolations(helper); + helper.AddSnapshotSubHeader("Predicates"); - should.Be(Interfaces().That().ImplementAnyInterfaces(helper.OtherBaseInterface)).AssertOnlyViolations(helper); - should.Be(Interfaces().That().ImplementAnyInterfaces([helper.OtherBaseInterface])).AssertOnlyViolations(helper); - should.Be(Interfaces().That().ImplementAnyInterfaces(helper.OtherBaseInterfaceSystemType)).AssertOnlyViolations(helper); - should.Be(Interfaces().That().ImplementAnyInterfaces([helper.OtherBaseInterfaceSystemType])).AssertOnlyViolations(helper); - should.Be(Interfaces().That().ImplementAnyInterfaces(Interfaces().That().Are(helper.OtherBaseInterface))).AssertOnlyViolations(helper); - - helper.AddSnapshotSubHeader("Predicates as conditions"); - should.BeTypesThat().ImplementAnyInterfaces(helper.OtherBaseInterface).AssertOnlyViolations(helper); - should.BeTypesThat().ImplementAnyInterfaces([helper.OtherBaseInterface]).AssertOnlyViolations(helper); - should.BeTypesThat().ImplementAnyInterfaces(helper.OtherBaseInterfaceSystemType).AssertOnlyViolations(helper); - should.BeTypesThat().ImplementAnyInterfaces([helper.OtherBaseInterfaceSystemType]).AssertOnlyViolations(helper); - should.BeTypesThat().ImplementAnyInterfaces(Interfaces().That().Are(helper.OtherBaseInterface)).AssertOnlyViolations(helper); - - helper.AddSnapshotSubHeader("Complex conditions"); - should.ImplementAnyInterfacesThat().Are(helper.OtherBaseInterface).AssertOnlyViolations(helper); + should.Be(Types().That().DoNotHaveMethodMemberWithName("MethodA()")).AssertOnlyViolations(helper); + + helper.AddSnapshotHeader("Multiple inputs"); + Types().That().Are(helper.ClassWithoutMembers, helper.ClassWithMethod).Should().NotHaveMethodMemberWithName("MethodA()").AssertAnyViolations(helper); + + await helper.AssertSnapshotMatches(); + } + + [Fact] + public async Task HaveMemberWithNameTest() + { + var helper = new TypeAssemblyTestHelper(); + + helper.AddSnapshotHeader("No Violations"); + var should = Types().That().Are(helper.ClassWithAllMembers).Should(); - helper.AddSnapshotHeader("Empty Arguments (Only Violations)"); - should = Interfaces().That().Are(helper.BaseInterface, helper.ChildInterface).Should(); - helper.AddSnapshotSubHeader("Conditions"); - should.ImplementAnyInterfaces().AssertOnlyViolations(helper); - should.ImplementAnyInterfaces(new List()).AssertOnlyViolations(helper); - should.ImplementAnyInterfaces(new List()).AssertOnlyViolations(helper); - should.ImplementAnyInterfaces(Interfaces().That().HaveName(helper.NonExistentObjectName)).AssertOnlyViolations(helper); - + should.HaveMemberWithName("PropertyB").AssertNoViolations(helper); + helper.AddSnapshotSubHeader("Predicates"); - should.Be(Interfaces().That().ImplementAnyInterfaces()).AssertOnlyViolations(helper); - should.Be(Interfaces().That().ImplementAnyInterfaces(new List())).AssertOnlyViolations(helper); - should.Be(Interfaces().That().ImplementAnyInterfaces(new List())).AssertOnlyViolations(helper); - should.Be(Interfaces().That().ImplementAnyInterfaces(Interfaces().That().HaveName(helper.NonExistentObjectName))).AssertOnlyViolations(helper); - - helper.AddSnapshotSubHeader("Predicates as conditions"); - should.BeTypesThat().ImplementAnyInterfaces(); - should.BeTypesThat().ImplementAnyInterfaces(new List()).AssertOnlyViolations(helper); - should.BeTypesThat().ImplementAnyInterfaces(new List()).AssertOnlyViolations(helper); - should.BeTypesThat().ImplementAnyInterfaces(Interfaces().That().HaveName(helper.NonExistentObjectName)).AssertOnlyViolations(helper); - - helper.AddSnapshotSubHeader("Complex conditions"); - should.ImplementAnyInterfacesThat().Are(new List()).AssertOnlyViolations(helper); - - helper.AddSnapshotHeader("Multiple arguments"); - should = Interfaces().That().Are(helper.ChildInterface).Should(); - + should.Be(Types().That().HaveMemberWithName("PropertyB")).AssertNoViolations(helper); + + helper.AddSnapshotHeader("Violations"); + should = Types().That().Are(helper.ClassWithoutMembers).Should(); + helper.AddSnapshotSubHeader("Conditions"); - should.ImplementAnyInterfaces(helper.OtherBaseInterface, helper.OtherChildInterface).AssertOnlyViolations(helper); - should.ImplementAnyInterfaces([helper.OtherBaseInterface, helper.OtherChildInterface]).AssertOnlyViolations(helper); - should.ImplementAnyInterfaces(helper.OtherBaseInterfaceSystemType, helper.OtherChildInterfaceSystemType).AssertOnlyViolations(helper); - should.ImplementAnyInterfaces([helper.OtherBaseInterfaceSystemType, helper.OtherChildInterfaceSystemType]).AssertOnlyViolations(helper); - should.ImplementAnyInterfaces(Interfaces().That().Are(helper.OtherBaseInterface, helper.OtherChildInterface)).AssertOnlyViolations(helper); - + should.HaveMemberWithName("PropertyB").AssertOnlyViolations(helper); + helper.AddSnapshotSubHeader("Predicates"); - should.Be(Interfaces().That().ImplementAnyInterfaces(helper.OtherBaseInterface, helper.OtherChildInterface)).AssertOnlyViolations(helper); - should.Be(Interfaces().That().ImplementAnyInterfaces([helper.OtherBaseInterface, helper.OtherChildInterface])).AssertOnlyViolations(helper); - should.Be(Interfaces().That().ImplementAnyInterfaces(helper.OtherBaseInterfaceSystemType, helper.OtherChildInterfaceSystemType)).AssertOnlyViolations(helper); - should.Be(Interfaces().That().ImplementAnyInterfaces([helper.OtherBaseInterfaceSystemType, helper.OtherChildInterfaceSystemType])).AssertOnlyViolations(helper); - should.Be(Interfaces().That().ImplementAnyInterfaces(Interfaces().That().Are(helper.OtherBaseInterface, helper.OtherChildInterface))).AssertOnlyViolations(helper); - - helper.AddSnapshotSubHeader("Predicates as conditions"); - should.BeTypesThat().ImplementAnyInterfaces(helper.OtherBaseInterface, helper.OtherChildInterface).AssertOnlyViolations(helper); - should.BeTypesThat().ImplementAnyInterfaces([helper.OtherBaseInterface, helper.OtherChildInterface]).AssertOnlyViolations(helper); - should.BeTypesThat().ImplementAnyInterfaces(helper.OtherBaseInterfaceSystemType, helper.OtherChildInterfaceSystemType).AssertOnlyViolations(helper); - should.BeTypesThat().ImplementAnyInterfaces([helper.OtherBaseInterfaceSystemType, helper.OtherChildInterfaceSystemType]).AssertOnlyViolations(helper); - should.BeTypesThat().ImplementAnyInterfaces(Interfaces().That().Are(helper.OtherBaseInterface, helper.OtherChildInterface)).AssertOnlyViolations(helper); - - helper.AddSnapshotSubHeader("Complex conditions"); - should.ImplementAnyInterfacesThat().Are(helper.OtherBaseInterface, helper.OtherChildInterface).AssertOnlyViolations(helper); - should.ImplementAnyInterfacesThat().Are([helper.OtherBaseInterface, helper.OtherChildInterface]).AssertOnlyViolations(helper); - should.ImplementAnyInterfacesThat().Are(helper.OtherBaseInterfaceSystemType, helper.OtherChildInterfaceSystemType).AssertOnlyViolations(helper); - should.ImplementAnyInterfacesThat().Are([helper.OtherBaseInterfaceSystemType, helper.OtherChildInterfaceSystemType]).AssertOnlyViolations(helper); - should.ImplementAnyInterfacesThat().Are(Interfaces().That().Are(helper.OtherBaseInterface, helper.OtherChildInterface)).AssertOnlyViolations(helper); + should.Be(Types().That().HaveMemberWithName("PropertyB")).AssertOnlyViolations(helper); + + helper.AddSnapshotHeader("Multiple inputs"); + Types().That().Are(helper.ClassWithAllMembers, helper.ClassWithoutMembers).Should().HaveMemberWithName("PropertyB").AssertAnyViolations(helper); - helper.AddSnapshotSubHeader("Complex conditions"); - should.ImplementAnyInterfacesThat().Are(helper.OtherBaseInterface, helper.OtherChildInterface).AssertOnlyViolations(helper); - await helper.AssertSnapshotMatches(); } [Fact] - public async Task NotImplementAnyInterfacesTest() + public async Task NotHaveMemberWithNameTest() { - var helper = new InterfaceAssemblyTestHelper(); + var helper = new TypeAssemblyTestHelper(); helper.AddSnapshotHeader("No Violations"); - var should = Interfaces().That().Are(helper.ChildInterface).Should(); + var should = Types().That().Are(helper.ClassWithoutMembers).Should(); helper.AddSnapshotSubHeader("Conditions"); - should.NotImplementAnyInterfaces(helper.OtherBaseInterface).AssertNoViolations(helper); - should.NotImplementAnyInterfaces([helper.OtherBaseInterface]).AssertNoViolations(helper); - should.NotImplementAnyInterfaces(helper.OtherBaseInterfaceSystemType).AssertNoViolations(helper); - should.NotImplementAnyInterfaces([helper.OtherBaseInterfaceSystemType]).AssertNoViolations(helper); - should.NotImplementAnyInterfaces(Interfaces().That().Are(helper.OtherBaseInterface)).AssertNoViolations(helper); + should.NotHaveMemberWithName("PropertyB").AssertNoViolations(helper); helper.AddSnapshotSubHeader("Predicates"); - should.Be(Interfaces().That().DoNotImplementAnyInterfaces(helper.OtherBaseInterface)).AssertNoViolations(helper); - should.Be(Interfaces().That().DoNotImplementAnyInterfaces([helper.OtherBaseInterface])).AssertNoViolations(helper); - should.Be(Interfaces().That().DoNotImplementAnyInterfaces(helper.OtherBaseInterfaceSystemType)).AssertNoViolations(helper); - should.Be(Interfaces().That().DoNotImplementAnyInterfaces([helper.OtherBaseInterfaceSystemType])).AssertNoViolations(helper); - should.Be(Interfaces().That().DoNotImplementAnyInterfaces(Interfaces().That().Are(helper.OtherBaseInterface))).AssertNoViolations(helper); - - helper.AddSnapshotSubHeader("Predicates as conditions"); - should.BeTypesThat().DoNotImplementAnyInterfaces(helper.OtherBaseInterface).AssertNoViolations(helper); - should.BeTypesThat().DoNotImplementAnyInterfaces([helper.OtherBaseInterface]).AssertNoViolations(helper); - should.BeTypesThat().DoNotImplementAnyInterfaces(helper.OtherBaseInterfaceSystemType).AssertNoViolations(helper); - should.BeTypesThat().DoNotImplementAnyInterfaces([helper.OtherBaseInterfaceSystemType]).AssertNoViolations(helper); - should.BeTypesThat().DoNotImplementAnyInterfaces(Interfaces().That().Are(helper.OtherBaseInterface)).AssertNoViolations(helper); - - helper.AddSnapshotSubHeader("Complex conditions"); - should.NotImplementAnyInterfacesThat().Are(helper.OtherBaseInterface).AssertNoViolations(helper); + should.Be(Types().That().DoNotHaveMemberWithName("PropertyB")).AssertNoViolations(helper); helper.AddSnapshotHeader("Violations"); - should = Interfaces().That().Are(helper.ChildInterface).Should(); - + should = Types().That().Are(helper.ClassWithAllMembers).Should(); + helper.AddSnapshotSubHeader("Conditions"); - should.NotImplementAnyInterfaces(helper.BaseInterface).AssertOnlyViolations(helper); - should.NotImplementAnyInterfaces([helper.BaseInterface]).AssertOnlyViolations(helper); - should.NotImplementAnyInterfaces(helper.BaseInterfaceSystemType).AssertOnlyViolations(helper); - should.NotImplementAnyInterfaces([helper.BaseInterfaceSystemType]).AssertOnlyViolations(helper); - should.NotImplementAnyInterfaces(Interfaces().That().Are(helper.BaseInterface)).AssertOnlyViolations(helper); - + should.NotHaveMemberWithName("PropertyB").AssertOnlyViolations(helper); + helper.AddSnapshotSubHeader("Predicates"); - should.Be(Interfaces().That().DoNotImplementAnyInterfaces(helper.BaseInterface)).AssertOnlyViolations(helper); - should.Be(Interfaces().That().DoNotImplementAnyInterfaces([helper.BaseInterface])).AssertOnlyViolations(helper); - should.Be(Interfaces().That().DoNotImplementAnyInterfaces(helper.BaseInterfaceSystemType)).AssertOnlyViolations(helper); - should.Be(Interfaces().That().DoNotImplementAnyInterfaces([helper.BaseInterfaceSystemType])).AssertOnlyViolations(helper); - should.Be(Interfaces().That().DoNotImplementAnyInterfaces(Interfaces().That().Are(helper.BaseInterface))).AssertOnlyViolations(helper); - - helper.AddSnapshotSubHeader("Predicates as conditions"); - should.BeTypesThat().DoNotImplementAnyInterfaces(helper.BaseInterface).AssertOnlyViolations(helper); - should.BeTypesThat().DoNotImplementAnyInterfaces([helper.BaseInterface]).AssertOnlyViolations(helper); - should.BeTypesThat().DoNotImplementAnyInterfaces(helper.BaseInterfaceSystemType).AssertOnlyViolations(helper); - should.BeTypesThat().DoNotImplementAnyInterfaces([helper.BaseInterfaceSystemType]).AssertOnlyViolations(helper); - should.BeTypesThat().DoNotImplementAnyInterfaces(Interfaces().That().Are(helper.BaseInterface)).AssertOnlyViolations(helper); - - helper.AddSnapshotSubHeader("Complex conditions"); - should.NotImplementAnyInterfacesThat().Are(helper.BaseInterface).AssertOnlyViolations(helper); - - helper.AddSnapshotHeader("Empty Arguments (No Violations)"); - should = Interfaces().That().Are(helper.BaseInterface, helper.ChildInterface).Should(); - + should.Be(Types().That().DoNotHaveMemberWithName("PropertyB")).AssertOnlyViolations(helper); + + helper.AddSnapshotHeader("Multiple inputs"); + Types().That().Are(helper.ClassWithoutMembers, helper.ClassWithAllMembers).Should().NotHaveMemberWithName("PropertyB").AssertAnyViolations(helper); + + await helper.AssertSnapshotMatches(); + } + + [Fact] + public async Task BeNestedTest() + { + var helper = new TypeAssemblyTestHelper(); + + helper.AddSnapshotHeader("No Violations"); helper.AddSnapshotSubHeader("Conditions"); - should.NotImplementAnyInterfaces().AssertNoViolations(helper); - should.NotImplementAnyInterfaces(new List()).AssertNoViolations(helper); - should.NotImplementAnyInterfaces(new List()).AssertNoViolations(helper); - should.NotImplementAnyInterfaces(Interfaces().That().HaveName(helper.NonExistentObjectName)).AssertNoViolations(helper); - + Types().That().Are(helper.InnerClassA).Should().BeNested().AssertNoViolations(helper); + helper.AddSnapshotSubHeader("Predicates"); - should.Be(Interfaces().That().DoNotImplementAnyInterfaces()).AssertNoViolations(helper); - should.Be(Interfaces().That().DoNotImplementAnyInterfaces(new List())).AssertNoViolations(helper); - should.Be(Interfaces().That().DoNotImplementAnyInterfaces(new List())).AssertNoViolations(helper); - should.Be(Interfaces().That().DoNotImplementAnyInterfaces(Interfaces().That().HaveName(helper.NonExistentObjectName))).AssertNoViolations(helper); - - helper.AddSnapshotSubHeader("Predicates as conditions"); - should.BeTypesThat().DoNotImplementAnyInterfaces().AssertNoViolations(helper); - should.BeTypesThat().DoNotImplementAnyInterfaces(new List()).AssertNoViolations(helper); - should.BeTypesThat().DoNotImplementAnyInterfaces(new List()).AssertNoViolations(helper); - should.BeTypesThat().DoNotImplementAnyInterfaces(Interfaces().That().HaveName(helper.NonExistentObjectName)).AssertNoViolations(helper); - - helper.AddSnapshotSubHeader("Complex conditions"); - should.NotImplementAnyInterfacesThat().Are(new List()).AssertNoViolations(helper); - - helper.AddSnapshotHeader("Multiple arguments"); - should = Interfaces().That().Are(helper.ChildInterface).Should(); - + Types().That().Are(helper.InnerClassA).Should().Be(Types().That().AreNested()).AssertNoViolations(helper); + + helper.AddSnapshotHeader("Violations"); helper.AddSnapshotSubHeader("Conditions"); - should.NotImplementAnyInterfaces(helper.BaseInterface, helper.OtherBaseInterface).AssertOnlyViolations(helper); - should.NotImplementAnyInterfaces([helper.BaseInterface, helper.OtherBaseInterface]).AssertOnlyViolations(helper); - should.NotImplementAnyInterfaces(helper.BaseInterfaceSystemType, helper.OtherBaseInterfaceSystemType).AssertOnlyViolations(helper); - should.NotImplementAnyInterfaces([helper.BaseInterfaceSystemType, helper.OtherBaseInterfaceSystemType]).AssertOnlyViolations(helper); - should.NotImplementAnyInterfaces(Interfaces().That().Are(helper.BaseInterface, helper.OtherBaseInterface)).AssertOnlyViolations(helper); - + Types().That().Are(helper.NonNestedClass).Should().BeNested().AssertOnlyViolations(helper); + helper.AddSnapshotSubHeader("Predicates"); - should.Be(Interfaces().That().DoNotImplementAnyInterfaces(helper.BaseInterface, helper.OtherBaseInterface)).AssertOnlyViolations(helper); - should.Be(Interfaces().That().DoNotImplementAnyInterfaces([helper.BaseInterface, helper.OtherBaseInterface])).AssertOnlyViolations(helper); - should.Be(Interfaces().That().DoNotImplementAnyInterfaces(helper.BaseInterfaceSystemType, helper.OtherBaseInterfaceSystemType)).AssertOnlyViolations(helper); - should.Be(Interfaces().That().DoNotImplementAnyInterfaces([helper.BaseInterfaceSystemType, helper.OtherBaseInterfaceSystemType])).AssertOnlyViolations(helper); - should.Be(Interfaces().That().DoNotImplementAnyInterfaces(Interfaces().That().Are(helper.BaseInterface, helper.OtherBaseInterface))).AssertOnlyViolations(helper); - - helper.AddSnapshotSubHeader("Predicates as conditions"); - should.BeTypesThat().DoNotImplementAnyInterfaces(helper.BaseInterface, helper.OtherBaseInterface).AssertOnlyViolations(helper); - should.BeTypesThat().DoNotImplementAnyInterfaces([helper.BaseInterface, helper.OtherBaseInterface]).AssertOnlyViolations(helper); - should.BeTypesThat().DoNotImplementAnyInterfaces(helper.BaseInterfaceSystemType, helper.OtherBaseInterfaceSystemType).AssertOnlyViolations(helper); - should.BeTypesThat().DoNotImplementAnyInterfaces([helper.BaseInterfaceSystemType, helper.OtherBaseInterfaceSystemType]).AssertOnlyViolations(helper); - should.BeTypesThat().DoNotImplementAnyInterfaces(Interfaces().That().Are(helper.BaseInterface, helper.OtherBaseInterface)).AssertOnlyViolations(helper); - - helper.AddSnapshotSubHeader("Complex conditions"); - should.NotImplementAnyInterfacesThat().Are(helper.BaseInterface, helper.OtherBaseInterface).AssertOnlyViolations(helper); - + Types().That().Are(helper.NonNestedClass).Should().Be(Types().That().AreNested()).AssertOnlyViolations(helper); + + helper.AddSnapshotHeader("Multiple inputs"); + Types().That().Are(helper.InnerClassA, helper.OtherInnerClassA).Should().BeNested().AssertNoViolations(helper); + Types().That().Are(helper.InnerClassA, helper.NonNestedClass).Should().BeNested().AssertAnyViolations(helper); + await helper.AssertSnapshotMatches(); } [Fact] - public void ResideInAssemblyTest() + public async Task NotBeNestedTest() { - foreach (var type in _types) - { - { - var typeResidesInOwnAssembly = Types() - .That() - .Are(type) - .Should() - .ResideInAssembly(type.Assembly.FullName); - var typeDoesNotResideInOwnAssembly = Types() - .That() - .Are(type) - .Should() - .NotResideInAssembly(type.Assembly.FullName); - var thereAreTypesInOwnAssembly = Types() - .That() - .ResideInAssembly(type.Assembly.FullName) - .Should() - .Exist(); - var typesInOtherAssemblyAreOtherTypes = Types() - .That() - .DoNotResideInAssembly(type.Assembly.FullName) - .Should() - .NotBe(type) - .WithoutRequiringPositiveResults(); - - Assert.True(typeResidesInOwnAssembly.HasNoViolations(Architecture)); - Assert.False(typeDoesNotResideInOwnAssembly.HasNoViolations(Architecture)); - Assert.True(thereAreTypesInOwnAssembly.HasNoViolations(Architecture)); - Assert.True(typesInOtherAssemblyAreOtherTypes.HasNoViolations(Architecture)); - } + var helper = new TypeAssemblyTestHelper(); - { - var typeResidesInOwnAssembly = Types() - .That() - .Are(type) - .Should() - .ResideInAssembly(type.Assembly); - var typeDoesNotResideInOwnAssembly = Types() - .That() - .Are(type) - .Should() - .NotResideInAssembly(type.Assembly); - var thereAreTypesInOwnAssembly = Types() - .That() - .ResideInAssembly(type.Assembly) - .Should() - .Exist(); - var typesInOtherAssemblyAreOtherTypes = Types() - .That() - .DoNotResideInAssembly(type.Assembly) - .Should() - .NotBe(type) - .WithoutRequiringPositiveResults(); - - Assert.True(typeResidesInOwnAssembly.HasNoViolations(Architecture)); - Assert.False(typeDoesNotResideInOwnAssembly.HasNoViolations(Architecture)); - Assert.True(thereAreTypesInOwnAssembly.HasNoViolations(Architecture)); - Assert.True(typesInOtherAssemblyAreOtherTypes.HasNoViolations(Architecture)); - } - } + helper.AddSnapshotHeader("No Violations"); + helper.AddSnapshotSubHeader("Conditions"); + Types().That().Are(helper.NonNestedClass).Should().NotBeNested().AssertNoViolations(helper); - foreach (var assembly in Architecture.Assemblies.Select(assembly => assembly.FullName)) - { - var typesInAssemblyAreInAssembly = Types() - .That() - .ResideInAssembly(assembly) - .Should() - .ResideInAssembly(assembly); - var typesInOtherAssemblyAreInOtherAssembly = Types() - .That() - .DoNotResideInAssembly(assembly) - .Should() - .NotResideInAssembly(assembly) - .WithoutRequiringPositiveResults(); - - Assert.True(typesInAssemblyAreInAssembly.HasNoViolations(Architecture)); - Assert.True(typesInOtherAssemblyAreInOtherAssembly.HasNoViolations(Architecture)); - } + helper.AddSnapshotSubHeader("Predicates"); + Types().That().Are(helper.NonNestedClass).Should().Be(Types().That().AreNotNested()).AssertNoViolations(helper); - foreach (var assembly in Architecture.Assemblies) - { - var typesInAssemblyAreInAssembly = Types() - .That() - .ResideInAssembly(assembly) - .Should() - .ResideInAssembly(assembly); - var typesInOtherAssemblyAreInOtherAssembly = Types() - .That() - .DoNotResideInAssembly(assembly) - .Should() - .NotResideInAssembly(assembly) - .WithoutRequiringPositiveResults(); - - Assert.True(typesInAssemblyAreInAssembly.HasNoViolations(Architecture)); - Assert.True(typesInOtherAssemblyAreInOtherAssembly.HasNoViolations(Architecture)); - } + helper.AddSnapshotHeader("Violations"); + helper.AddSnapshotSubHeader("Conditions"); + Types().That().Are(helper.InnerClassA).Should().NotBeNested().AssertOnlyViolations(helper); + + helper.AddSnapshotSubHeader("Predicates"); + Types().That().Are(helper.InnerClassA).Should().Be(Types().That().AreNotNested()).AssertOnlyViolations(helper); + + helper.AddSnapshotHeader("Multiple inputs"); + Types().That().Are(helper.NonNestedClass, helper.RegularClass).Should().NotBeNested().AssertNoViolations(helper); + Types().That().Are(helper.NonNestedClass, helper.InnerClassA).Should().NotBeNested().AssertAnyViolations(helper); - var testClassIsInRightAssembly = Types() - .That() - .Are(typeof(PublicTestClass)) - .Should() - .ResideInAssembly(typeof(PublicTestClass).Assembly); - var testClassIsInFalseAssembly = Types() - .That() - .Are(typeof(PublicTestClass)) - .Should() - .NotResideInAssembly(typeof(PublicTestClass).Assembly); - var typesInRightAssemblyDoNotContainTestClass = Types() - .That() - .ResideInAssembly(typeof(PublicTestClass).Assembly) - .Should() - .NotBe(typeof(PublicTestClass)); - - Assert.True(testClassIsInRightAssembly.HasNoViolations(Architecture)); - Assert.False(testClassIsInFalseAssembly.HasNoViolations(Architecture)); - Assert.False(typesInRightAssemblyDoNotContainTestClass.HasNoViolations(Architecture)); + await helper.AssertSnapshotMatches(); } [Fact] - public void ResideInNamespaceTest() + public void AdhereToPlantUmlDiagramStreamTest() { - foreach (var type in _types) - { - var typeResidesInOwnNamespace = Types() - .That() - .Are(type) - .Should() - .ResideInNamespace(type.Namespace.FullName); - var typeDoesNotResideInOwnNamespace = Types() - .That() - .Are(type) - .Should() - .NotResideInNamespace(type.Namespace.FullName); - var thereAreTypesInOwnNamespace = Types() - .That() - .ResideInNamespace(type.Namespace.FullName) - .Should() - .Exist(); - var typesInOtherNamespaceAreOtherTypes = Types() - .That() - .DoNotResideInNamespace(type.Namespace.FullName) - .Should() - .NotBe(type); - - Assert.True(typeResidesInOwnNamespace.HasNoViolations(Architecture)); - Assert.False(typeDoesNotResideInOwnNamespace.HasNoViolations(Architecture)); - Assert.True(thereAreTypesInOwnNamespace.HasNoViolations(Architecture)); - Assert.True(typesInOtherNamespaceAreOtherTypes.HasNoViolations(Architecture)); - } + var architecture = new ArchLoader() + .LoadNamespacesWithinAssembly( + typeof(IndependentClass).Assembly, + "TestAssembly.Diagram.NoDependencies" + ) + .Build(); - foreach (var namespc in Architecture.Namespaces.Select(namespc => namespc.FullName)) + // No violations: diagram correctly represents no cross-namespace dependencies + using (var stream = new MemoryStream()) { - var typesInNamespaceAreInNamespace = Types() - .That() - .ResideInNamespace(namespc) - .Should() - .ResideInNamespace(namespc); - var typesInOtherNamespaceAreInOtherNamespace = Types() - .That() - .DoNotResideInNamespace(namespc) - .Should() - .NotResideInNamespace(namespc); - - Assert.True(typesInNamespaceAreInNamespace.HasNoViolations(Architecture)); - Assert.True(typesInOtherNamespaceAreInOtherNamespace.HasNoViolations(Architecture)); + TestDiagram.From(stream) + .Component("A") + .WithStereoTypes("TestAssembly.Diagram.NoDependencies.Independent.*") + .Component("B") + .WithStereoTypes("TestAssembly.Diagram.NoDependencies.SomeNamespace.*") + .Write(); + + var rule = Types().Should().AdhereToPlantUmlDiagram(stream); + Assert.True(rule.HasNoViolations(architecture)); } - } - [Fact] - public void AreEnumsTest() - { - foreach (var type in _types) + // No violations: defined but unused dependency is allowed + using (var stream = new MemoryStream()) { - var isEnum = type is Enum; - var typeIsEnum = Types().That().Are(type).Should().BeEnums(); - var typeIsNotEnum = Types().That().Are(type).Should().NotBeEnums(); - var enumsDoNotIncludeType = Types().That().AreEnums().Should().NotBe(type); - var notEnumsDoNotIncludeType = Types().That().AreNotEnums().Should().NotBe(type); - - Assert.Equal(isEnum, typeIsEnum.HasNoViolations(Architecture)); - Assert.Equal(!isEnum, typeIsNotEnum.HasNoViolations(Architecture)); - Assert.Equal(!isEnum, enumsDoNotIncludeType.HasNoViolations(Architecture)); - Assert.Equal(isEnum, notEnumsDoNotIncludeType.HasNoViolations(Architecture)); + TestDiagram.From(stream) + .Component("A") + .WithStereoTypes("TestAssembly.Diagram.NoDependencies.Independent.*") + .Component("B") + .WithStereoTypes("TestAssembly.Diagram.NoDependencies.SomeNamespace.*") + .DependencyFrom("A").To("B") + .Write(); + + var rule = Types().Should().AdhereToPlantUmlDiagram(stream); + Assert.True(rule.HasNoViolations(architecture)); } - } - [Fact] - public void AreStructsTest() - { - foreach (var type in _types) + // Violations: SimpleDependency has a real cross-namespace dependency without a diagram arrow + var simpleDependencyArchitecture = new ArchLoader() + .LoadNamespacesWithinAssembly( + typeof(IndependentClass).Assembly, + "TestAssembly.Diagram.SimpleDependency" + ) + .Build(); + + using (var stream = new MemoryStream()) { - var isStruct = type is Struct; - var typeIsStruct = Types().That().Are(type).Should().BeStructs(); - var typeIsNotStruct = Types().That().Are(type).Should().NotBeStructs(); - var structsDoNotIncludeType = Types().That().AreStructs().Should().NotBe(type); - var notStructsDoNotIncludeType = Types() - .That() - .AreNotStructs() - .Should() - .NotBe(type); - - Assert.Equal(isStruct, typeIsStruct.HasNoViolations(Architecture)); - Assert.Equal(!isStruct, typeIsNotStruct.HasNoViolations(Architecture)); - Assert.Equal(!isStruct, structsDoNotIncludeType.HasNoViolations(Architecture)); - Assert.Equal(isStruct, notStructsDoNotIncludeType.HasNoViolations(Architecture)); + TestDiagram.From(stream) + .Component("Origin") + .WithStereoTypes("TestAssembly.Diagram.SimpleDependency.Origin.*") + .Component("Target") + .WithStereoTypes("TestAssembly.Diagram.SimpleDependency.Target.*") + .Write(); + + var rule = Types().Should().AdhereToPlantUmlDiagram(stream); + Assert.False(rule.HasNoViolations(simpleDependencyArchitecture)); } - } - [Fact] - public void AreValueTypesTest() - { - foreach (var type in _types) + // No violations: SimpleDependency with correct arrow + using (var stream = new MemoryStream()) { - var isValueType = type is Struct || type is Enum; - var typeIsValueType = Types().That().Are(type).Should().BeValueTypes(); - var typeIsNotValueType = Types().That().Are(type).Should().NotBeValueTypes(); - var valueTypesDoNotIncludeType = Types() - .That() - .AreValueTypes() - .Should() - .NotBe(type); - var notValueTypesDoNotIncludeType = Types() - .That() - .AreNotValueTypes() - .Should() - .NotBe(type); - - Assert.Equal(isValueType, typeIsValueType.HasNoViolations(Architecture)); - Assert.Equal(!isValueType, typeIsNotValueType.HasNoViolations(Architecture)); - Assert.Equal( - !isValueType, - valueTypesDoNotIncludeType.HasNoViolations(Architecture) - ); - Assert.Equal( - isValueType, - notValueTypesDoNotIncludeType.HasNoViolations(Architecture) - ); + TestDiagram.From(stream) + .Component("Origin") + .WithStereoTypes("TestAssembly.Diagram.SimpleDependency.Origin.*") + .Component("Target") + .WithStereoTypes("TestAssembly.Diagram.SimpleDependency.Target.*") + .DependencyFrom("Origin").To("Target") + .Write(); + + var rule = Types().Should().AdhereToPlantUmlDiagram(stream); + Assert.True(rule.HasNoViolations(simpleDependencyArchitecture)); } } [Fact] - public void TypesThatAreNotNestedMustBeVisible() + public void AdhereToPlantUmlDiagramFileTest() { - var typesThatAreNotNestedMustBeVisible = Types() - .That() - .AreNotNested() - .Should() - .BePublic() - .OrShould() - .BeInternal(); - typesThatAreNotNestedMustBeVisible.Check(Architecture); - } + var architecture = new ArchLoader() + .LoadNamespacesWithinAssembly( + typeof(IndependentClass).Assembly, + "TestAssembly.Diagram.SimpleDependency" + ) + .Build(); - [Fact] - public void TypesWithRestrictedVisibilityMustBeNested() - { - var typesWithRestrictedVisibilityMustBeNested = Types() - .That() - .ArePrivate() - .Or() - .AreProtected() - .Or() - .ArePrivateProtected() - .Or() - .AreProtectedInternal() - .Should() - .BeNested(); - typesWithRestrictedVisibilityMustBeNested.Check(Architecture); + string path = Path.Combine( + Path.GetTempPath(), + "plantuml_type_test_" + Guid.NewGuid() + ".puml" + ); + + try + { + // No violations: file overload with correct dependency arrow + using (FileStream fileStream = File.Create(path)) + { + TestDiagram.From(fileStream) + .Component("Origin") + .WithStereoTypes("TestAssembly.Diagram.SimpleDependency.Origin.*") + .Component("Target") + .WithStereoTypes("TestAssembly.Diagram.SimpleDependency.Target.*") + .DependencyFrom("Origin").To("Target") + .Write(); + } + + var rule = Types().Should().AdhereToPlantUmlDiagram(path); + Assert.True(rule.HasNoViolations(architecture)); + } + finally + { + if (File.Exists(path)) + File.Delete(path); + } } } } diff --git a/ArchUnitNETTests/StaticTestArchitectures.cs b/ArchUnitNETTests/StaticTestArchitectures.cs index ca69fa9c7..f05c652ef 100644 --- a/ArchUnitNETTests/StaticTestArchitectures.cs +++ b/ArchUnitNETTests/StaticTestArchitectures.cs @@ -4,6 +4,7 @@ using ArchUnitNETTests.Domain.Dependencies.Attributes; using ArchUnitNETTests.Domain.Dependencies.Members; using TestAssembly; +using TypeNamespace; // ReSharper disable InconsistentNaming @@ -25,7 +26,7 @@ public static class StaticTestArchitectures .LoadAssemblies(typeof(AttributeNamespace.ClassWithoutAttributes).Assembly) .Build(); - public static readonly Architecture DependencyArchitecture = new ArchLoader() + public static readonly Architecture TypeDependencyArchitecture = new ArchLoader() .WithoutRuleEvaluationCache() .WithoutArchitectureCache() .LoadAssemblies(typeof(TypeDependencyNamespace.BaseClass).Assembly) @@ -37,12 +38,6 @@ public static class StaticTestArchitectures .LoadAssemblies(typeof(MethodDependencyNamespace.MethodDependencyClass).Assembly) .Build(); - public static readonly Architecture InterfaceArchitecture = new ArchLoader() - .WithoutRuleEvaluationCache() - .WithoutArchitectureCache() - .LoadAssemblies(typeof(InterfaceAssembly.IBaseInterface).Assembly) - .Build(); - public static readonly Architecture LoaderTestArchitecture = new ArchLoader() .WithoutRuleEvaluationCache() .WithoutArchitectureCache() @@ -58,6 +53,12 @@ public static class StaticTestArchitectures .LoadAssemblies(typeof(VisibilityNamespace.PublicClass).Assembly) .Build(); + public static readonly Architecture TypeArchitecture = new ArchLoader() + .WithoutRuleEvaluationCache() + .WithoutArchitectureCache() + .LoadAssemblies(typeof(TypeNamespace.RegularClass).Assembly) + .Build(); + public static readonly Architecture ArchUnitNETTestAssemblyArchitecture = new ArchLoader() .LoadAssemblies(typeof(Class1).Assembly) .Build(); diff --git a/TestAssemblies/InterfaceAssembly/Interfaces.cs b/TestAssemblies/InterfaceAssembly/Interfaces.cs deleted file mode 100644 index 8a211ee08..000000000 --- a/TestAssemblies/InterfaceAssembly/Interfaces.cs +++ /dev/null @@ -1,13 +0,0 @@ -namespace InterfaceAssembly; - -public interface IBaseInterface; - -public interface IChildInterface : IBaseInterface; - -public interface IOtherBaseInterface; - -public interface IOtherChildInterface : IOtherBaseInterface; - -public interface IInterfaceWithMultipleDependencies : IBaseInterface, IOtherBaseInterface; - -public interface IInterfaceWithoutDependencies; diff --git a/TestAssemblies/DependencyAssembly/MethodDependency.cs b/TestAssemblies/MethodDependencyAssembly/MethodDependency.cs similarity index 100% rename from TestAssemblies/DependencyAssembly/MethodDependency.cs rename to TestAssemblies/MethodDependencyAssembly/MethodDependency.cs diff --git a/TestAssemblies/InterfaceAssembly/InterfaceAssembly.csproj b/TestAssemblies/MethodDependencyAssembly/MethodDependencyAssembly.csproj similarity index 92% rename from TestAssemblies/InterfaceAssembly/InterfaceAssembly.csproj rename to TestAssemblies/MethodDependencyAssembly/MethodDependencyAssembly.csproj index 51fae4aaa..6865534e9 100644 --- a/TestAssemblies/InterfaceAssembly/InterfaceAssembly.csproj +++ b/TestAssemblies/MethodDependencyAssembly/MethodDependencyAssembly.csproj @@ -1,4 +1,4 @@ - + net10.0 enable diff --git a/TestAssemblies/TypeAssembly/Type.cs b/TestAssemblies/TypeAssembly/Type.cs new file mode 100644 index 000000000..8f55005d2 --- /dev/null +++ b/TestAssemblies/TypeAssembly/Type.cs @@ -0,0 +1,103 @@ +namespace TypeNamespace; + +// Enums +public enum SimpleEnum +{ + Value1, + Value2, + Value3, +} + +public enum OtherEnum +{ + A, + B, +} + +// Structs +public struct SimpleStruct +{ + public int Value; +} + +public struct OtherStruct +{ + public string Name; +} + +// Regular classes (not value types) +public class RegularClass { } + +public class OtherRegularClass { } + +// Member classes +public class ClassWithProperty +{ + public string PropertyA { get; set; } = ""; +} + +public class ClassWithField +{ + public int FieldA; +} + +public class ClassWithMethod +{ + public void MethodA() { } +} + +public class ClassWithAllMembers +{ + public string PropertyB { get; set; } = ""; + public int FieldB; + + public void MethodB() { } +} + +public class ClassWithoutMembers { } + +// Nested classes +public class OuterClassA +{ + public class InnerClassA { } + + public class OtherInnerClassA { } +} + +public class OuterClassB +{ + public class InnerClassB { } +} + +public class NonNestedClass { } + +// Interfaces +public interface ITestInterface { } + +public interface IOtherTestInterface { } + +public interface IChildTestInterface : ITestInterface { } + +public interface IOtherChildTestInterface : IOtherTestInterface { } + +public interface IMultiParentTestInterface : ITestInterface, IOtherTestInterface { } + +public interface IStandaloneTestInterface { } + +// Interface implementation +public class ClassImplementingInterface : ITestInterface { } + +public class ClassNotImplementingInterface { } + +// Assignability +public class BaseClassForAssign { } + +public class OtherBaseClassForAssign { } + +public class DerivedClassForAssign : BaseClassForAssign { } + +public class OtherDerivedClassForAssign : BaseClassForAssign { } + +public class UnrelatedClassForAssign { } + +public class OtherUnrelatedClassForAssign { } diff --git a/TestAssemblies/DependencyAssembly/DependencyAssembly.csproj b/TestAssemblies/TypeAssembly/TypeAssembly.csproj similarity index 89% rename from TestAssemblies/DependencyAssembly/DependencyAssembly.csproj rename to TestAssemblies/TypeAssembly/TypeAssembly.csproj index a1e76f5ad..6865534e9 100644 --- a/TestAssemblies/DependencyAssembly/DependencyAssembly.csproj +++ b/TestAssemblies/TypeAssembly/TypeAssembly.csproj @@ -1,12 +1,12 @@ - - - net10.0 - enable - enable - true - false - True - ..\..\strongNameKey.snk - 1.0.0.0 - - + + + net10.0 + enable + enable + true + false + True + ..\..\strongNameKey.snk + 1.0.0.0 + + diff --git a/TestAssemblies/DependencyAssembly/TypeDependency.cs b/TestAssemblies/TypeDependencyAssembly/TypeDependency.cs similarity index 93% rename from TestAssemblies/DependencyAssembly/TypeDependency.cs rename to TestAssemblies/TypeDependencyAssembly/TypeDependency.cs index 779651f18..6ed3e4455 100644 --- a/TestAssemblies/DependencyAssembly/TypeDependency.cs +++ b/TestAssemblies/TypeDependencyAssembly/TypeDependency.cs @@ -1,65 +1,65 @@ -namespace TypeDependencyNamespace; - -public abstract class BaseClass { } - -public class ChildClass : BaseClass { } - -public class OtherChildClass : BaseClass { } - -public abstract class BaseClassWithMember -{ - public string BaseClassMember { get; set; } = ""; -} - -public class ChildClassWithMember : BaseClassWithMember -{ - public string ChildClassMember { get; set; } = ""; -} - -public class OtherChildClassWithMember : BaseClassWithMember -{ - public string OtherChildClassMember { get; set; } = ""; -} - -public abstract class BaseClassWithMultipleDependencies { } - -public class ChildClass1 : BaseClassWithMultipleDependencies { } - -public class ChildClass2 : BaseClassWithMultipleDependencies { } - -public class OtherBaseClass { } - -public class ClassWithMultipleDependencies -{ - public BaseClassWithMember? _baseClass; - public OtherBaseClass? _otherBaseClass; -} - -public abstract class GenericBaseClass - where TSelf : class { } - -public class ChildClassOfGeneric : GenericBaseClass { } - -public class ClassWithoutDependencies { } - -public class OtherClassWithoutDependencies { } - -public class ClassWithReferencedTypeDependency -{ - List _referencedTypeDependency = []; -} - -// https://github.com/TNG/ArchUnitNET/issues/351 -class Issue351 -{ - public void OuterFunc() - { - LocalFunc(); - - void LocalFunc() - { - var list = new List(); - list.GroupBy(x => x).ToDictionary(g => g.Key, g => (IReadOnlyCollection)g.ToList()); - } - } -} +namespace TypeDependencyNamespace; + +public abstract class BaseClass { } + +public class ChildClass : BaseClass { } + +public class OtherChildClass : BaseClass { } + +public abstract class BaseClassWithMember +{ + public string BaseClassMember { get; set; } = ""; +} + +public class ChildClassWithMember : BaseClassWithMember +{ + public string ChildClassMember { get; set; } = ""; +} + +public class OtherChildClassWithMember : BaseClassWithMember +{ + public string OtherChildClassMember { get; set; } = ""; +} + +public abstract class BaseClassWithMultipleDependencies { } + +public class ChildClass1 : BaseClassWithMultipleDependencies { } + +public class ChildClass2 : BaseClassWithMultipleDependencies { } + +public class OtherBaseClass { } + +public class ClassWithMultipleDependencies +{ + public BaseClassWithMember? _baseClass; + public OtherBaseClass? _otherBaseClass; +} + +public abstract class GenericBaseClass + where TSelf : class { } + +public class ChildClassOfGeneric : GenericBaseClass { } + +public class ClassWithoutDependencies { } + +public class OtherClassWithoutDependencies { } + +public class ClassWithReferencedTypeDependency +{ + List _referencedTypeDependency = []; +} + +// https://github.com/TNG/ArchUnitNET/issues/351 +class Issue351 +{ + public void OuterFunc() + { + LocalFunc(); + + void LocalFunc() + { + var list = new List(); + list.GroupBy(x => x).ToDictionary(g => g.Key, g => (IReadOnlyCollection)g.ToList()); + } + } +} diff --git a/TestAssemblies/TypeDependencyAssembly/TypeDependencyAssembly.csproj b/TestAssemblies/TypeDependencyAssembly/TypeDependencyAssembly.csproj new file mode 100644 index 000000000..6865534e9 --- /dev/null +++ b/TestAssemblies/TypeDependencyAssembly/TypeDependencyAssembly.csproj @@ -0,0 +1,12 @@ + + + net10.0 + enable + enable + true + false + True + ..\..\strongNameKey.snk + 1.0.0.0 + +