Ejemplo n.º 1
0
 public void CreateEmptySolution()
 {
     var testUtils = new TestUtils();
     testUtils.CloseCurrentSolution(
             __VSSLNSAVEOPTIONS.SLNSAVEOPT_NoSave );
     testUtils.CreateEmptySolution( TestContext.TestDir, "EmptySolution" );
 }
Ejemplo n.º 2
0
 public void CreateEmptySolution() {
     UIThreadInvoker.Invoke((ThreadInvoker) delegate() {
         var testUtils = new TestUtils();
         testUtils.CloseCurrentSolution(__VSSLNSAVEOPTIONS.SLNSAVEOPT_NoSave);
         testUtils.CreateEmptySolution(TestContext.TestDir, "EmptySolution");
     });
 }
Ejemplo n.º 3
0
        public void VBWinformsApplication() {
            UIThreadInvoker.Invoke((ThreadInvoker) delegate() {
                //Solution and project creation parameters
                var solutionName = "VBWinApp";
                var projectName = "VBWinApp";

                //Template parameters
                var language = "VisualBasic";
                var projectTemplateName = "WindowsApplication.Zip";
                var itemTemplateName = "CodeFile.zip";
                var newFileName = "Test.vb";

                var dte = (DTE) VsIdeTestHostContext.ServiceProvider.GetService(typeof (DTE));

                var testUtils = new TestUtils();

                testUtils.CreateEmptySolution(TestContext.TestDir, solutionName);
                Assert.AreEqual<int>(0, testUtils.ProjectCount());

                //Add new  Windows application project to existing solution
                testUtils.CreateProjectFromTemplate(projectName, projectTemplateName, language, false);

                //Verify that the new project has been added to the solution
                Assert.AreEqual<int>(1, testUtils.ProjectCount());

                //Get the project
                var project = dte.Solution.Item(1);
                Assert.IsNotNull(project);
                Assert.IsTrue(string.Compare(project.Name, projectName, StringComparison.InvariantCultureIgnoreCase) == 0);

                //Verify Adding new code file to project
                var newCodeFileItem = testUtils.AddNewItemFromVsTemplate(project.ProjectItems, itemTemplateName, language, newFileName);
                Assert.IsNotNull(newCodeFileItem, "Could not create new project item");
            });
        }
Ejemplo n.º 4
0
        public void ShowToolWindow()
        {
            UIThreadInvoker.Invoke((ThreadInvoker)delegate()
            {
                CommandID toolWindowCmd = new CommandID(DivyaSinghal.StrutViewer.GuidList.guidStrutViewerCmdSet, (int)DivyaSinghal.StrutViewer.PkgCmdIDList.StrutViewerTool);

                TestUtils testUtils = new TestUtils();
                testUtils.ExecuteCommand(toolWindowCmd);

                Assert.IsTrue(testUtils.CanFindToolwindow(new Guid(DivyaSinghal.StrutViewer.GuidList.guidToolWindowPersistanceString)));

            });
        }
        public void ShowToolWindow()
        {
            UIThreadInvoker.Invoke((ThreadInvoker)delegate()
            {
                CommandID toolWindowCmd = new CommandID(PMC.PlotterService.GuidList.guidPlotterServiceCmdSet, (int)PMC.PlotterService.PkgCmdIDList.cmdid2DPlotter);

                TestUtils testUtils = new TestUtils();
                testUtils.ExecuteCommand(toolWindowCmd);

                Assert.IsTrue(testUtils.CanFindToolwindow(new Guid(PMC.PlotterService.GuidList.guidToolWindowPersistanceString)));

            });
        }
