public void TextProvider_IndexOf_Range1() { var text = "Quick brown fox jumps over the lazy dog"; var textBuffer = new TextBufferMock(text, "text"); var textProvider = new TextProvider(textBuffer.CurrentSnapshot, 10); textProvider.IndexOf("uick", new TextRange(1, 4), true).Should().Be(1); textProvider.IndexOf("uick", new TextRange(1, 5), true).Should().Be(1); textProvider.IndexOf("uick", new TextRange(1, 3), false).Should().Be(-1); textProvider.IndexOf("uick", new TextRange(1, 0), false).Should().Be(-1); }
public void TextProvider_IndexOf2() { var text = "Quick brown fox jumps over the lazy dog"; var textBuffer = new TextBufferMock(text, "text"); var textProvider = new TextProvider(textBuffer.CurrentSnapshot, 10); textProvider.IndexOf("o", new TextRange(3, 7), true).Should().Be(8); }
public void TextProvider_IndexOf1() { var text = "Quick brown fox jumps over the lazy dog"; var textBuffer = new TextBufferMock(text, "text"); var textProvider = new TextProvider(textBuffer.CurrentSnapshot, 10); textProvider.IndexOf("fox", 0, true).Should().Be(12); }