Пример #1
0
        public void TopicParser_WithSingleLevelWildcards_MatchesExpectedExamples(string pattern, string sample, bool expectedMatch)
        {
            var tp  = new TopicParser();
            var reg = tp.ToMatchingRegex(pattern);

            _testOutputHelper.WriteLine(pattern);
            _testOutputHelper.WriteLine(reg.ToString());
            _testOutputHelper.WriteLine(sample);

            var match = reg.Match(sample);

            Assert.Equal(expectedMatch, match.Success);
        }
Пример #2
0
        public void TopicParser_WithMultipleMultiLevelWildcards_ThrowsArgumentException(string pattern)
        {
            var tp = new TopicParser();

            Assert.Throws <ArgumentException>(() => tp.ToMatchingRegex(pattern));
        }