Ejemplo n.º 6
0
        public void ShowToolWindow()
        {
            UIThreadInvoker.Invoke((ThreadInvoker)delegate()
            {
                CommandID toolWindowCmd = new CommandID(MufflonoSoft.CodingDojoHelperVsExtension.GuidList.guidCodingDojoHelperVsExtensionCmdSet, (int)MufflonoSoft.CodingDojoHelperVsExtension.PkgCmdIDList.cmdidCodingDojo);

                TestUtils testUtils = new TestUtils();
                testUtils.ExecuteCommand(toolWindowCmd);

                Assert.IsTrue(testUtils.CanFindToolwindow(new Guid(MufflonoSoft.CodingDojoHelperVsExtension.GuidList.guidToolWindowPersistanceString)));

            });
        }
        public void ShowToolWindow()
        {
            UIThreadInvoker.Invoke((ThreadInvoker)delegate()
            {
                CommandID toolWindowCmd = new CommandID(SmallSharpTools.JavaScriptBrowser.VSPackage.GuidList.guidJavaScriptBrowserCmdSet, (int)SmallSharpTools.JavaScriptBrowser.VSPackage.PkgCmdIDList.cmdidJavaScriptBrowserTool);

                TestUtils testUtils = new TestUtils();
                testUtils.ExecuteCommand(toolWindowCmd);

                Assert.IsTrue(testUtils.CanFindToolwindow(new Guid(SmallSharpTools.JavaScriptBrowser.VSPackage.GuidList.guidToolWindowPersistanceString)));

            });
        }
Ejemplo n.º 8
0
        public void ShowToolWindow()
        {
            UIThreadInvoker.Invoke((ThreadInvoker)delegate()
            {
                CommandID toolWindowCmd = new CommandID(PiotrTrzpil.VisualMutator_VSPackage.GuidList.guidVisualMutator_VSPackageCmdSet, (int)PiotrTrzpil.VisualMutator_VSPackage.PkgCmdIDList.cmdidVisualMutator);

                TestUtils testUtils = new TestUtils();
                testUtils.ExecuteCommand(toolWindowCmd);

                Assert.IsTrue(testUtils.CanFindToolwindow(new Guid(PiotrTrzpil.VisualMutator_VSPackage.GuidList.guidToolWindowPersistanceString)));

            });
        }
        public void ShowToolWindow()
        {
            UIThreadInvoker.Invoke((ThreadInvoker)delegate()
            {
                CommandID toolWindowCmd = new CommandID(OmarSalem.MissingSectionsFinder_Package.GuidList.guidMissingSectionsFinder_PackageCmdSet, (int)OmarSalem.MissingSectionsFinder_Package.PkgCmdIDList.cmdidMSF);

                TestUtils testUtils = new TestUtils();
                testUtils.ExecuteCommand(toolWindowCmd);

                Assert.IsTrue(testUtils.CanFindToolwindow(new Guid(OmarSalem.MissingSectionsFinder_Package.GuidList.guidToolWindowPersistanceString)));

            });
        }
Ejemplo n.º 10
0
        public void ShowToolWindow()
        {
            UIThreadInvoker.Invoke((ThreadInvoker)delegate()
            {
                CommandID toolWindowCmd = new CommandID(ZinkoSoft.NuSet.GuidList.NuSetCommandGuid, (int)ZinkoSoft.NuSet.PkgCmdIDList.nusetTools);

                TestUtils testUtils = new TestUtils();
                testUtils.ExecuteCommand(toolWindowCmd);

                Assert.IsTrue(testUtils.CanFindToolwindow(new Guid(ZinkoSoft.NuSet.GuidList.ToolWindowsPersistenceGuidString)));

            });
        }
        public void ShowToolWindow()
        {
            UIThreadInvoker.Invoke((ThreadInvoker)delegate()
            {
                CommandID toolWindowCmd = new CommandID(PacktPub.VSPackageSample.GuidList.guidVSPackageSampleCmdSet, (int)PacktPub.VSPackageSample.PkgCmdIDList.cmdidMyTool);

                TestUtils testUtils = new TestUtils();
                testUtils.ExecuteCommand(toolWindowCmd);

                Assert.IsTrue(testUtils.CanFindToolwindow(new Guid(PacktPub.VSPackageSample.GuidList.guidToolWindowPersistanceString)));

            });
        }
Ejemplo n.º 12
0
        public void ShowToolWindow()
        {
            UIThreadInvoker.Invoke((ThreadInvoker)delegate()
            {
                CommandID toolWindowCmd = new CommandID(SanJoseWaterCompany.SyncIIS.GuidList.guidSyncIISCmdSet, (int)SanJoseWaterCompany.SyncIIS.PkgCmdIDList.cmdSyncIISWindow);

                TestUtils testUtils = new TestUtils();
                testUtils.ExecuteCommand(toolWindowCmd);

                Assert.IsTrue(testUtils.CanFindToolwindow(new Guid(SanJoseWaterCompany.SyncIIS.GuidList.guidToolWindowPersistanceString)));

            });
        }
