Ejemplo n.º 1
0
        public void two_interesting_tags_return_true()
        {
            var tagClassifier     = new TagClassifier();
            var uninterestingTags = new Dictionary <string, object>
            {
                { "interesting1", "1" },
                { "interesting2", "2" },
            };

            Assert.IsTrue(tagClassifier.AreInteresting(uninterestingTags));
        }
Ejemplo n.º 2
0
        public void two_interesting_tags_and_one_ignored_returns_true()
        {
            var tagClassifier     = new TagClassifier();
            var uninterestingTags = new Dictionary <string, object>
            {
                { "interesting1", "1" },
                { "interesting2", "2" },
            };

            var tagsToIgnore = new Dictionary <string, object>
            {
                { "interesting1", "1" }
            };

            Assert.IsTrue(tagClassifier.AreInteresting(uninterestingTags, tagsToIgnore));
        }
Ejemplo n.º 3
0
        public void two_interesting_tags_and_both_ignored_but_match_value_set_to_fales_returns_false()
        {
            var tagClassifier     = new TagClassifier();
            var uninterestingTags = new Dictionary <string, object>
            {
                { "interesting1", "1" },
                { "interesting2", "2" },
            };

            var tagsToIgnore = new Dictionary <string, object>
            {
                { "interesting1", "sdf" },
                { "interesting2", "fds" },
            };

            Assert.IsFalse(tagClassifier.AreInteresting(uninterestingTags, tagsToIgnore, false));
        }
Ejemplo n.º 4
0
        public void two_interesting_tags_and_both_ignored_but_with_different_values_returns_true()
        {
            var tagClassifier     = new TagClassifier();
            var uninterestingTags = new Dictionary <string, object>
            {
                { "interesting1", "1" },
                { "interesting2", "2" },
            };

            var tagsToIgnore = new Dictionary <string, object>
            {
                { "interesting1", "one" },
                { "interesting2", "two" },
            };

            Assert.IsTrue(tagClassifier.AreInteresting(uninterestingTags, tagsToIgnore));
        }
Ejemplo n.º 5
0
        public void uninteresting_tags_return_false()
        {
            var tagClassifier     = new TagClassifier();
            var uninterestingTags = new Dictionary <string, object>
            {
                { "source", "" },
                { "source_ref", "" },
                { "source:ref", "" },
                { "history", "" },
                { "attribution", "" },
                { "created_by", "" },
                { "tiger:county", "" },
                { "tiger:tlid", "" },
                { "tiger:upload_uuid", "" }
            };

            Assert.IsFalse(tagClassifier.AreInteresting(uninterestingTags));
        }
Ejemplo n.º 6
0
        public void uninteresting_tags_plus_a_single_interesting_tag_returns_true()
        {
            var tagClassifier     = new TagClassifier();
            var uninterestingTags = new Dictionary <string, object>
            {
                { "source", "" },
                { "source_ref", "" },
                { "source:ref", "" },
                { "history", "" },
                { "attribution", "" },
                { "created_by", "" },
                { "tiger:county", "" },
                { "tiger:tlid", "" },
                { "tiger:upload_uuid", "" },
                { "somethinginteresting", "foo" }
            };

            Assert.IsTrue(tagClassifier.AreInteresting(uninterestingTags));
        }