public void All_Interfaces_Are_In_Contracts_Namespace()
        {
            IArchRule interfacesShouldBeInContractsLayer =
                ArchRuleDefinition.Interfaces().That().Are(Interfaces).Should().Be(InterfaceLayer);

            Assert.IsTrue(interfacesShouldBeInContractsLayer.HasNoViolations(Architecture));
        }
Exemplo n.º 2
0
        public void All_Classes_Have_Correct_Namespace()
        {
            IArchRule classesHaveCorrectNamespace =
                ArchRuleDefinition.Classes().That().Are(Classes).Should().Be(Layer);
            IArchRule interfacesHaveCorrectNamespace =
                ArchRuleDefinition.Interfaces().That().Are(Interfaces).Should().Be(Layer);

            IArchRule combinedArchRule =
                classesHaveCorrectNamespace.And(interfacesHaveCorrectNamespace);

            Assert.IsTrue(combinedArchRule.HasNoViolations(Architecture));
        }