Ejemplo n.º 13
0
        public void ShowToolWindow()
        {
            UIThreadInvoker.Invoke((ThreadInvoker)delegate()
            {
                CommandID toolWindowCmd = new CommandID(Company.TwitterStudio.GuidList.guidTwitterStudioCmdSet, (int)Company.TwitterStudio.PkgCmdIDList.cmdidMyTool);

                TestUtils testUtils = new TestUtils();
                testUtils.ExecuteCommand(toolWindowCmd);

                Assert.IsTrue(testUtils.CanFindToolwindow(new Guid(Company.TwitterStudio.GuidList.guidToolWindowPersistanceString)));

            });
        }
Ejemplo n.º 14
0
        public void ShowToolWindow()
        {
            UIThreadInvoker.Invoke((ThreadInvoker)delegate()
            {
                CommandID toolWindowCmd = new CommandID(kazuk.GithubVs.GuidList.guidGithubVsCmdSet, (int)kazuk.GithubVs.PkgCmdIDList.cmdidMyTool);

                TestUtils testUtils = new TestUtils();
                testUtils.ExecuteCommand(toolWindowCmd);

                Assert.IsTrue(testUtils.CanFindToolwindow(new Guid(kazuk.GithubVs.GuidList.guidToolWindowPersistanceString)));

            });
        }
Ejemplo n.º 15
0
        public void ShowToolWindow()
        {
            UIThreadInvoker.Invoke((ThreadInvoker)delegate()
            {
                CommandID toolWindowCmd = new CommandID(AttackPattern.VisualGit.GuidList.guidVisualGitCmdSet, (int)AttackPattern.VisualGit.PkgCmdIDList.cmdidGitWindow);

                TestUtils testUtils = new TestUtils();
                testUtils.ExecuteCommand(toolWindowCmd);

                Assert.IsTrue(testUtils.CanFindToolwindow(new Guid(AttackPattern.VisualGit.GuidList.guidToolWindowPersistanceString)));

            });
        }
Ejemplo n.º 16
0
        public void ShowToolWindow()
        {
            UIThreadInvoker.Invoke((ThreadInvoker)delegate()
            {
                CommandID toolWindowCmd = new CommandID(Constants.guidPackageCmdSet, (int)Constants.cmdidPendingChanges);

                TestUtils testUtils = new TestUtils();
                testUtils.ExecuteCommand(toolWindowCmd);

                Assert.IsTrue(testUtils.CanFindToolwindow(new Guid(Constants.guidToolWindowPersistanceString)));

            });
        }
Ejemplo n.º 17
0
        public void ShowToolWindow()
        {
            UIThreadInvoker.Invoke((ThreadInvoker)delegate()
            {
                CommandID toolWindowCmd = new CommandID(F1SYS.VsGitToolsPackage.GuidList.guidVsGitToolsPackageCmdSet, (int)F1SYS.VsGitToolsPackage.PkgCmdIDList.icmdSccCommandGitBash);

                TestUtils testUtils = new TestUtils();
                testUtils.ExecuteCommand(toolWindowCmd);

                Assert.IsTrue(testUtils.CanFindToolwindow(new Guid(F1SYS.VsGitToolsPackage.GuidList.guidToolWindowPersistanceString)));

            });
        }
Ejemplo n.º 18
0
        public void ShowToolWindow()
        {
            UIThreadInvoker.Invoke((ThreadInvoker)delegate()
            {
                CommandID toolWindowCmd = new CommandID(GuidList.guidXrmFrameworkCmdSet, (int)PkgCmdIDList.xrmFrameworkDefinitionManager);

                TestUtils testUtils = new TestUtils();
                testUtils.ExecuteCommand(toolWindowCmd);

                Assert.IsTrue(testUtils.CanFindToolwindow(new Guid(GuidList.guidToolWindowPersistanceString)));

            });
        }
Ejemplo n.º 19
0
        public void ShowToolWindow()
        {
            UIThreadInvoker.Invoke((ThreadInvoker)delegate()
            {
                CommandID toolWindowCmd = new CommandID(Bistro.Designer.Package.GuidList.guidCoreCmdSet, (int)Bistro.Designer.Package.PkgCmdIDList.cmdidShowExplorer);

                TestUtils testUtils = new TestUtils();
                testUtils.ExecuteCommand(toolWindowCmd);

                Assert.IsTrue(testUtils.CanFindToolwindow(new Guid(Bistro.Designer.Package.GuidList.guidToolWindowPersistanceString)));

            });
        }
