Ejemplo n.º 1
0
        public void TestRegexNoMatch()
        {
            var matcher = new RegexMatcher("Not pr.*nt", false);
            var content = new StringContentProvider("Simple test text content.");

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

            Assert.Equal(0, matches.Count);
        }
Ejemplo n.º 2
0
        public void TestRegexMatch()
        {
            var matcher = new RegexMatcher("tex[Tt]", 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);
        }
Ejemplo n.º 3
0
        public void TestMultipleSimpleMatch()
        {
            var matcher = new SimpleMatcher("te", false);
            var content = new StringContentProvider("Simple test text content.");

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

            Assert.Equal(3, matches.Count);
            Assert.Equal(8, matches[0].Index);
            Assert.Equal(13, matches[1].Index);
            Assert.Equal(21, matches[2].Index);
        }
Ejemplo n.º 4
0
 public GridCell(StringContentProvider strProv)
 {
     StringContent = strProv;
 }