public virtual void Test_TextFilter_FindAll_Regex_NoMatch() { TextMatchFilter filter = TextMatchFilter.Regex(this.olv, "[yz]+"); List <CharacterRange> ranges = new List <CharacterRange>(filter.FindAllMatchedRanges("x-abcd-ABCD")); Assert.AreEqual(0, ranges.Count); }
public virtual void Test_TextFilter_FindAll_StringStart_NoMatch() { TextMatchFilter filter = TextMatchFilter.Prefix(this.olv, "abc"); List <CharacterRange> ranges = new List <CharacterRange>(filter.FindAllMatchedRanges("x-abcd-ABCD")); Assert.AreEqual(0, ranges.Count); }
public virtual void Test_TextFilter_FindAll_Text_NoMatch_Multiple() { TextMatchFilter filter = TextMatchFilter.Contains(this.olv, "xyz", "jpp"); List <CharacterRange> ranges = new List <CharacterRange>(filter.FindAllMatchedRanges("x-abcd-ABCD")); Assert.AreEqual(0, ranges.Count); }
public virtual void Test_TextFilter_FindAll_StringStart_Multiple() { TextMatchFilter filter = TextMatchFilter.Prefix(this.olv, "xyz", "abc"); List <CharacterRange> ranges = new List <CharacterRange>(filter.FindAllMatchedRanges("abcd-ABCD")); Assert.AreEqual(1, ranges.Count); Assert.AreEqual(0, ranges[0].First); Assert.AreEqual(3, ranges[0].Length); }
public virtual void Test_TextFilter_FindAll_Regex_Multiple() { TextMatchFilter filter = TextMatchFilter.Regex(this.olv, "x.*z", "a.*c"); List <CharacterRange> ranges = new List <CharacterRange>(filter.FindAllMatchedRanges("rst-ABC-rst-xyz")); Assert.AreEqual(2, ranges.Count); Assert.AreEqual(12, ranges[0].First); Assert.AreEqual(3, ranges[0].Length); Assert.AreEqual(4, ranges[1].First); Assert.AreEqual(3, ranges[1].Length); }
public virtual void Test_TextFilter_FindAll_Text() { TextMatchFilter filter = new TextMatchFilter(this.olv, "abc"); List <CharacterRange> ranges = new List <CharacterRange>(filter.FindAllMatchedRanges("x-abcd-ABCD")); Assert.AreEqual(2, ranges.Count); Assert.AreEqual(2, ranges[0].First); Assert.AreEqual(3, ranges[0].Length); Assert.AreEqual(7, ranges[1].First); Assert.AreEqual(3, ranges[1].Length); }
public virtual void Test_TextFilter_FindAll_Text_Multiple() { TextMatchFilter filter = TextMatchFilter.Contains(this.olv, "abc", "DE"); List <CharacterRange> ranges = new List <CharacterRange>(filter.FindAllMatchedRanges("x-abcd-ABCDE")); Assert.AreEqual(3, ranges.Count); Assert.AreEqual(2, ranges[0].First); Assert.AreEqual(3, ranges[0].Length); Assert.AreEqual(7, ranges[1].First); Assert.AreEqual(3, ranges[1].Length); Assert.AreEqual(10, ranges[2].First); Assert.AreEqual(2, ranges[2].Length); }
public virtual void Test_TextFilter_FindAll_Regex() { TextMatchFilter filter = TextMatchFilter.Regex(this.olv, "[abcd]+"); List <CharacterRange> ranges = new List <CharacterRange>(filter.FindAllMatchedRanges("nada-abcd-ab-ABCD")); Assert.AreEqual(4, ranges.Count); Assert.AreEqual(1, ranges[0].First); Assert.AreEqual(3, ranges[0].Length); Assert.AreEqual(5, ranges[1].First); Assert.AreEqual(4, ranges[1].Length); Assert.AreEqual(10, ranges[2].First); Assert.AreEqual(2, ranges[2].Length); Assert.AreEqual(13, ranges[3].First); Assert.AreEqual(4, ranges[3].Length); }
public virtual void Test_TextFilter_FindAll_Text_NoMatch() { TextMatchFilter filter = new TextMatchFilter(this.olv, "xyz"); List<CharacterRange> ranges = new List<CharacterRange>(filter.FindAllMatchedRanges("x-abcd-ABCD")); Assert.AreEqual(0, ranges.Count); }
public virtual void Test_TextFilter_FindAll_Text() { TextMatchFilter filter = new TextMatchFilter(this.olv, "abc"); List<CharacterRange> ranges = new List<CharacterRange>(filter.FindAllMatchedRanges("x-abcd-ABCD")); Assert.AreEqual(2, ranges.Count); Assert.AreEqual(2, ranges[0].First); Assert.AreEqual(3, ranges[0].Length); Assert.AreEqual(7, ranges[1].First); Assert.AreEqual(3, ranges[1].Length); }