public TextViewMock(ITextBuffer textBuffer, int caretPosition) { TextBuffer = textBuffer; TextDataModel = new TextDataModelMock(TextBuffer); TextViewModel = new TextViewModelMock(textBuffer); Caret = new TextCaretMock(this, caretPosition); Selection = new TextSelectionMock(this, new TextRange(caretPosition, 0)); TextViewLines = new TextViewLineCollectionMock(TextBuffer); BufferGraph = new BufferGraphMock(TextBuffer); }
public TextViewMock(ITextBuffer textBuffer, int caretPosition) { TextBuffer = textBuffer; TextDataModel = new TextDataModelMock(TextBuffer); TextViewModel = new TextViewModelMock(textBuffer); Caret = new TextCaretMock(this, caretPosition); Selection = new TextSelectionMock(this, new TextRange(caretPosition, 0)); TextViewLines = new TextViewLineCollectionMock(TextBuffer); BufferGraph = new BufferGraphMock(TextBuffer); var view = new EditorView(this); Properties.AddProperty(typeof(IEditorView), view); }