コード例 #1
0
        public void TestSimpleNoMatch()
        {
            var matcher = new SimpleMatcher("Not present", false);
            var content = new StringContentProvider("Simple test text content.");

            var matches = matcher.GetMatches(content).Result;

            Assert.Equal(0, matches.Count);
        }
コード例 #2
0
        public void TestSimpleMatch()
        {
            var matcher = new SimpleMatcher("text", false);
            var content = new StringContentProvider("Simple test text content.");

            var matches = matcher.GetMatches(content).Result;

            Assert.Equal(1, matches.Count);
            Assert.Equal(13, matches[0].Index);
        }