public StubIdeScope(ITestOutputHelper testOutputHelper) { MonitoringService = new Mock <IMonitoringService>().Object; CompositeLogger.Add(new DeveroomXUnitLogger(testOutputHelper)); CompositeLogger.Add(StubLogger); Actions = new StubIdeActions(this); VsxStubObjects.Initialize(); }
protected IWpfTextView CreateTextView(TestText inputText, int selectionStartLine, int selectionStartColumn, int?selectionEndLine, int?selectionEndColumn) { var textBuffer = VsxStubObjects.CreateTextBuffer(inputText.ToString()); IWpfTextView textView = new StubWpfTextView(textBuffer); if (selectionEndColumn != null && selectionEndLine != null) { textView.Selection.Select(new SnapshotSpan( inputText.GetSnapshotPoint(textView.TextSnapshot, selectionStartLine, selectionStartColumn), inputText.GetSnapshotPoint(textView.TextSnapshot, selectionEndLine.Value, selectionEndColumn.Value)), false); } int caretLine = selectionEndLine ?? selectionStartLine; int caretColumn = selectionEndColumn ?? selectionStartColumn; textView.Caret.MoveTo(inputText.GetSnapshotPoint(textView.TextSnapshot, caretLine, caretColumn)); return(textView); }
public CommentUncommentCommandTests() { _monitoringService = new Mock <IMonitoringService>().Object; VsxStubObjects.Initialize(); }