Ejemplo n.º 20
0
        public void ShowToolWindow()
        {
            UIThreadInvoker.Invoke((ThreadInvoker)delegate()
            {
                CommandID toolWindowCmd = new CommandID(Pal.Plugins.VisualStudio.VSGit.GuidList.guidVSGitCmdSet, (int)Pal.Plugins.VisualStudio.VSGit.PkgCmdIDList.vsGitOutputWindow);

                TestUtils testUtils = new TestUtils();
                testUtils.ExecuteCommand(toolWindowCmd);

                Assert.IsTrue(testUtils.CanFindToolwindow(new Guid(Pal.Plugins.VisualStudio.VSGit.GuidList.guidToolWindowPersistanceString)));

            });
        }
Ejemplo n.º 21
0
        public void ShowToolWindow()
        {
            UIThreadInvoker.Invoke((ThreadInvoker)delegate()
            {
                CommandID toolWindowCmd = new CommandID(McKearney.TfsSolutionInfo.GuidList.guidTfsProjectInfoCmdSet, (int)McKearney.TfsSolutionInfo.PkgCmdIDList.cmdidTfsProjectInfoWindow);

                TestUtils testUtils = new TestUtils();
                testUtils.ExecuteCommand(toolWindowCmd);

                Assert.IsTrue(testUtils.CanFindToolwindow(new Guid(McKearney.TfsSolutionInfo.GuidList.guidToolWindowPersistanceString)));

            });
        }
Ejemplo n.º 22
0
        public void ShowToolWindow()
        {
            UIThreadInvoker.Invoke((ThreadInvoker)delegate()
            {
                CommandID toolWindowCmd = new CommandID(andrena.Usus_net_UI.GuidList.guidUsus_net_UICmdSet, (int)andrena.Usus_net_UI.PkgCmdIDList.cmdUsusNetWindow);

                TestUtils testUtils = new TestUtils();
                testUtils.ExecuteCommand(toolWindowCmd);

                Assert.IsTrue(testUtils.CanFindToolwindow(new Guid(andrena.Usus_net_UI.GuidList.guidToolWindowPersistanceString)));

            });
        }
Ejemplo n.º 23
0
        public void ShowToolWindow()
        {
            UIThreadInvoker.Invoke((ThreadInvoker)delegate()
            {
                CommandID toolWindowCmd = new CommandID(Synopsis.SynopsisVSPkg.GuidList.guidSynopsisVSPkgCmdSet, (int)Synopsis.SynopsisVSPkg.PkgCmdIDList.cmdidViewMemberByAccessModifier);

                TestUtils testUtils = new TestUtils();
                testUtils.ExecuteCommand(toolWindowCmd);

                Assert.IsTrue(testUtils.CanFindToolwindow(new Guid(Synopsis.SynopsisVSPkg.GuidList.guidToolWindowPersistanceString)));

            });
        }
Ejemplo n.º 24
0
        public void ShowToolWindow()
        {
            UIThreadInvoker.Invoke((ThreadInvoker)delegate()
            {
                CommandID toolWindowCmd = new CommandID(EjaadTech.VSPTest.GuidList.guidVSPTestCmdSet, (int)EjaadTech.VSPTest.PkgCmdIDList.testToolWindow);

                TestUtils testUtils = new TestUtils();
                testUtils.ExecuteCommand(toolWindowCmd);

                Assert.IsTrue(testUtils.CanFindToolwindow(new Guid(EjaadTech.VSPTest.GuidList.guidToolWindowPersistanceString)));

            });
        }
Ejemplo n.º 25
0
        public void ShowToolWindow()
        {
            UIThreadInvoker.Invoke((ThreadInvoker)delegate()
            {
                CommandID toolWindowCmd = new CommandID(GuidList.guidInstallBakerCmdSet, (int)PkgCmdIDList.cmdIdInstallBakerToolWindow);

                TestUtils testUtils = new TestUtils();
                testUtils.ExecuteCommand(toolWindowCmd);

                Assert.IsTrue(testUtils.CanFindToolwindow(new Guid(GuidList.guidToolWindowPersistanceString)));

            });
        }
