private async Task GetPreview(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()); await suggestedAction.GetPreviewAsync(CancellationToken.None); Assert.True(extensionManager.IsDisabled(provider)); Assert.False(extensionManager.IsIgnored(provider)); }
private async Task 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, new TestWaitIndicator(), refactorings.First(), provider); await suggestedAction.GetPreviewAsync(CancellationToken.None).ConfigureAwait(true); Assert.True(extensionManager.IsDisabled(provider)); Assert.False(extensionManager.IsIgnored(provider)); }