public void Create(params string[] lines) { _textBuffer = EditorUtil.CreateBuffer(lines); _factory = new MockRepository(MockBehavior.Strict); _textCaret = _factory.Create<ITextCaret>(); _textView = MockObjectFactory.CreateTextView(textBuffer: _textBuffer, caret: _textCaret.Object, factory: _factory); _buffer = MockObjectFactory.CreateVimBuffer(textView: _textView.Object, factory: _factory); _operations = _factory.Create<ICommonOperations>(); _operations.Setup(x => x.MoveCaretToPoint(It.IsAny<SnapshotPoint>())); _operations.Setup(x => x.EnsureCaretOnScreenAndTextExpanded()); _modeRaw = new SubstituteConfirmMode(_buffer.Object, _operations.Object); _mode = _modeRaw; }
public void Create(params string[] lines) { _textBuffer = EditorUtil.CreateBuffer(lines); _factory = new MockRepository(MockBehavior.Strict); _textCaret = _factory.Create <ITextCaret>(); _textView = MockObjectFactory.CreateTextView(textBuffer: _textBuffer, caret: _textCaret.Object, factory: _factory); _buffer = MockObjectFactory.CreateVimBuffer(textView: _textView.Object, factory: _factory); _operations = _factory.Create <ICommonOperations>(); _operations.Setup(x => x.MoveCaretToPoint(It.IsAny <SnapshotPoint>())); _operations.Setup(x => x.EnsureCaretOnScreenAndTextExpanded()); _modeRaw = new SubstituteConfirmMode(_buffer.Object, _operations.Object); _mode = _modeRaw; }
public void Create(params string[] lines) { _textView = CreateTextView(lines); _textBuffer = _textView.TextBuffer; _factory = new MockRepository(MockBehavior.Strict); _editorOperations = _factory.Create<IEditorOperations>(); _operations = _factory.Create<ICommonOperations>(); _operations.Setup(x => x.MoveCaretToPoint(It.IsAny<SnapshotPoint>(), It.IsAny<ViewFlags>())); _operations.Setup(x => x.GetReplaceData(It.IsAny<SnapshotPoint>())).Returns(new ReplaceData(Environment.NewLine, Vim.GlobalSettings.Magic, 1)); _operations.SetupGet(x => x.EditorOperations).Returns(_editorOperations.Object); var vimBufferData = CreateVimBufferData(_textView); _modeRaw = new SubstituteConfirmMode(vimBufferData, _operations.Object); _mode = _modeRaw; }
internal void Create(params string[] lines) { _textView = CreateTextView(lines); _textBuffer = _textView.TextBuffer; _factory = new MockRepository(MockBehavior.Strict); _editorOperations = _factory.Create <IEditorOperations>(); _operations = _factory.Create <ICommonOperations>(); _operations.Setup(x => x.MoveCaretToPoint(It.IsAny <SnapshotPoint>(), It.IsAny <ViewFlags>())); _operations.Setup(x => x.GetReplaceData(It.IsAny <SnapshotPoint>())).Returns(new VimRegexReplaceData("", Environment.NewLine, Vim.GlobalSettings.Magic, VimRegexReplaceCount.One)); _operations.SetupGet(x => x.EditorOperations).Returns(_editorOperations.Object); var vimBufferData = CreateVimBufferData(_textView); _modeRaw = new SubstituteConfirmMode(vimBufferData, _operations.Object); _mode = _modeRaw; }
public void Create(params string[] lines) { _textBuffer = EditorUtil.CreateTextBuffer(lines); _factory = new MockRepository(MockBehavior.Strict); _textCaret = _factory.Create<ITextCaret>(); _textView = MockObjectFactory.CreateTextView(textBuffer: _textBuffer, caret: _textCaret.Object, factory: _factory); _editorOperations = _factory.Create<IEditorOperations>(); _operations = _factory.Create<ICommonOperations>(); _operations.Setup(x => x.MoveCaretToPoint(It.IsAny<SnapshotPoint>())); _operations.Setup(x => x.MoveCaretToPointAndEnsureVisible(It.IsAny<SnapshotPoint>())); _operations.SetupGet(x => x.EditorOperations).Returns(_editorOperations.Object); var vimBufferData = CreateVimBufferData(_textView.Object); _modeRaw = new SubstituteConfirmMode(vimBufferData, _operations.Object); _mode = _modeRaw; }