public static void InvokeCodeActionList(this AbstractIntegrationTest test) { test.WaitForAsyncOperations(FeatureAttribute.SolutionCrawler); test.WaitForAsyncOperations(FeatureAttribute.DiagnosticService); test.VisualStudio.Instance.Editor.ShowLightBulb(); test.VisualStudio.Instance.Editor.WaitForLightBulbSession(); test.WaitForAsyncOperations(FeatureAttribute.LightBulb); }
public static void InvokeNavigateToAndPressEnter(this AbstractIntegrationTest test, string text) { test.ExecuteCommand(WellKnownCommandNames.Edit_GoToAll); test.VisualStudio.Instance.Editor.NavigateToSendKeys(text); test.WaitForAsyncOperations(FeatureAttribute.NavigateTo); test.VisualStudio.Instance.Editor.NavigateToSendKeys("{ENTER}"); }
public static void VerifyCurrentTokenType(AbstractIntegrationTest test, string tokenType, TextViewWindow_OutOfProc window) { test.WaitForAsyncOperations( FeatureAttribute.SolutionCrawler, FeatureAttribute.DiagnosticService, FeatureAttribute.Classification); var actualTokenTypes = window.GetCurrentClassifications(); Assert.Equal(actualTokenTypes.Length, 1); Assert.Contains(tokenType, actualTokenTypes[0]); Assert.NotEqual("text", tokenType); }
public static void VerifyCodeActions( this AbstractIntegrationTest test, IEnumerable <string> expectedItems, string applyFix = null, bool verifyNotShowing = false, bool ensureExpectedItemsAreOrdered = false, FixAllScope?fixAllScope = null, bool blockUntilComplete = true) { test.VisualStudio.Instance.Editor.ShowLightBulb(); test.VisualStudio.Instance.Editor.WaitForLightBulbSession(); if (verifyNotShowing) { test.VerifyCodeActionsNotShowing(); return; } var actions = test.VisualStudio.Instance.Editor.GetLightBulbActions(); if (expectedItems != null && expectedItems.Any()) { if (ensureExpectedItemsAreOrdered) { TestUtilities.ThrowIfExpectedItemNotFoundInOrder( actions, expectedItems); } else { TestUtilities.ThrowIfExpectedItemNotFound( actions, expectedItems); } } if (!string.IsNullOrEmpty(applyFix) || fixAllScope.HasValue) { test.VisualStudio.Instance.Editor.ApplyLightBulbAction(applyFix, fixAllScope, blockUntilComplete); if (blockUntilComplete) { // wait for action to complete test.WaitForAsyncOperations(FeatureAttribute.LightBulb); } } }
public static void InvokeQuickInfo(this AbstractIntegrationTest test) { test.ExecuteCommand(WellKnownCommandNames.Edit_QuickInfo); test.WaitForAsyncOperations(FeatureAttribute.QuickInfo); }
public static void InvokeSignatureHelp(this AbstractIntegrationTest test) { test.ExecuteCommand(WellKnownCommandNames.Edit_ParameterInfo); test.WaitForAsyncOperations(FeatureAttribute.SignatureHelp); }
public static void InvokeCompletionList(AbstractIntegrationTest test) { test.ExecuteCommand(WellKnownCommandNames.Edit_ListMembers); test.WaitForAsyncOperations(FeatureAttribute.CompletionSet); }
public static void SetPersistenceOption(this AbstractIntegrationTest test, bool value) { test.VisualStudio.Instance.VisualStudioWorkspace.SetPersistenceOption(value); test.WaitForAsyncOperations(FeatureAttribute.Workspace); }
public static void SetOptionInfer(this AbstractIntegrationTest test, ProjectUtils.Project project, bool value) { test.VisualStudio.Instance.VisualStudioWorkspace.SetOptionInfer(project.Name, value); test.WaitForAsyncOperations(FeatureAttribute.Workspace); }
public static void RemoveProjectReference(this AbstractIntegrationTest test, ProjectUtils.ProjectReference projectReferenceName, ProjectUtils.Project projectName) { test.VisualStudio.Instance.SolutionExplorer.RemoveProjectReference(projectName.Name, projectReferenceName.Name); test.WaitForAsyncOperations(FeatureAttribute.Workspace); }
public static void AddMetadataReference(this AbstractIntegrationTest test, ProjectUtils.AssemblyReference referenceName, ProjectUtils.Project projectName) { test.VisualStudio.Instance.SolutionExplorer.AddMetadataReference(referenceName.Name, projectName.Name); test.WaitForAsyncOperations(FeatureAttribute.Workspace); }