public void Namespace_spec_should_not_match_if_namespace_is_different()
        {
            var specification = new NamespaceSpecification("wahwahwah");
            var codeReference = new CodeReference("", "some.test.namespace", "", "", "");
            var testData      = new TestData("id", "name", "fullName")
            {
                CodeReference = codeReference
            };

            var matches = specification.Matches(new TestDataNode(testData));

            Assert.IsFalse(matches);
        }
        public void Namespace_spec_should_not_match_if_namespace_is_different()
        {
            var specification = new NamespaceSpecification("wahwahwah");
            var codeReference = new CodeReference("", "some.test.namespace", "", "", "");
            var testData = new TestData("id", "name", "fullName")
            {
                CodeReference = codeReference
            };

            var matches = specification.Matches(new TestDataNode(testData));

            Assert.IsFalse(matches);
        }
        public void Namespace_spec_should_match_on_partial_namespace()
        {
            var specification = new NamespaceSpecification("test");
            var codeReference = new CodeReference("", "some.test.namespace", "", "", "");
            var testData      = new TestData("id", "name", "fullName")
            {
                CodeReference = codeReference
            };

            var matches = specification.Matches(new TestDataNode(testData));

            Assert.IsTrue(matches);
        }
        public void Namespace_spec_should_match_on_partial_namespace()
        {
            var specification = new NamespaceSpecification("test");
            var codeReference = new CodeReference("", "some.test.namespace", "", "", "");
            var testData = new TestData("id", "name", "fullName")
            {
                CodeReference = codeReference
            };

            var matches = specification.Matches(new TestDataNode(testData));

            Assert.IsTrue(matches);
        }
Пример #5
0
 public DependencyRule(NamespaceSpecification from, NamespaceSpecification to)
 {
     this.From = from;
     this.To   = to;
 }