public void DontShowPackageUpdatesAvailable() { var templateOptions = new TemplateSelectionOptions { CategoryRoot = OtherCategoryRoot, Category = ".NET", TemplateKindRoot = GeneralKindRoot, TemplateKind = "Console Project" }; var projectDetails = new ProjectDetails(templateOptions); CreateProject(templateOptions, projectDetails); NuGetController.AddPackage(new NuGetPackageOptions { PackageName = "CommandLineParser", Version = "1.9.3.34", IsPreRelease = false }, this); string solutionFolder = GetSolutionDirectory(); string solutionPath = Path.Combine(solutionFolder, projectDetails.SolutionName + ".sln"); var projectPath = Path.Combine(solutionFolder, projectDetails.ProjectName, projectDetails.ProjectName + ".csproj"); Assert.IsTrue(File.Exists(projectPath)); Workbench.CloseWorkspace(this); Workbench.OpenWorkspace(solutionPath, this); try { const string expected = "When a solution is opened and package updates are available, it don't show in status bar"; ReproStep(expected); Ide.WaitForPackageUpdate(); var failureMessage = string.Format("Expected: {0}\nActual: {1}", expected, "When a solution is opened and package updates are available, it shows in status bar"); ReproStep(failureMessage); Assert.Fail(failureMessage); } catch (TimeoutException) { Session.DebugObject.Debug("WaitForPackageUpdate throws TimeoutException as expected"); } Ide.WaitForSolutionLoaded(); TakeScreenShot("Solution-Ready"); }
public void TestLocalCopyPreservedUpdate() { var templateOptions = new TemplateSelectionOptions { CategoryRoot = OtherCategoryRoot, Category = ".NET", TemplateKindRoot = GeneralKindRoot, TemplateKind = "Console Project" }; var projectDetails = new ProjectDetails(templateOptions); CreateProject(templateOptions, projectDetails); NuGetController.AddPackage(new NuGetPackageOptions { PackageName = "CommandLineParser", Version = "1.9.71", IsPreRelease = false }, this); string solutionFolder = GetSolutionDirectory(); string solutionPath = Path.Combine(solutionFolder, projectDetails.SolutionName + ".sln"); var projectPath = Path.Combine(solutionFolder, projectDetails.ProjectName, projectDetails.ProjectName + ".csproj"); Assert.IsTrue(File.Exists(projectPath)); ReproStep("Check 'Local Copy' on CommandLine package under References"); Workbench.CloseWorkspace(this); AddOrCheckLocalCopy(projectPath, true); Workbench.OpenWorkspace(solutionPath, this); NuGetController.UpdateAllNuGetPackages(this); ReproStep("Check if CommandLine package under References has 'Local Copy' checked"); AddOrCheckLocalCopy(projectPath, false); }