public void Name_spec_should_not_match_if_no_metadata_matches()
        {
            var specification = new MetadataSpecification("test", "node");

            var matches = specification.Matches(new TestDataNode(new TestData("id", 
                "name", "fullName")));

            Assert.IsFalse(matches);
        }
Beispiel #2
0
        public void Name_spec_should_not_match_if_no_metadata_matches()
        {
            var specification = new MetadataSpecification("test", "node");

            var matches = specification.Matches(new TestDataNode(new TestData("id",
                                                                              "name", "fullName")));

            Assert.IsFalse(matches);
        }
        public void Name_spec_should_match_on_partial_text()
        {
            const string metadataKey = "test";
            var specification = new MetadataSpecification(metadataKey, "node");
            var testData = new TestData("id", "name", "fullName");
            testData.Metadata.Add(metadataKey, "some node text");

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

            Assert.IsTrue(matches);
        }
Beispiel #4
0
        public void Name_spec_should_match_on_partial_text()
        {
            const string metadataKey   = "test";
            var          specification = new MetadataSpecification(metadataKey, "node");
            var          testData      = new TestData("id", "name", "fullName");

            testData.Metadata.Add(metadataKey, "some node text");

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

            Assert.IsTrue(matches);
        }