Ejemplo n.º 26
0
        public void ShowToolWindow()
        {
            UIThreadInvoker.Invoke((ThreadInvoker)delegate()
            {
                CommandID toolWindowCmd = new CommandID(EidPassportInc.VSPackage1.GuidList.guidVSPackage1CmdSet, (int)EidPassportInc.VSPackage1.PkgCmdIDList.cmdidSureIDTool);

                TestUtils testUtils = new TestUtils();
                testUtils.ExecuteCommand(toolWindowCmd);

                Assert.IsTrue(testUtils.CanFindToolwindow(new Guid(EidPassportInc.VSPackage1.GuidList.guidToolWindowPersistanceString)));

            });
        }
Ejemplo n.º 27
0
        public void WinformsApplication()
        {
            UIThreadInvoker.Invoke((ThreadInvoker) delegate
            {
                var testUtils = new TestUtils();

                testUtils.CreateEmptySolution(TestContext.TestDir, "CSWinApp");
                Assert.AreEqual(0, testUtils.ProjectCount());

                //Create Winforms application project
                //TestUtils.CreateProjectFromTemplate("MyWindowsApp", "Windows Application", "CSharp", false);
                //Assert.AreEqual<int>(1, TestUtils.ProjectCount());
            });
        }
Ejemplo n.º 28
0
        public void CppWinformsApplication()
        {
            UIThreadInvoker.Invoke((ThreadInvoker) delegate
            {
                //Solution and project creation parameters
                const string solutionName = "CPPWinApp";
                const string projectName = "CPPWinApp";

                //Template parameters
                const string projectType = "{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}";
                var projectTemplateName = Path.Combine("vcNet", "mc++appwiz.vsz");

                const string itemTemplateName = "newc++file.cpp";
                const string newFileName = "Test.cpp";

                var dte = (DTE) VsIdeTestHostContext.ServiceProvider.GetService(typeof (DTE));

                var testUtils = new TestUtils();

                testUtils.CreateEmptySolution(TestContext.TestDir, solutionName);
                Assert.AreEqual(0, testUtils.ProjectCount());

                //Add new CPP Windows application project to existing solution
                var solutionDirectory = Directory.GetParent(dte.Solution.FullName).FullName;
                var projectDirectory = TestUtils.GetNewDirectoryName(solutionDirectory, projectName);
                var projectTemplatePath = Path.Combine(dte.Solution.TemplatePath[projectType],
                    projectTemplateName);
                Assert.IsTrue(File.Exists(projectTemplatePath),
                    string.Format("Could not find template file: {0}", projectTemplatePath));
                dte.Solution.AddFromTemplate(projectTemplatePath, projectDirectory, projectName);

                //Verify that the new project has been added to the solution
                Assert.AreEqual(1, testUtils.ProjectCount());

                //Get the project
                Project project = dte.Solution.Item(1);
                Assert.IsNotNull(project);
                Assert.IsTrue(string.Compare(project.Name, projectName, StringComparison.InvariantCultureIgnoreCase) ==
                              0);

                //Verify Adding new code file to project
                string newItemTemplatePath = Path.Combine(dte.Solution.ProjectItemsTemplatePath(projectType),
                    itemTemplateName);
                Assert.IsTrue(File.Exists(newItemTemplatePath));
                ProjectItem item = project.ProjectItems.AddFromTemplate(newItemTemplatePath, newFileName);
                Assert.IsNotNull(item);
            });
        }
        public void WinformsApplication() {
            UIThreadInvoker.Invoke((ThreadInvoker) delegate() {
                var testUtils = new TestUtils();

                testUtils.CreateEmptySolution(TestContext.TestDir, "CSWinApp");
                Assert.AreEqual<int>(0, testUtils.ProjectCount());

                //Create Winforms application project
                //TestUtils.CreateProjectFromTemplate("MyWindowsApp", "Windows Application", "CSharp", false);
                //Assert.AreEqual<int>(1, TestUtils.ProjectCount());

                //TODO Verify that we can debug launch the application

                //TODO Set Break point and verify that will hit

                //TODO Verify Adding new project item to project
            });
        }
Ejemplo n.º 30
0
        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");
                }
            });
        }