コード例 #1
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);
        }
コード例 #2
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);
        }
コード例 #3
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");
        }
コード例 #4
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("");
        }