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); }
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); }
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); }
public GridCell(StringContentProvider strProv) { StringContent = strProv; }