public void Constructor_EmptySolutionOpenWhenConsoleViewModelCreated_DoesNotThrowException() { CreateConsoleHost(); projectService = new FakePackageManagementProjectService(); var solution = ProjectHelper.CreateSolution(); projectService.OpenSolution = solution; Assert.DoesNotThrow(() => CreateViewModel(consoleHost, projectService)); }
List <IProject> AddSolutionWithTwoProjectsToProjectService() { ISolution solution = ProjectHelper.CreateSolution(); TestableProject project1 = ProjectHelper.CreateTestProject(solution, "Test1"); TestableProject project2 = ProjectHelper.CreateTestProject("Test2"); fakeSolution.FakeMSBuildProjects.Add(project1); fakeSolution.FakeMSBuildProjects.Add(project2); return(fakeSolution.FakeMSBuildProjects); }
ISolution CreateViewModelWithEmptySolutionOpen() { CreateConsoleHost(); var solution = ProjectHelper.CreateSolution(); projectService = new FakePackageManagementProjectService(); projectService.OpenSolution = solution; projectService.ProjectCollections.Add(solution.Projects); CreateViewModel(consoleHost, projectService); return(solution); }
List <IProject> AddSolutionWithTwoProjectsToProjectService(string projectName1, string projectName2) { ISolution solution = ProjectHelper.CreateSolution(); TestableProject project1 = ProjectHelper.CreateTestProject(solution, projectName1); TestableProject project2 = ProjectHelper.CreateTestProject(solution, projectName2); fakeSolution.FakeMSBuildProjects.Add(project1); fakeSolution.FakeMSBuildProjects.Add(project2); fakeSolution.AddFakeProjectToReturnFromGetProject(projectName1); fakeSolution.AddFakeProjectToReturnFromGetProject(projectName2); return(fakeSolution.FakeMSBuildProjects); }