void AddTwoProjectsSelected(string projectName1, string projectName2) { AddProjectToSolution(); AddProjectToSolution(); fakeSolution.FakeDotNetProjects [0].Name = projectName1; fakeSolution.FakeDotNetProjects [1].Name = projectName2; fakeSolution.NoProjectsSelected(); fakeSolution.AddFakeProjectToReturnFromGetProject(projectName1); fakeSolution.AddFakeProjectToReturnFromGetProject(projectName2); }
void CreateViewModelWithTwoProjectsSelected(string projectName1, string projectName2) { CreateViewModel(); AddProjectToSolution(); AddProjectToSolution(); fakeSolution.FakeMSBuildProjects[0].Name = projectName1; fakeSolution.FakeMSBuildProjects[1].Name = projectName2; fakeSolution.NoProjectsSelected(); fakeSolution.AddFakeProjectToReturnFromGetProject(projectName1); fakeSolution.AddFakeProjectToReturnFromGetProject(projectName2); }
public void GetProjects_TwoProjectsAndPackageNotInstalledInAnyProject_IsEnabledIsFalseForAllSelectedProjects() { CreateFakeSolution(); AddSolutionWithTwoProjectsToProjectService("Project A", "Project B"); fakeSolution.NoProjectsSelected(); CreateSelectedProjects(); var fakePackage = new FakePackage("Test"); List <IPackageManagementSelectedProject> projects = selectedProjects.GetProjects(fakePackage).ToList(); var expectedProjects = new List <IPackageManagementSelectedProject>(); expectedProjects.Add(new FakeSelectedProject("Project A", selected: false, enabled: false)); expectedProjects.Add(new FakeSelectedProject("Project B", selected: false, enabled: false)); SelectedProjectCollectionAssert.AreEqual(expectedProjects, projects); }
public void Title_SolutionSelectedButNoProjectSelected_ReturnsSolutionFileNameInTitle() { CreateSolution(); fakeSolution.NoProjectsSelected(); fakeSolution.FileName = @"d:\projects\MySolution.sln"; CreateViewModel(fakeSolution); string title = viewModel.Title; string expectedTitle = "MySolution.sln - Manage Packages"; Assert.AreEqual(expectedTitle, title); }
void NoProjectsSelected() { fakeSolution.NoProjectsSelected(); }
void NoProjectsSelected() { solution.NoProjectsSelected(); }