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);
        }
예제 #3
0
        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);
        }
예제 #4
0
        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);
        }
예제 #5
0
 void NoProjectsSelected()
 {
     fakeSolution.NoProjectsSelected();
 }
 void NoProjectsSelected()
 {
     solution.NoProjectsSelected();
 }