예제 #1
0
        public void Should_GetTagValue_return_prefixed_value()
        {
            var matcher = new TagFilterMatcher();

            var tags = new string[] {"mytag:foo"};

            string value;
            matcher.GetTagValue("@mytag", tags, out value).Should().Be(true);
            value.Should().Be("foo");
        }
예제 #2
0
        public void Should_GetTagValue_returns_false_when_no_match()
        {
            var matcher = new TagFilterMatcher();

            var tags = new string[] {"othertag"};

            string value;
            matcher.GetTagValue("@mytag", tags, out value).Should().Be(false);
        }
예제 #3
0
        public void Should_GetTagValue_returns_empty_when_exact_match()
        {
            var matcher = new TagFilterMatcher();

            var tags = new string[] {"mytag"};

            string value;
            matcher.GetTagValue("@mytag", tags, out value).Should().Be(true);
            value.Should().Be("");
        }
예제 #4
0
        public void Should_GetTagValue_returns_false_when_null_tag_list()
        {
            var matcher = new TagFilterMatcher();

            string[] tags = null;

            string value;
            matcher.GetTagValue("@mytag", tags, out value).Should().Be(false);
        }