private static void InvokeCommand(ToolbarCommand toolbarCommand) { var menuItemCmd = new CommandID(PackageConstants.GuidTortoiseGitToolbarCmdSet, (int)toolbarCommand); using (var dialogboxPurger = new DialogBoxPurger(NativeMethods.IDOK, 1)) { dialogboxPurger.Start(); ExecuteCommand(menuItemCmd); } }
public void WhenShowingMessage_ThenSucceeds() { var components = (IComponentModel)Package.GetGlobalService(typeof(SComponentModel)); var service = (IServiceProvider)components.GetService <SVsServiceProvider>(); var ui = (IVsUIShell)service.GetService(typeof(SVsUIShell)); Assert.NotNull(service); Assert.NotNull(ui); using (var purger = new DialogBoxPurger(0)) { UIThreadInvoker.Invoke((Action)(() => { PackageUtility.ShowError(service, "Foo", string.Empty); })); } }
public void LaunchCommand() { UIThreadInvoker.Invoke((ThreadInvoker) delegate() { CommandID menuItemCmd = new CommandID(Company.VisualStudioHaskell.GuidList.guidVisualStudioHaskellCmdSet, (int)Company.VisualStudioHaskell.PkgCmdIDList.cmdidMyCommand); // Create the DialogBoxListener Thread. string expectedDialogBoxText = string.Format(CultureInfo.CurrentCulture, "{0}\n\nInside {1}.MenuItemCallback()", "VisualStudioHaskell", "Company.VisualStudioHaskell.VisualStudioHaskellPackage"); DialogBoxPurger purger = new DialogBoxPurger(NativeMethods.IDOK, expectedDialogBoxText); try { purger.Start(); TestUtils testUtils = new TestUtils(); testUtils.ExecuteCommand(menuItemCmd); } finally { Assert.IsTrue(purger.WaitForDialogThreadToTerminate(), "The dialog box has not shown"); } }); }
public void ShowConfigurationTest() { UIThreadInvoker.Invoke(new Action(() => { var dialogBoxPurger = new DialogBoxPurger(NativeMethods.IDOK); try { dialogBoxPurger.Start(); var configurationCommand = new CommandID(PackageGuids.GuidCodeMaidMenuSet, PackageIds.CmdIDCodeMaidOptions); TestUtils.ExecuteCommand(configurationCommand); } finally { dialogBoxPurger.WaitForDialogThreadToTerminate(); } })); }
public void ShowConfigurationTest() { UIThreadInvoker.Invoke(new Action(() => { var dialogBoxPurger = new DialogBoxPurger(NativeMethods.IDOK); try { dialogBoxPurger.Start(); var configurationCommand = new CommandID(GuidList.GuidCodeMaidCommandConfiguration, (int)PkgCmdIDList.CmdIDCodeMaidConfiguration); TestUtils.ExecuteCommand(configurationCommand); } finally { dialogBoxPurger.WaitForDialogThreadToTerminate(); } })); }
public void LaunchCommand() { UIThreadInvoker.Invoke((ThreadInvoker) delegate() { var menuItemCmd = new CommandID(GuidList.guidShowMyGitBranchCmdSet, (int)PkgCmdIDList.cmdidFirstCommand); // Create the DialogBoxListener Thread. var expectedDialogBoxText = string.Format(CultureInfo.CurrentCulture, "{0}\n\nInside {1}.MenuItemCallback()", "ShowMyGitBranch", "ThiagoSa.ShowMyGitBranch.ShowMyGitBranchPackage"); var purger = new DialogBoxPurger(NativeMethods.IDOK, expectedDialogBoxText); try { purger.Start(); var testUtils = new TestUtils(); testUtils.ExecuteCommand(menuItemCmd); } finally { Assert.IsTrue(purger.WaitForDialogThreadToTerminate(), "The dialog box has not shown"); } }); }
public void LaunchCommand() { UIThreadInvoker.Invoke((ThreadInvoker) delegate() { var menuItemCmd = new CommandID(FSharpVSPowerTools.Constants.guidStandardCmdSet, (int)FSharpVSPowerTools.Constants.cmdidStandardRenameCommand); // Create the DialogBoxListener Thread. var expectedDialogBoxText = string.Format(CultureInfo.CurrentCulture, "{0}\n\nInside {1}.MenuItemCallback()", "PowerToolsCommandsPackage", "FSharpVSPowerTools.PowerToolsCommandsPackage"); var purger = new DialogBoxPurger(NativeMethods.IDOK, expectedDialogBoxText); try { purger.Start(); TestUtils.ExecuteCommand(menuItemCmd); } finally { Assert.IsTrue(purger.WaitForDialogThreadToTerminate(), "The dialog box has not shown"); } }); }
public void LaunchCommand() { UIThreadInvoker.Invoke((ThreadInvoker) delegate() { CommandID menuItemCmd = new CommandID(GeoCybernetica.CodeGenerationExtention.GuidList.guidCodeGenerationExtentionCmdSet, (int)GeoCybernetica.CodeGenerationExtention.PkgCmdIDList.showAllCommands); // Create the DialogBoxListener Thread. string expectedDialogBoxText = string.Format(CultureInfo.CurrentCulture, "{0}\n\nInside {1}.MenuItemCallback()", "CodeGenerationExtention", "GeoCybernetica.CodeGenerationExtention.CodeGenerationExtentionPackage"); DialogBoxPurger purger = new DialogBoxPurger(NativeMethods.IDOK, expectedDialogBoxText); try { purger.Start(); TestUtils testUtils = new TestUtils(); testUtils.ExecuteCommand(menuItemCmd); } finally { Assert.IsTrue(purger.WaitForDialogThreadToTerminate(), "The dialog box has not shown"); } }); }
public void LaunchCommand() { UIThreadInvoker.Invoke((ThreadInvoker) delegate() { CommandID menuItemCmd = new CommandID(SmartPaster2013.GuidList.guidSmartPaster2013CmdSet, (int)SmartPaster2013.PkgCmdIDList.cmdidPasteAsComment); // Create the DialogBoxListener Thread. string expectedDialogBoxText = string.Format(CultureInfo.CurrentCulture, "{0}\n\nInside {1}.MenuItemCallback()", "SmartPaster2013", "MartinWilley.SmartPaster2013.SmartPaster2013Package"); DialogBoxPurger purger = new DialogBoxPurger(NativeMethods.IDOK, expectedDialogBoxText); try { purger.Start(); TestUtils testUtils = new TestUtils(); testUtils.ExecuteCommand(menuItemCmd); } finally { Assert.IsTrue(purger.WaitForDialogThreadToTerminate(), "The dialog box has not shown"); } }); }
public void LaunchCommand() { UIThreadInvoker.Invoke((ThreadInvoker) delegate() { CommandID menuItemCmd = new CommandID(KittyAltruistic.CPlusPlusTestRunner.GuidList.GUIDTestPackageCmdSet, (int)KittyAltruistic.CPlusPlusTestRunner.PkgCmdIDList.cmdTestSettings); // Create the DialogBoxListener Thread. string expectedDialogBoxText = string.Format(CultureInfo.CurrentCulture, "{0}\n\nInside {1}.MenuItemCallback()", "GTest", "KittyAltruistic.CPlusPlusGTest.TestPackage"); DialogBoxPurger purger = new DialogBoxPurger(NativeMethods.IDOK, expectedDialogBoxText); try { purger.Start(); TestUtils testUtils = new TestUtils(); testUtils.ExecuteCommand(menuItemCmd); } finally { Assert.IsTrue(purger.WaitForDialogThreadToTerminate(), "The dialog box has not shown"); } }); }
public void LaunchCommand() { UIThreadInvoker.Invoke((ThreadInvoker) delegate() { CommandID menuItemCmd = new CommandID(Chambersoft.DapperFactory.GuidList.guidDapperFactoryCmdSet, (int)Chambersoft.DapperFactory.PkgCmdIDList.dfGenerateServiceInterfaces); // Create the DialogBoxListener Thread. string expectedDialogBoxText = string.Format(CultureInfo.CurrentCulture, "{0}\n\nInside {1}.MenuItemCallback()", "DapperFactory", "Chambersoft.DapperFactory.DapperFactoryPackage"); DialogBoxPurger purger = new DialogBoxPurger(NativeMethods.IDOK, expectedDialogBoxText); try { purger.Start(); TestUtils testUtils = new TestUtils(); testUtils.ExecuteCommand(menuItemCmd); } finally { Assert.IsTrue(purger.WaitForDialogThreadToTerminate(), "The dialog box has not shown"); } }); }
public void LaunchCommand() { UIThreadInvoker.Invoke((ThreadInvoker) delegate() { CommandID menuItemCmd = new CommandID(ZinkoSoft.NuSet.GuidList.NuSetCommandGuid, (int)ZinkoSoft.NuSet.PkgCmdIDList.nusetCommand); // Create the DialogBoxListener Thread. string expectedDialogBoxText = string.Format(CultureInfo.CurrentCulture, "{0}\n\nInside {1}.MenuItemCallback()", "NuSet", "ZinkoSoft.NuSet.NuSetPackage"); DialogBoxPurger purger = new DialogBoxPurger(NativeMethods.IDOK, expectedDialogBoxText); try { purger.Start(); TestUtils testUtils = new TestUtils(); testUtils.ExecuteCommand(menuItemCmd); } finally { Assert.IsTrue(purger.WaitForDialogThreadToTerminate(), "The dialog box has not shown"); } }); }
public void LaunchCommand() { UIThreadInvoker.Invoke((ThreadInvoker) delegate() { CommandID menuItemCmd = new CommandID(ServiceStackVS.GuidList.guidVSServiceStackCmdSet, (int)ServiceStackVS.PkgCmdIDList.cmdidCSharpAddServiceStackReference); // Create the DialogBoxListener Thread. string expectedDialogBoxText = string.Format(CultureInfo.CurrentCulture, "{0}\n\nInside {1}.MenuItemCallback()", "ServiceStackVS", "ServiceStack.ServiceStackVS.ServiceStackVSPackage"); DialogBoxPurger purger = new DialogBoxPurger(NativeMethods.IDOK, expectedDialogBoxText); try { purger.Start(); TestUtils testUtils = new TestUtils(); testUtils.ExecuteCommand(menuItemCmd); } finally { Assert.IsTrue(purger.WaitForDialogThreadToTerminate(), "The dialog box has not shown"); } }); }
public void LaunchCommand() { UIThreadInvoker.Invoke((ThreadInvoker) delegate() { CommandID menuItemCmd = new CommandID(Nessos.CustomFsi.Vs2012.GuidList.guidVsPluginCmdSet, (int)Nessos.CustomFsi.Vs2012.PkgCmdIDList.customFsiCommand); // Create the DialogBoxListener Thread. string expectedDialogBoxText = string.Format(CultureInfo.CurrentCulture, "{0}\n\nInside {1}.MenuItemCallback()", "CustomFsi", "Nessos.CustomFsi.Vs2012.VsPluginPackage"); DialogBoxPurger purger = new DialogBoxPurger(NativeMethods.IDOK, expectedDialogBoxText); try { purger.Start(); TestUtils testUtils = new TestUtils(); testUtils.ExecuteCommand(menuItemCmd); } finally { Assert.IsTrue(purger.WaitForDialogThreadToTerminate(), "The dialog box has not shown"); } }); }
public void LaunchCommand() { UIThreadInvoker.Invoke((ThreadInvoker) delegate() { CommandID menuItemCmd = new CommandID(MicrosoftCorporation.SlowCheetah.GuidList.guidSlowCheetahCmdSet, (int)MicrosoftCorporation.SlowCheetah.PkgCmdIDList.cmdidAddTransform); // Create the DialogBoxListener Thread. string expectedDialogBoxText = string.Format(CultureInfo.CurrentCulture, "{0}\n\nInside {1}.MenuItemCallback()", "SlowCheetah", "MicrosoftCorporation.SlowCheetah.SlowCheetahPackage"); DialogBoxPurger purger = new DialogBoxPurger(NativeMethods.IDOK, expectedDialogBoxText); try { purger.Start(); TestUtils testUtils = new TestUtils(); testUtils.ExecuteCommand(menuItemCmd); } finally { Assert.IsTrue(purger.WaitForDialogThreadToTerminate(), "The dialog box has not shown"); } }); }
public void LaunchCommand() { UIThreadInvoker.Invoke((ThreadInvoker) delegate() { CommandID menuItemCmd = new CommandID(JosePedroSilva.TFSScrumExtensions.GuidList.guidTFSScrumExtensionsCmdSet, (int)JosePedroSilva.TFSScrumExtensions.PkgCmdIDList.cmdPlanWorkItem); // Create the DialogBoxListener Thread. string expectedDialogBoxText = string.Format(CultureInfo.CurrentCulture, "{0}\n\nInside {1}.MenuItemCallback()", "TFSScrumExtensions", "JosePedroSilva.TFSScrumExtensions.TFSScrumExtensionsPackage"); DialogBoxPurger purger = new DialogBoxPurger(NativeMethods.IDOK, expectedDialogBoxText); try { purger.Start(); TestUtils testUtils = new TestUtils(); testUtils.ExecuteCommand(menuItemCmd); } finally { Assert.IsTrue(purger.WaitForDialogThreadToTerminate(), "The dialog box has not shown"); } }); }
public void LaunchCommand() { UIThreadInvoker.Invoke((ThreadInvoker) delegate() { CommandID menuItemCmd = new CommandID(Digiexnet.VSGithubConnectorPkg.GuidList.guidVSGithubConnectorPkgCmdSet, (int)Digiexnet.VSGithubConnectorPkg.PkgCmdIDList.githubIssuesCmd); // Create the DialogBoxListener Thread. string expectedDialogBoxText = string.Format(CultureInfo.CurrentCulture, "{0}\n\nInside {1}.MenuItemCallback()", "VSGithubConnectorPkg", "Digiexnet.VSGithubConnectorPkg.VSGithubConnectorPkgPackage"); DialogBoxPurger purger = new DialogBoxPurger(NativeMethods.IDOK, expectedDialogBoxText); try { purger.Start(); TestUtils testUtils = new TestUtils(); testUtils.ExecuteCommand(menuItemCmd); } finally { Assert.IsTrue(purger.WaitForDialogThreadToTerminate(), "The dialog box has not shown"); } }); }
public void LaunchCommand() { UIThreadInvoker.Invoke((ThreadInvoker) delegate() { CommandID menuItemCmd = new CommandID(F1SYS.VsGitToolsPackage.GuidList.guidVsGitToolsPackageCmdSet, (int)F1SYS.VsGitToolsPackage.PkgCmdIDList.icmdSccCommandGitBash); // Create the DialogBoxListener Thread. string expectedDialogBoxText = string.Format(CultureInfo.CurrentCulture, "{0}\n\nInside {1}.MenuItemCallback()", "Git Tools", "F1SYS.VsGitToolsPackage.VsGitToolsPackagePackage"); DialogBoxPurger purger = new DialogBoxPurger(NativeMethods.IDOK, expectedDialogBoxText); try { purger.Start(); TestUtils testUtils = new TestUtils(); testUtils.ExecuteCommand(menuItemCmd); } finally { Assert.IsTrue(purger.WaitForDialogThreadToTerminate(), "The dialog box has not shown"); } }); }
public void LaunchCommand() { UIThreadInvoker.Invoke((ThreadInvoker) delegate() { CommandID menuItemCmd = new CommandID(Hill30.BooProject.Constants.GuidBooProjectCmdSet, (int)PkgCmdIDList.cmdidBooISh); // Create the DialogBoxListener Thread. string expectedDialogBoxText = string.Format(CultureInfo.CurrentCulture, "{0}\n\nInside {1}.MenuItemCallback()", "BooProject", "Hill30.BooProject.BooProjectPackage"); DialogBoxPurger purger = new DialogBoxPurger(NativeMethods.IDOK, expectedDialogBoxText); try { purger.Start(); TestUtils testUtils = new TestUtils(); testUtils.ExecuteCommand(menuItemCmd); } finally { Assert.IsTrue(purger.WaitForDialogThreadToTerminate(), "The dialog box has not shown"); } }); }
[TestMethod, Ignore] // show Dialog //[HostType("VS IDE")] public void LaunchCommand() { UIThreadInvoker.Invoke((ThreadInvoker) delegate() { CommandID menuItemCmd = new CommandID(AnkhId.CommandSetGuid, (int)AnkhCommand.Checkout); // Create the DialogBoxListener Thread. string expectedDialogBoxText = string.Format(CultureInfo.CurrentCulture, "{0}\n\nInside {1}.MenuItemCallback()", "AnkhSvn", "AnkhSvn.AnkhSvn.AnkhSvnPackage"); DialogBoxPurger purger = new DialogBoxPurger(NativeMethods.IDCANCEL, expectedDialogBoxText); try { purger.Start(); TestUtils testUtils = new TestUtils(); testUtils.ExecuteCommand(menuItemCmd); } finally { Assert.IsTrue(purger.WaitForDialogThreadToTerminate(), "The dialog box has not shown"); } }); }
public void LaunchCommand() { UIThreadInvoker.Invoke((ThreadInvoker) delegate() { CommandID menuItemCmd = new CommandID(McKearney.TfsSolutionInfo.GuidList.guidTfsProjectInfoCmdSet, (int)McKearney.TfsSolutionInfo.PkgCmdIDList.cmdidTfsProjectInfoSettings); // Create the DialogBoxListener Thread. string expectedDialogBoxText = string.Format(CultureInfo.CurrentCulture, "{0}\n\nInside {1}.MenuItemCallback()", "TfsProjectInfo", "McKearney.TfsSolutionInfo.TfsProjectInfoPackage"); DialogBoxPurger purger = new DialogBoxPurger(NativeMethods.IDOK, expectedDialogBoxText); try { purger.Start(); TestUtils testUtils = new TestUtils(); testUtils.ExecuteCommand(menuItemCmd); } finally { Assert.IsTrue(purger.WaitForDialogThreadToTerminate(), "The dialog box has not shown"); } }); }