Ejemplo n.º 1
0
        protected void AssertLinesSelected(IWpfTextView textView, TestText expectedText, int selectionStartLine,
                                           int?selectionEndLine)
        {
// commented line is selected
            Assert.Equal(expectedText.GetLineStartPosition(selectionStartLine), textView.Selection.Start.Position);
            Assert.Equal(expectedText.GetLineEndPosition(selectionEndLine ?? selectionStartLine),
                         textView.Selection.End.Position);

            // cursor moved to end of selection
            Assert.Equal(textView.Selection.End.Position, textView.Caret.Position.BufferPosition.Position);
        }