public void InitializeSolutionBinding_Update_AllUpToDate_NoProjectsUpdated() { // Arrange var allProjects = new Project[] { new ProjectMock("cs1.csproj"), new ProjectMock("cs2.csproj"), new ProjectMock("cs3.csproj"), new ProjectMock("cs4.csproj") }; var logger = new TestLogger(); var finder = new ConfigurableUnboundProjectFinder { UnboundProjects = null }; // Act var result = BindingProcessImpl.GetProjectsForRulesetBinding(false, allProjects, finder, logger); // Assert result.Should().BeEmpty(); logger.AssertOutputStringExists(Strings.Bind_Ruleset_SomeProjectsDoNotNeedToBeUpdated); logger.AssertPartialOutputStringExists("cs1.csproj", "cs2.csproj", "cs3.csproj", "cs4.csproj"); }
public void InitializeSolutionBinding_Update_NotAllUpToDate_SomeProjectsUpdated() { // Arrange var allProjects = new Project[] { new ProjectMock("csA.csproj"), new ProjectMock("csB.csproj"), new ProjectMock("csC.csproj"), new ProjectMock("csD.csproj") }; var unboundProjects = new Project[] { new ProjectMock("XXX.csproj"), allProjects[1], allProjects[3] }; var logger = new TestLogger(); var finder = new ConfigurableUnboundProjectFinder { UnboundProjects = unboundProjects }; // Act var result = BindingProcessImpl.GetProjectsForRulesetBinding(false, allProjects, finder, logger); // Assert result.Should().BeEquivalentTo(allProjects[1], allProjects[3]); logger.AssertOutputStringExists(Strings.Bind_Ruleset_SomeProjectsDoNotNeedToBeUpdated); logger.AssertPartialOutputStringExists("csA.csproj", "csC.csproj"); }