private async Task ActionSets(TestWorkspace workspace, CodeRefactoringProvider provider) { var codeActions = new List<CodeAction>(); RefactoringSetup(workspace, provider, codeActions, out var extensionManager, out var textBuffer); var suggestedAction = new CodeRefactoringSuggestedAction( workspace.ExportProvider.GetExportedValue<SuggestedActionsSourceProvider>(), workspace, textBuffer, provider, codeActions.First()); var actionSets = await suggestedAction.GetActionSetsAsync(CancellationToken.None); Assert.True(extensionManager.IsDisabled(provider)); Assert.False(extensionManager.IsIgnored(provider)); }
private void DisplayText(TestWorkspace workspace, CodeRefactoringProvider provider) { var codeActions = new List<CodeAction>(); RefactoringSetup(workspace, provider, codeActions, out var extensionManager, out var textBuffer); var suggestedAction = new CodeRefactoringSuggestedAction( workspace.ExportProvider.GetExportedValue<SuggestedActionsSourceProvider>(), workspace, textBuffer, provider, codeActions.First()); var text = suggestedAction.DisplayText; Assert.True(extensionManager.IsDisabled(provider)); Assert.False(extensionManager.IsIgnored(provider)); }
private async Task ActionSets(TestWorkspace workspace, CodeRefactoringProvider provider) { List<CodeAction> refactorings = new List<CodeAction>(); ICodeActionEditHandlerService editHandler; EditorLayerExtensionManager.ExtensionManager extensionManager; VisualStudio.Text.ITextBuffer textBuffer; RefactoringSetup(workspace, provider, refactorings, out editHandler, out extensionManager, out textBuffer); var suggestedAction = new CodeRefactoringSuggestedAction(workspace, textBuffer, editHandler, new TestWaitIndicator(), refactorings.First(), provider); var actionSets = await suggestedAction.GetActionSetsAsync(CancellationToken.None).ConfigureAwait(true); Assert.True(extensionManager.IsDisabled(provider)); Assert.False(extensionManager.IsIgnored(provider)); }
private void DisplayText(TestWorkspace workspace, CodeRefactoringProvider provider) { List<CodeAction> refactorings = new List<CodeAction>(); ICodeActionEditHandlerService editHandler; EditorLayerExtensionManager.ExtensionManager extensionManager; VisualStudio.Text.ITextBuffer textBuffer; RefactoringSetup(workspace, provider, refactorings, out editHandler, out extensionManager, out textBuffer); var suggestedAction = new CodeRefactoringSuggestedAction(workspace, textBuffer, editHandler, new TestWaitIndicator(), refactorings.First(), provider); var text = suggestedAction.DisplayText; Assert.True(extensionManager.IsDisabled(provider)); Assert.False(extensionManager.IsIgnored(provider)); }
private void GetPreview(TestWorkspace workspace, CodeRefactoringProvider provider) { List<CodeAction> refactorings = new List<CodeAction>(); ICodeActionEditHandlerService editHandler; EditorLayerExtensionManager.ExtensionManager extensionManager; VisualStudio.Text.ITextBuffer textBuffer; RefactoringSetup(workspace, provider, refactorings, out editHandler, out extensionManager, out textBuffer); var suggestedAction = new CodeRefactoringSuggestedAction(workspace, textBuffer, editHandler, refactorings.First(), provider); suggestedAction.GetPreviewAsync(CancellationToken.None).PumpingWaitResult(); Assert.True(extensionManager.IsDisabled(provider)); Assert.False(extensionManager.IsIgnored(provider)); }